Skip to main content
Webhooks allow you to receive real-time HTTP notifications when events occur in your Sendook account. Configure webhook endpoints to listen for specific events and receive POST requests with event data.

Create Webhook

Create a new webhook endpoint to receive event notifications.

Request Body

string
required
The HTTPS URL where webhook events will be sent.Must be a publicly accessible endpoint that can receive POST requests.Example: "https://your-app.com/webhooks/sendook"
string[]
required
Array of event types to subscribe to. At least one event is required.Available events:
  • inbox.created - Inbox was created
  • inbox.deleted - Inbox was deleted
  • inbox.updated - Inbox was updated
  • message.sent - Message was sent from an inbox
  • message.received - Message was received in an inbox
  • message.delivered - Message was successfully delivered
  • message.bounced - Message bounced
  • message.complained - Recipient marked message as spam
  • message.rejected - Message was rejected by recipient server
Example: ["message.received", "message.sent"]

Response

string
Unique identifier for the webhook.
string
ID of the organization that owns this webhook.
string
The webhook endpoint URL.
string[]
Array of event types this webhook is subscribed to.
string
ISO 8601 timestamp of when the webhook was created.
string
ISO 8601 timestamp of when the webhook was last updated.

List Webhooks

Retrieve all webhooks configured for your organization.

Response

Returns an array of webhook objects.
string
Unique identifier for the webhook.
string
ID of the organization that owns this webhook.
string
The webhook endpoint URL.
string[]
Array of event types this webhook is subscribed to.
string
ISO 8601 timestamp of when the webhook was created.
string
ISO 8601 timestamp of when the webhook was last updated.

Get Webhook

Retrieve a specific webhook by its ID.

Path Parameters

string
required
The unique identifier of the webhook to retrieve.

Response

string
Unique identifier for the webhook.
string
ID of the organization that owns this webhook.
string
The webhook endpoint URL.
string[]
Array of event types this webhook is subscribed to.
string
ISO 8601 timestamp of when the webhook was created.
string
ISO 8601 timestamp of when the webhook was last updated.

Error Responses

404 Not Found
  • "Webhook not found" - The webhook doesn’t exist or doesn’t belong to your organization

Test Webhook

Send a test webhook event to verify your endpoint is configured correctly.

Path Parameters

string
required
The unique identifier of the webhook to test.

Response

boolean
Returns true if the test event was queued successfully.

Test Event Payload

The test endpoint will send a message.received event with a sample payload:

Error Responses

404 Not Found
  • "Webhook not found" - The webhook doesn’t exist or doesn’t belong to your organization

Delete Webhook

Delete a webhook endpoint.

Path Parameters

string
required
The unique identifier of the webhook to delete.

Response

Returns the deleted webhook object.
string
Unique identifier for the deleted webhook.
string
ID of the organization that owned this webhook.
string
The webhook endpoint URL.
string[]
Array of event types the webhook was subscribed to.
string
ISO 8601 timestamp of when the webhook was created.
string
ISO 8601 timestamp of when the webhook was last updated.

Error Responses

404 Not Found
  • "Webhook not found" - The webhook doesn’t exist or doesn’t belong to your organization

List Webhook Attempts

Retrieve all delivery attempts for a specific webhook. This is useful for debugging webhook issues and monitoring delivery success rates.

Path Parameters

string
required
The unique identifier of the webhook.

Response

Returns an array of webhook attempt objects.
string
Unique identifier for the webhook attempt.
string
ID of the webhook this attempt belongs to.
string
The event type that triggered this webhook.
object
The data payload sent to the webhook endpoint.
string
The webhook endpoint URL that was called.
number
HTTP status code returned by the webhook endpoint.
string
Response body returned by the webhook endpoint (if available).
boolean
Whether the webhook delivery was successful (status code 2xx).
number
The attempt number for this delivery (1-5).
string
ISO 8601 timestamp of when the attempt was made.

Example Response


Webhook Event Format

All webhook events are sent as POST requests to your configured URL with the following format:

Headers

Payload Structure

string
The type of event that occurred.
object
The event payload. Structure varies by event type:
  • Inbox events: Contains inbox object
  • Message events: Contains message object
string
ISO 8601 timestamp of when the event occurred.

Responding to Webhooks

Your endpoint should:
  1. Respond with a 200 status code within 5 seconds
  2. Process the event asynchronously if needed
  3. Return a 200 even if the event is not relevant to your application

Retry Logic

If your endpoint fails or times out, Sendook will retry with exponential backoff:
  • Attempt 1: Immediate
  • Attempt 2: After 1 minute
  • Attempt 3: After 5 minutes
  • Attempt 4: After 30 minutes
  • Attempt 5: After 2 hours
After 5 failed attempts, the webhook event is discarded.

Security Best Practices

Always use HTTPS URLs for webhook endpoints to ensure data is encrypted in transit.
Verify that webhook requests are coming from Sendook by checking the source IP or implementing signature verification.
Process webhook events idempotently, as you may receive the same event multiple times due to retries.