Create a new webhook subscription
Create a webhook subscription to receive real-time notifications when contact events occur.
Overview
Webhooks enable your application to receive real-time notifications when specific events happen in TitanX. Instead of polling for changes, webhooks push event data directly to your configured endpoint.
Important Security Note
The webhook secret is only returned once at creation time. Store it securely - you’ll need it to verify webhook signatures. If lost, you must delete and recreate the webhook.
Requirements
- HTTPS Required: Your webhook URL must use HTTPS for security
- Valid URL: Must be a publicly accessible endpoint
- Authentication: Webhooks fire only for API-originated contact modifications by the authenticated user
Supported Events
Currently supported event types:
job.contact.scored- Fired when a contact completes scoring
How It Works
- Create a webhook using this endpoint with your HTTPS URL
- Store the secret returned in the response (shown only once)
- Receive events at your endpoint when contacts are scored
- Verify signatures using the secret and the
X-TitanX-Signatureheader - Process the event data in your application
Example Webhook Creation
curl -X POST https://app.titanx.io/api/public/v2/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/titanx",
"eventTypes": ["job.contact.scored"]
}'
Response Example
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://your-app.com/webhooks/titanx",
"eventTypes": ["job.contact.scored"],
"status": "active",
"secret": "whsec_abc123def456...", // Store this securely!
"createdAt": "2024-01-15T10:30:00Z"
}
What Happens Next?
When a contact is scored via the API:
- TitanX sends a POST request to your webhook URL
- The request includes the event data and an HMAC signature
- Your endpoint verifies the signature and processes the event
- Your endpoint returns a 2xx status code to acknowledge receipt
For webhook payload structure and signature verification details, see the webhook callback documentation.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Name for the webhook (for your reference)
1"Production Contact Webhook"
HTTPS endpoint URL where webhook events will be sent (must be HTTPS)
"https://api.example.com/webhooks/titanx"
Array of event types to subscribe to
1job.contact.scored, job.completed ["job.contact.scored"]Initial status of the webhook
active, inactive "active"
Response
Webhook created successfully. The secret is only shown once - store it securely.