Webhooks

A webhook is a user-defined HTTP callback. They are triggered whenever an event of interest takes place in your Kapost application.

How it Works

Webhooks allow you to collect information about your content as they happen in real time. Provide a URL and Kapost will perform a POST request to that URL whenever content is created, modified, deleted, or published. To test webhooks, use a helper service such as requestb.in which stores traffic as it happens and allows you to inspect it. Kapost also provides a test button on your webhooks settings page to ensure your server is responding appropriately.

Security

You may configure an SSL endpoint which will ensure your information is encrypted as it is transmitted.

Payload Examples

The webhook request contains a payload which desribes the event that occurred. Presently, we only issue events based on changing content. Each event contains information about the type of change that occurred, where it occurred, and the entity itself. "content" is currently the possible value for the type field, but this is subject to change as we expand webhooks. The possible values of the operation field are "create", "update", "publish", and "delete".

Here is an example payload:

{
   "operation":"create",
   "type":"content",
   "payload":{
      "full_post":{
         "id":"523381424aaaaecc80000001",
         "idea_title":null,
         "content_title":null,
         "creator_id":"51e477b9e1f419ecf4000004",
         "assignee_id":"51e477b9e1f419ecf4000004",
         "campaign_ids":[

         ],
         "is_draft":false,
         "submission_deadline":null,
         "publish_deadline":null,
         "next_task":"Discuss post with creator",
         "updated_at":"2013-09-13T21:18:58Z",
         "privacy":"members",
         "idea":null,
         "content":null,
         "tags":[

         ],
         "custom_fields":{

         },
         "excerpt":null,
         "categories":[

         ],
         "persona_ids":[

         ],
         "stage_ids":[

         ],
         "attachments":[

         ],
         "content_type":{
            "id":"515b373751c35c02000001c3",
            "display_name":"Blog Post"
         }
      }
   },
   "instance":{
      "id":"515b373751c35c02000001c2",
      "subdomain":"mongohq"
   }
}