Skip to main content
POST
/
webhooks
/
{id}
/
resend
curl --request POST \
  --url https://api.autosend.com/v1/webhooks/60d5ec49f1b2c72d9c8b1234/resend \
  --header 'Authorization: Bearer AS_your-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "event": "email.delivered",
  "data": {
    "messageId": "msg_abc123",
    "to": "[email protected]"
  }
}'
{
  "success": true,
  "message": "Webhook queued for delivery",
  "data": {
    "jobId": "12345"
  }
}
This endpoint accepts a project API key (AS_ prefix). It queues a test delivery of the supplied event to the webhook’s URL. The webhook must already be subscribed to that event.
curl --request POST \
  --url https://api.autosend.com/v1/webhooks/60d5ec49f1b2c72d9c8b1234/resend \
  --header 'Authorization: Bearer AS_your-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "event": "email.delivered",
  "data": {
    "messageId": "msg_abc123",
    "to": "[email protected]"
  }
}'
{
  "success": true,
  "message": "Webhook queued for delivery",
  "data": {
    "jobId": "12345"
  }
}

Authorizations

Authorizations
string | header
required
Project API key header of the form Bearer AS_<key>.

Path Parameters

id
string
required
The unique identifier of the webhook.Example: "60d5ec49f1b2c72d9c8b1234"

Body

event
string
required
The event type to deliver. Must be one the webhook is subscribed to.Example: "email.delivered"
data
object
required
The event payload that will be wrapped and POSTed to the webhook URL.Example: { "messageId": "msg_abc123", "to": "[email protected]" }

Response

Webhook queued for delivery (200)
success
boolean
Indicates if the request was successful
data
object
Wrapper containing the queued job reference

Error Responses

400 - Webhook not subscribed
object
Returned when the webhook is not subscribed to the supplied event.
{
  "success": false,
  "error": {
    "message": "Webhook is not subscribed to this event: email.delivered",
    "code": "WEBHOOK_NOT_SUBSCRIBED",
  }
}
404 - Webhook not found
object
Returned when no webhook with the given ID exists in the project.
{
  "success": false,
  "error": {
    "message": "Webhook not found",
    "code": "WEBHOOK_NOT_FOUND",
  }
}