BETA: Please note that the current endpoints are considered beta. It is possible there may be changes before these endpoints are finalised.
Webhooks
List subscriptions
List all webhooks
get /organizations/{organizationId}/webhooks
Parameters
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
Responses
200: OK response.Webhook[]
[
{
"events": [
"customer.created",
"customer.updated"
],
"id": "Rerum voluptatibus veritatis voluptates voluptas iure et.",
"ref": "my_webhook",
"url": "https://externalapp.com/hookcallback"
},
{
"events": [
"customer.created",
"customer.updated"
],
"id": "Rerum voluptatibus veritatis voluptates voluptas iure et.",
"ref": "my_webhook",
"url": "https://externalapp.com/hookcallback"
},
{
"events": [
"customer.created",
"customer.updated"
],
"id": "Rerum voluptatibus veritatis voluptates voluptas iure et.",
"ref": "my_webhook",
"url": "https://externalapp.com/hookcallback"
}
]
404: not_found: Not Found response.
Create or Update a subscription
Set webhook
put /organizations/{organizationId}/webhooks/{webhookRef}
Parameters
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
webhookRef | string | path |
Request Body
WebhookPayload
{
"events": [
"customer.created",
"customer.updated"
],
"secret": "yRtqyP5eoWRkvC68fYe9",
"url": "https://externalapp.com/hookcallback"
}
Responses
200: OK response.Webhook
{
"events": [
"customer.created",
"customer.updated"
],
"id": "Deleniti delectus animi dolor iusto rerum.",
"ref": "my_webhook",
"url": "https://externalapp.com/hookcallback"
}
Delete a subscription
Delete webhook
delete /organizations/{organizationId}/webhooks/{webhookRef}
Parameters
Name | Type | In | Description |
---|---|---|---|
organizationId | string | path | Organization ID |
webhookRef | string | path |
Responses
204: No Content response.
Models
Webhook
An organization webhook
Name | Type | Description |
---|---|---|
id | string | (optional) |
ref | string | |
url | string | |
events | string[] | Events to subscribe to on this webhook |
WebhookPayload
Name | Type | Description |
---|---|---|
secret | string | (optional) |
url | string | |
events | string[] | Events to subscribe to on this webhook |