Create webhook endpoint
Creates a webhook receiver. subscribed_events accepts the standard platform event names (such as message.received, account.status.updated); use ["*"] to subscribe to every event. Unknown event names are rejected. signing_secret is optional — when omitted or empty, signing is disabled for the endpoint. retry_policy is optional; max_attempts defaults to 3 and must be an integer from 0 to 5. Use 0 to disable retries.
https://api.unifyport.ai/v1/webhook-endpointsHeaders
X-Api-KeyWorkspace API key. The workspace is resolved from this header.
Content-TypeUse application/json when sending a JSON request body.
Path parameters
This endpoint has no path parameters.
Request body
urlHTTPS endpoint that receives webhook events.
statusEndpoint status, usually active or inactive.
subscribed_eventsEvent types delivered to the endpoint. Use ["*"] to subscribe to all events; see the standard event catalogue for all valid names.
signing_secretOptional webhook signing secret. Use placeholders in examples.
retry_policyOptional retry settings. max_attempts defaults to 3 and accepts integers from 0 to 5; 0 disables retries.
Response body
idWebhook endpoint identifier (we_...).
urlHTTPS URL that receives webhook deliveries.
statusEndpoint status: active or inactive.
subscribed_eventsEvent types delivered to the endpoint; ["*"] means all events.
signing_enabledtrue when a signing secret is set and deliveries are signed.
retry_policyRetry settings returned by the API. max_attempts defaults to 3 and is limited to 0-5.
Responses
201Request succeeded. See the example response body.
400The request body, path, or parameters are invalid.
401The X-Api-Key header is missing or invalid.
409The requested operation conflicts with an existing provider account or resource.
500The service encountered an unexpected error.
Request
curl -X POST https://api.unifyport.ai/v1/webhook-endpoints \
-H "X-Api-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhook",
"status": "active",
"subscribed_events": ["*"],
"signing_secret": "<WEBHOOK_SIGNING_SECRET>"
}'Response
{
"data": {
"id": "we_example",
"url": "https://example.com/webhook",
"status": "active",
"subscribed_events": ["*"],
"signing_enabled": true,
"retry_policy": {
"max_attempts": 3
}
}
}