Skip to content

Test a webhook URL

POST
/api/domains/{domain}/webhooks/test
curl --request POST \
--url https://smtp-app.kirim.email/api/domains/example.com/webhooks/test \
--header 'Content-Type: application/json' \
--data '{ "url": "https://example.com/webhook", "event_type": "queued" }'

Send a test webhook event to the specified URL to verify it can receive webhook notifications

domain
required
string
Example
example.com

Domain name that must be owned by the authenticated user

Test webhook parameters

Media typeapplication/json
object
url
required

URL endpoint to test

string format: uri
Example
https://example.com/webhook
event_type
required

Event type to use for the test

string
Allowed values: queued send delivered bounced failed permanent_fail opened clicked unsubscribed temporary_fail deferred
Example
delivered

Webhook test completed successfully

Media typeapplication/json
object
success

Indicates the webhook test was successful

boolean
message

Human-readable result message

string
data

Test result details

object
url

The tested webhook URL

string
event_type

The event type used for testing

string
response_status

HTTP status code received from webhook URL

integer
response_time

Response time in milliseconds

integer
Example
{
"success": true,
"message": "Webhook test completed successfully",
"data": {
"url": "https://example.com/webhook",
"event_type": "delivered",
"response_status": 200,
"response_time": 150
}
}

Unauthorized - Invalid or missing authentication credentials

Media typeapplication/json
object
success
boolean
message
string
Example
{
"success": false,
"message": "Unauthorized"
}

Not Found - Domain or webhook not found

Media typeapplication/json
object
success
boolean
message
string
Example
{
"success": false,
"message": "Domain not found or you do not own this domain"
}

Validation Error - Invalid input data

Media typeapplication/json
object
success
boolean
message
string
errors

Field-specific validation errors

object
Example
{
"success": false,
"message": "Validation failed."
}

Webhook test failed - URL did not respond correctly

Media typeapplication/json
object
success

Indicates the webhook test failed

boolean
message

Human-readable error message

string
data

Test result details

object
url

The tested webhook URL

string
event_type

The event type used for testing

string
response_status

HTTP status code received from webhook URL

integer
response_time

Response time in milliseconds

integer
Example
{
"success": false,
"message": "Webhook URL did not respond correctly",
"data": {
"url": "https://example.com/webhook",
"event_type": "delivered",
"response_status": 404,
"response_time": 0
}
}

Too Many Requests - Rate limit exceeded. Retry after the specified time.

Media typeapplication/json
object
success
boolean
message
string
Example
{
"success": false,
"message": "Too many attempts. Please try again later."
}
Retry-After
integer

Seconds until rate limit resets

X-RateLimit-Limit
integer

Maximum requests per minute

X-RateLimit-Remaining
integer

Remaining requests in current window

Server Error - Unexpected error occurred

Media typeapplication/json
object
success
boolean
message
string
Example
{
"success": false,
"message": "An error occurred while processing the request."
}