Webhooks are a way to proactively subscribe to events that occur in your KnowledgeOwl account. When an event occurs that you have subscribed to, we will POST a message to the endpoint of your specification containing information about the event.

Currently we offer 2 types of POST payloads, one formatted specifically for the application Slack, and the other containing API object data.

The following calls can be used to manage your webhook subscriptions:

GET LIST - list current webhook subscriptions

curl -u {{API key}}:x https://app.knowledgeowl.com/api/head/webhook.json

GET - pull info for a specific webhook subscription

curl -u {{API key}}:x https://app.knowledgeowl.com/api/head/webhook/{{webhook ID}}.json

Example Response

  "valid": true,
  "data": {
    "id": "12345abcde",
    "type": "webhook",
    "status": "active",
    "output": "default",
    "project_ids": ["all"], //can also be array of Knowledge base IDs
    "event": ["article.create","article.update"],
    "token": "98766abadada",
    "date_created": "06\/16\/2017 3:16 pm EDT",
    "date_modified": "06\/16\/2017 3:16 pm EDT",
    "date_deleted": null

POST - create a new webhook subscription

Before you attempt to create a new webhoook, make sure you have an endpoint that is ready to receive information and return an HTTP status code of 200.

During the subscription creation, a test call will be made to your endpoint. If the endpoint you specify does not return a status code of 200, your webhook subscription will not be created.

//JSON object sent during test call to provided endpoint when the output is set to "default"
//single event
curl -u {{API key}}:x -H "Content-Type: application/json" -X POST -d
'{"event": "article.delete", "endpoint": "https://hooks.slack.com/services/abcdefe123/abcd1234", "output": "slack"}'

//multiple events
curl -u {{API key}}:x -H "Content-Type: application/json" -X POST -d
'{"event": ["article.delete", "article.create"], "endpoint": "https://my.webhookconsumer.com/webhook-receive"}'

PUT - update a webhook subscription

curl -u {{API key}}:x -H "Content-Type: application/json" -X PUT -d 
'{"event": "article.delete", "endpoint": "https://my.webhookconsumer.com/webhook-receive-new"}'
https://app.knowledgeowl.com/api/head/webhook/{{webhook ID}}.json

Available Webhook Events

Article Events:

  • article.create
  • article.update
  • article.statusChange
  • article.delete

Comment Events:

  • comment.create
  • comment.update
  • comment.statusChange
  • comment.delete

Contact Form Events:

  • contactForm.submit

Have an event that you would like to receive notifications on that's not listed above? Contact our support team and let us know!