Webhooks
List subscriptions
List all webhooks
get /organizations/{organizationId}/webhooksParameters
| Name | Type | In | Description |
|---|---|---|---|
organizationId | string | path | Organization ID |
Responses
200: OK response.Webhook[]
[
{
"events": [
"customer.created",
"customer.updated"
],
"id": "Quisquam est.",
"ref": "my_webhook",
"url": "https://externalapp.com/hookcallback"
},
{
"events": [
"customer.created",
"customer.updated"
],
"id": "Quisquam est.",
"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": "Enim expedita magni.",
"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 |