Skip to content

Change a webhook endpoint, or turn it off or on

PATCH
/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}
curl --request PATCH \
--url https://api.crossmart.io/api/v1/workspaces/example/webhook-endpoints/example \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "url": "example", "description": "example", "eventTypes": [ "order.created" ], "enabled": true }'

Turning an endpoint off fails what it still had to receive; turning it on clears its failure count. Events from while it was off are not sent.

workspaceId
required
string
endpointId
required
string
Media typeapplication/json
object
url

Where events are POSTed. https and a public address; plain http only outside production.

string
description
string
nullable <= 500 characters
eventTypes

The events to receive. webhook.test cannot be subscribed to.

Array<string>
Allowed values: order.created order.updated inventory.stock_changed listing.published listing.failed listing.removed product.created product.updated product.deleted webhook.test
enabled

False turns the endpoint off; true turns it back on and clears its failures

boolean
Media typeapplication/json
object
id
required
string format: uuid
url
required
string
description
required
string
nullable
eventTypes
required
Array<string>
Allowed values: order.created order.updated inventory.stock_changed listing.published listing.failed listing.removed product.created product.updated product.deleted webhook.test
enabled
required

False when turned off by someone or after repeated failures

boolean
disabledReason
required

MANUAL: turned off by someone. FAILING: turned off by Crossmart.

string
Allowed values: MANUAL FAILING
disabledAt
required
string format: date-time
nullable
consecutiveFailures
required

Failed attempts since the last delivery that went through

number
lastDelivery
required

The latest delivery attempt, whatever event it carried; null before the first

object
attemptedAt
required
string format: date-time
outcome
required

SUCCEEDED: the endpoint answered 2xx. FAILED: anything else, or no answer.

string
Allowed values: SUCCEEDED FAILED
responseStatus
required

Null when no response came: a timeout or a connection error

number
nullable
error
required

Why the attempt failed; null on success

string
nullable
previousSecretExpiresAt
required

Until then deliveries are also signed with the secret the last rotation replaced

string format: date-time
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"url": "https://example.com/crossmart/webhooks",
"description": "Order notifications to n8n",
"eventTypes": [
"order.created"
],
"disabledReason": "MANUAL",
"lastDelivery": {
"outcome": "SUCCEEDED",
"responseStatus": 200,
"error": "The endpoint answered with HTTP 503"
}
}

The URL is not https (in production), or not a public address