Webhook¶
Webhooks allow you to receive notifications via HTTP requests when certain asynchronous events have occurred. In the EveryPoint API, webhook requests are used to deliver updates on the progress of jobs, deliver messages that were sent to shared folders, and send a notification whenever a new annotation has been created by a trigger. In either case, a JSON object with the contents of the notification will be delivered to the webhook URL that is currently specified.
Each instance is responsible for setting its own webhook. In this way, jobs or messages from different instances can trigger notifications to different webhook URLs.
Notification formats¶
The following is a description of the various types of notifications that can be received in a webhook request.
Job¶
For a job, a notification will be delivered whenever the "status"
property changes (e.g. the job moves from "pending"
to "processing"
, or from "processing"
to "complete"
or "failed"
).
The format of the notification that is sent to the webhook is as follows, where the "job"
property contains the full URL to the job that has either finished or failed:
Annotation¶
Whenever a new annotation is created as the result of a trigger, the full URL to that newly created annotation will be delivered in the following manner:
Message¶
When a message is received, the delivered notification will be similar to the following, where the "folder"
property contains the full URL to the folder that was used to receive the message:
{
"message": {
"folder": "https://api.everypoint.io/v3{instance-uri}{folder-uri}",
"body": "This is a message."
}
}
Get the current webhook¶
Get the current webhook URL.
Route: /v3{instance-uri}/webhook
Method: GET
Sample response body:
Update the webhook¶
Update the webhook URL.
Route: /v3{instance-uri}/webhook
Method: PATCH
Sample request body:
Upon successfully updating the webhook, the response will contain the updated details of the webhook.