Enable a Webhook Endpoint
POST
/v2/webhook-endpoints/{id}/enableAuthorization
AuthorizationBearer token · headerrequiredMerchant API key scoped to one merchant and environment. Read operations require api:read, normal write operations require api:write, and broadcast mutations also require explicit broadcasts:write.
Path parameters
idstring<uuid>requiredHeader parameters
idempotency-keystringrequiredRequired for write endpoints that create records and need deterministic retry behavior.
min length 1 · max length 255
if-matchstringrequiredStrong entity revision ETag returned by the latest read or write.
matches ^\"[0-9]+\"$
x-request-idstringOptional caller-provided request correlation ID.
min length 1
Responses
200OK
endpointobjectrequiredShow propertiesHide properties
idstring<uuid>requiredmerchantIdstring<uuid>requiredscopestringrequiredAllowed:
organizationsandboxproductionenvironmentstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anynamestringrequiredmin length 1 · max length 160
urlstring<uri>requiredstatusstringrequiredAllowed:
enableddisableddeletedselectedEventTypesstring[]requiredmin items 1
revisionintegerrequiredmin -9007199254740991 · max 9007199254740991
secretVersionobject | anyrequiredShow propertiesHide properties
Any of:
object
versionintegerrequiredmin -9007199254740991 · max 9007199254740991
encryptionKeyIdstringrequiredmin length 1 · max length 128
algorithmanyrequiredaadVersionanyrequiredpurposeanyrequiredoverlapExpiresAtstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anyany
anydeletedAtstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anycreatedAtstring<date-time>requiredupdatedAtstring<date-time>required400Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject401Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject403Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject404Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject409Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject412Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject422Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject428Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject429Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobject500Standard Cipay error response.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmin length 1
messagestringrequiredmin length 1
requestIdstringrequiredmin length 1
detailsobjectRequest
curl -X POST "https://api.cipay.net/v2/webhook-endpoints/%3Cuuid%3E/enable" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "idempotency-key: string" \
-H "if-match: string"const response = await fetch("https://api.cipay.net/v2/webhook-endpoints/%3Cuuid%3E/enable", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"idempotency-key": "string",
"if-match": "string"
}
});Response
{
"endpoint": {
"id": "<uuid>",
"merchantId": "<uuid>",
"scope": "organization",
"environment": "sandbox",
"name": "string",
"url": "<uri>",
"status": "enabled",
"selectedEventTypes": [
"member.invited"
],
"revision": 0,
"secretVersion": {
"version": 0,
"encryptionKeyId": "string",
"algorithm": "aes-256-gcm",
"aadVersion": 1,
"purpose": "outbound_webhook_signing_secret",
"overlapExpiresAt": "2024-01-01T00:00:00Z"
},
"deletedAt": "2024-01-01T00:00:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"requestId": "string",
"details": {}
}
}