curl --request POST \
--url https://api.sendx.io/api/v1/rest/webhook \
--header 'Content-Type: application/json' \
--header 'X-Team-ApiKey: <api-key>' \
--data '
{
"enabled": true,
"url": "https://api.example.com/webhooks/sendx",
"unsubscribed": true,
"dropped": true,
"bounced": true,
"markedSpam": true,
"clicked": true,
"opened": true,
"contactCreated": true
}
'{
"id": "webhook_9l154iiXlZoPo7vngmamee",
"enabled": true,
"url": "https://api.example.com/webhooks/sendx",
"unsubscribed": true,
"dropped": true,
"bounced": true,
"markedSpam": true,
"clicked": true,
"opened": true,
"contactCreated": true,
"created": 1705750200
}{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Resource with this name already exists"
}{
"status": "error",
"message": "Request body is not in proper format"
}{
"status": "error",
"message": "Internal server error occurred"
}Create webhook
Creates a new webhook for event notifications.
curl --request POST \
--url https://api.sendx.io/api/v1/rest/webhook \
--header 'Content-Type: application/json' \
--header 'X-Team-ApiKey: <api-key>' \
--data '
{
"enabled": true,
"url": "https://api.example.com/webhooks/sendx",
"unsubscribed": true,
"dropped": true,
"bounced": true,
"markedSpam": true,
"clicked": true,
"opened": true,
"contactCreated": true
}
'{
"id": "webhook_9l154iiXlZoPo7vngmamee",
"enabled": true,
"url": "https://api.example.com/webhooks/sendx",
"unsubscribed": true,
"dropped": true,
"bounced": true,
"markedSpam": true,
"clicked": true,
"opened": true,
"contactCreated": true,
"created": 1705750200
}{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Resource with this name already exists"
}{
"status": "error",
"message": "Request body is not in proper format"
}{
"status": "error",
"message": "Internal server error occurred"
}- Contact lifecycle events
- Email engagement tracking
- Campaign performance updates
- List subscription changes
- contactCreated: New contact added to system
- unsubscribed: Contact opted out
- dropped: Email dropped (invalid address)
- bounced: Email bounced (hard/soft)
- markedSpam: Contact marked email as spam
- clicked: Contact clicked a link
- opened: Contact opened an email
- Use HTTPS endpoints for security
- Implement webhook signature verification
- Respond quickly (< 5 seconds)
- Handle retries gracefully
- Log webhook payloads for debugging
Authorizations
Team API key for authentication. Find your API key in SendX Settings → Team API Key.
Example:
X-Team-ApiKey: your_team_api_key_here
Body
Webhook endpoint URL
"https://api.example.com/webhooks/sendx"
Whether webhook is enabled
Trigger webhook when a contact unsubscribes
Trigger webhook when an email is dropped
Trigger webhook when an email bounces
Trigger webhook when an email is marked as spam
Trigger webhook when a link in the email is clicked
Trigger webhook when an email is opened
Trigger webhook when a new contact is created
Response
✅ Webhook created successfully
"webhook_9l154iiXlZoPo7vngmamee"
Webhook endpoint URL
"https://api.example.com/webhooks/sendx"
Whether webhook is enabled
Trigger webhook when a contact unsubscribes
Trigger webhook when an email is dropped
Trigger webhook when an email bounces
Trigger webhook when an email is marked as spam
Trigger webhook when a link in the email is clicked
Trigger webhook when an email is opened
Trigger webhook when a new contact is created
Was this page helpful?