API Reference
Webhook EndpointsPOST

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-endpoints

Headers

X-Api-Key
stringrequired

Workspace API key. The workspace is resolved from this header.

Content-Type
stringrequired

Use application/json when sending a JSON request body.

Path parameters

This endpoint has no path parameters.

Request body

url
stringrequired

HTTPS endpoint that receives webhook events.

status
string

Endpoint status, usually active or inactive.

subscribed_events
string[]

Event types delivered to the endpoint. Use ["*"] to subscribe to all events; see the standard event catalogue for all valid names.

signing_secret
string

Optional webhook signing secret. Use placeholders in examples.

retry_policy
object

Optional retry settings. max_attempts defaults to 3 and accepts integers from 0 to 5; 0 disables retries.

Response body

id
string

Webhook endpoint identifier (we_...).

url
string

HTTPS URL that receives webhook deliveries.

status
string

Endpoint status: active or inactive.

subscribed_events
string[]

Event types delivered to the endpoint; ["*"] means all events.

signing_enabled
boolean

true when a signing secret is set and deliveries are signed.

retry_policy
object

Retry settings returned by the API. max_attempts defaults to 3 and is limited to 0-5.

Responses

201
201 Created

Request succeeded. See the example response body.

400
Bad Request

The request body, path, or parameters are invalid.

401
Unauthorized

The X-Api-Key header is missing or invalid.

409
Conflict

The requested operation conflicts with an existing provider account or resource.

500
Internal Server Error

The 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
    }
  }
}