Gist
Search
⌃K

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.
scheduledFor
A UTC date time field in ISO format. if not set, the message will be scheduled for delivery immediately.
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.
properties.gist
An object used by the client libraries to determine how the message should be rendered.

Gist Properties

Property
Description
elementId
When a value is specified the message will be embedded instead of shown as a modal message.
position
Determines how a modal message is displayed. The values are: center, top & bottom. If not specified, the message will default to center position.
routeRuleApple
A regular expression that determine when a message is shown to a user on the Apple platforms. If not specified, the message will appear as soon as the user is in your product.
routeRuleAndroid
A regular expression that determine when a message is shown to a user on the Android platform. If not specified, the message will appear as soon as the user is in your product.
routeRuleWeb
A regular expression that determine when a message is shown to a user on the Web platform. If not specified, the message will appear as soon as the user is in your product.

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",
"gist": {
"position": "center",
"routeRuleWeb": "home\/([^\\s]+)"
}
}
}

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"
"gist": {
"position": "center",
"routeRuleWeb": "home\/([^\\s]+)"
}
}
},
{
"messageId": "welcome",
"userToken": "XYZ890",
"priority": 1,
"expiry": "2021-01-31T14:30:00Z",
"properties": {
"firstName": "John"
"gist": {
"position": "center",
"routeRuleWeb": "home\/([^\\s]+)"
}
}
}
]
}
There's a max limit of 10,000 messages per request.