Create Webhook
https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/CreateWebhook
Creates a new webhook with the specified filter criteria. Three levels of filtering are available:
- Solution. Receive events for the entire SmartSuite Solution.
- Application (Table). Receive events for one or more Tables (Apps) in a Solution.
- Application (Table) fields. Limit events to specific fields in a Table (App).
You can currently create any number of webhooks, but be aware that this may be limited in the future.
You must call list payloads at least once every 7 days for the webhook to stay active. After 7 days of inactivity we will disable notifications for your webhook. Webhooks in this state for a further 7 days will be deleted, along with their payloads. Calling list payloads during the 7 day inactive period will re-enable the webhook and extend the timeout period an additional 7 days.
Request Body
Param | Type | Optional | Description |
---|---|---|---|
filter | filter object | No | Specifies filters for the returned webhooks. |
kinds | array of strings | No | One of the following types of events:
|
locator | object | No | Contains workspace and Solution information |
webhook_id | string | Yes | leave blank or omit when creating |
notification_status | notification_status object | Yes |
filter object
Param | Type | Optional | Description |
---|---|---|---|
solution | object | Yes* | Pass an empty object to filter at the Solution level |
applications | applications filter object | Yes* | Object containing application (table) ids to filter by |
application | application fields filter object | Yes* | object containing a list of Table (App) Ids to filter on |
"filter": {
"solution": {}
}
"filter": {
"applications": {
"application_ids": ["some application id"]
}
}
"filter": {
"application": {
"application_id": "some application id",
"field_ids": [
"some field id 1",
"some field id 2"
]
}
The filter object must contain one (and only one) of the formats listed above. When creating a webhook that monitors changes at the solution level, include the solution filter with an empty object as the request requires the filter object to be populated.
{
"webhook": {
"filter": {
"solution": {}
},
"kinds": [
"RECORD_CREATED"
],
"locator": {
"account_id": "{{accountId}}",
"solution_id": "{{solutionId}}"
},
"notification_status": {
"enabled": {
"url": "https://hook.us1.make.com/pgbpclvi5y9aix2g5cu421paeeq2izzz"
}
}
}
}
{
"webhook": {
"filter": {
"applications": {
"application_ids": ["some application id"]
}
},
"kinds": [
"RECORD_CREATED"
],
"locator": {
"account_id": "{{accountId}}",
"solution_id": "{{solutionId}}"
},
"webhook_id": "",
"notification_status": {
"enabled": {
"url": "https://sswebhooks.requestcatcher.com/"
}
}
}
}
{
"webhook": {
"filter": {
"application": {
"application_id": "some application id",
"field_ids": ["some field id 1", "some field id 2"]
}
},
"kinds": [
"RECORD_CREATED",
"RECORD_UPDATED"
],
"locator": {
"account_id": "{{accountId}}",
"solution_id": "{{solutionId}}"
},
"webhook_id": "",
"notification_status": {
"enabled": {
"url": "https://sswebhooks.requestcatcher.com/"
}
}
}
}
curl -X POST https://webhooks.smartsuite.com/smartsuite.webhooks.engine.Webhooks/CreateWebhook \
-H "Authorization: Token YOUR_API_KEY" \
-H "ACCOUNT-ID: WORKSPACE_ID" \
-H "Content-Type: application/json" \
--data '{
"webhook": {
"filter": {
"solution": {}
},
"kinds": [
"RECORD_CREATED"
],
"locator": {
"account_id": "{{accountId}}",
"solution_id": "{{solutionId}}"
},
"webhook_id": "",
"notification_status": {
"enabled": {
"url": "https://sswebhooks.requestcatcher.com/"
}
}
}
}'
Response
Param | Type | Description |
---|---|---|
webhook_id | string | Webhook Id |
locator | locator object | Contains workspace and Solution information |
filter | filter object | Specifies a Solution Id to limit the returned webhooks. |
kinds | array of strings | One of the following types of events:
|
created_at | created_at object | Created time information |
updated_at | updated_at object | Updated time information |
notification_status | notification_status object | Webhook notification status |
system_status | system_status object | Webhook status |