Webhook

Webhooks are the easiest way to send real-time messages to users.

Setup

Required Headers

Key

Value

Content-Type

application/json

X-Bourbon-Organization-Id

Your Organization Id

X-Gist-Service-Key

Your Service Key

Service keys can be managed from the gist app.

Properties

Property

Description

messageId

The message id

userToken

A token which is generated by your backend

priority

A value between 1-10, Queue order is based on this value. 1 is highest.

expiry

A UTC expiry date time field in ISO format. If not set, message will be set to expire 1 year from queuing.

properties

A dynamic object containing additional information which can be referenced in a message. This field is not required.

Queuing One Message

Endpoint

https://queue.api.gist.build/api/v1/messages

Request Body

{
"messageId": "welcome",
"userToken": "ABC123",
"priority": 1,
"expiry": "2021-01-31T14:30:00Z",
"properties": {
"firstName": "Paul"
}
}

Queuing Multiple Messages

Endpoint

https://queue.api.gist.build/api/v1/messages/bulk

Request Body

{
"messages": [
{
"messageId": "welcome",
"userToken": "ABC123",
"priority": 1,
"expiry": "2021-01-31T14:30:00Z",
"properties": {
"firstName": "Paul"
}
},
{
"messageId": "welcome",
"userToken": "XYZ890",
"priority": 1,
"expiry": "2021-01-31T14:30:00Z",
"properties": {
"firstName": "John"
}
}
]
}

There's a max limit of 1,000 messages per request.