Creating a Webhook
Create a webhook subscription, choose its delivery mode and event filter, and retrieve it any time.
A webhook subscription tells Guru which events to deliver and where to send them.
Create a webhook via:
POST https://api.getguru.com/api/v1/webhooks
Fields
| Field | Description |
|---|---|
deliveryMode | SINGLE delivers events as individual JSON objects, one at a time. BATCH delivers one or more events in a JSON envelope. BATCH is recommended: it handles higher event frequencies without delivery backups. |
targetUrl | The URL that will receive the events. Must be https. |
status | ENABLED activates the webhook as soon as it is created. DISABLED keeps it inactive until the status is explicitly set to ENABLED. See Updating a Webhook. |
filter | One or more event types, separated by commas, that should be delivered to this webhook. At most 10 event types may be included in a single webhook. |
Request
curl -X POST https://api.getguru.com/api/v1/webhooks \
-u $GURU_USER:$GURU_TOKEN \
-H "Content-Type: application/json" \
-d '{
"deliveryMode": "BATCH",
"targetUrl": "https://someserver.com/",
"status": "ENABLED",
"filter": "card-created"
}'Response
{
"owner": {
"status": "ACTIVE",
"email": "[email protected]",
"firstName": "bob",
"lastName": "smith",
"profilePicUrl": "https://lh3.googleusercontent.com/a-/bob"
},
"filter": "card-created",
"id": "b6109be3-9b86-4fb3-ae1a-5faa94b4fc97",
"status": "ENABLED",
"deliveryMode": "BATCH",
"dateCreated": "2021-05-10T17:05:32.245+0000",
"team": {
"id": "17724bbf-b6b2-4f78-b3db-91188cac3444",
"status": "ACTIVE",
"dateCreated": "2019-11-05T18:48:38.821+0000",
"profilePicUrl": "https://assets.getguru.com/default-team-logo.png",
"name": "TestImageTeam"
},
"dateLastModified": "2021-05-10T17:05:32.245+0000",
"targetUrl": "https://someserver.com/"
}Getting a webhook
At any point, the owner can retrieve one or all of their webhooks:
GET https://api.getguru.com/api/v1/webhooksreturns all currently configured webhooks for the user, as a JSON array where each element matches the response shown above.GET https://api.getguru.com/api/v1/webhooks/{webhookId}returns the webhook with the given ID, in the same shape as the response shown above.
Updated 9 days ago

