Incoming Webhooks

Incoming Webhooks

Integration by Cisco Systems

Published Jun 13 2017

to connect

Published Jun 13 2017

Incoming Webhooks

Integration by Cisco Systems
Send messages to Cisco Spark from other services.

Incoming webhooks let you post messages in Spark spaces when an event occurs in another service that supports webhooks. Webhook events trigger in near real-time allowing your Spark spaces to stay in sync with events happening outside of Spark.

 

To use incoming webhooks, simply connect this integration to your Spark account, create a new webhook below, and configure your service to post messages to the provided URL. The incoming webhook URL expects an HTTP request with a JSON payload which includes the message in either a plaintext field or Markdown-formatted field.

 

To send a plaintext message, make an HTTP POST to the URL and provide the message body in the text field of the request:

 

curl -X POST -H "Content-Type: application/json" ∖
-d '{"text" : "This is a message from a Cisco Spark incoming webhook."}' ∖   "https://api.ciscospark.com/v1/webhooks/incoming/<incoming_webhook_url>"

 

To send a formatted message, make an HTTP POST to the URL and provide the message body (in Markdown format) in the markdown field:

 

curl -X POST -H "Content-Type: application/json" ∖
-d '{"markdown" : "This is a formatted message from a Cisco Spark incoming webhook."}' ∖   "https://api.ciscospark.com/v1/webhooks/incoming/<incoming_webhook_url>".

 

See our Spark for Developer documentation about formatting messages for more examples of how you can create richly-formatted messages in Spark.