SLSmartletter API

Webhook endpoints

Manage the endpoints that receive your events, their delivery log and signing secret. Guide: /docs/webhooks.

post/webhooks— Create a webhook

Same body and answer as Resend. The signing_secret is shown once: store it. Paid plans (Starter 3, Pro 10, Scale 25, Agency 60 endpoints).

Keys: full_access

Body

endpointrequiredstringPublic `https://` URL that receives the events.
eventsrequired"email.sent" | "email.delivered" | "email.delivery_delayed" | "email.bounced" | "email.complained" | "email.opened" | "email.clicked" | "email.failed" | "email.scheduled" | "contact.created" | "contact.updated" | "contact.deleted" | "domain.created" | "domain.updated" | "domain.deleted" | "sequence.entered" | "sequence.completed" | "sequence.exited" | "inbound.received"[]Event types to receive.
descriptionstring
include_newslettersbooleanAlso send the email events of your newsletter issues (one per recipient). Default `false`: transactional emails only.
segment_idsuuid[]Only newsletter events of these newsletters (segments). Empty = all.
domainsstring[]Only email events sent from these domains (domain of the From address). Empty = all.
curl -X POST https://api.smartletter.ai/webhooks \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"https://example.com/webhooks/smartletter","events":["email.delivered","email.bounced"]}'

Response 201

{
  "object": "webhook",
  "id": "9a4c7e10-0000-4000-8000-000000000004",
  "signing_secret": "whsec_…"
}

get/webhooks— List webhooks

Without limit, every webhook is returned.

Keys: full_access

Query parameters

limitinteger1–100, default 20.
afteruuidId of the last item of the previous page (older items).
beforeuuidId of the first item of the previous page (newer items).
curl -X GET https://api.smartletter.ai/webhooks \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Response 200

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "webhook",
      "id": "9a4c7e10-0000-4000-8000-000000000004",
      "endpoint": "https://example.com/webhooks/smartletter",
      "description": "Order emails",
      "events": [
        "email.delivered",
        "email.bounced"
      ],
      "include_newsletters": false,
      "segment_ids": [],
      "domains": [],
      "status": "enabled",
      "disabled_reason": null,
      "consecutive_failures": 0,
      "last_success_at": "2026-10-17T09:05:00.000Z",
      "last_failure_at": null,
      "created_at": "2026-10-17T09:00:00.000Z"
    }
  ]
}

get/webhooks/{id}— Retrieve a webhook

The signing secret is never returned again (rotate it if it was lost).

Keys: full_access

curl -X GET https://api.smartletter.ai/webhooks/<id> \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Response 200

{
  "object": "webhook",
  "id": "9a4c7e10-0000-4000-8000-000000000004",
  "endpoint": "https://example.com/webhooks/smartletter",
  "description": "Order emails",
  "events": [
    "email.delivered",
    "email.bounced"
  ],
  "include_newsletters": false,
  "segment_ids": [],
  "domains": [],
  "status": "enabled",
  "disabled_reason": null,
  "consecutive_failures": 0,
  "last_success_at": "2026-10-17T09:05:00.000Z",
  "last_failure_at": null,
  "created_at": "2026-10-17T09:00:00.000Z"
}

patch/webhooks/{id}— Update a webhook

Only the fields present change. status: "enabled" restarts a disabled endpoint with its failure count at zero.

Keys: full_access

Body

endpointstringPublic `https://` URL that receives the events.
events"email.sent" | "email.delivered" | "email.delivery_delayed" | "email.bounced" | "email.complained" | "email.opened" | "email.clicked" | "email.failed" | "email.scheduled" | "contact.created" | "contact.updated" | "contact.deleted" | "domain.created" | "domain.updated" | "domain.deleted" | "sequence.entered" | "sequence.completed" | "sequence.exited" | "inbound.received"[]Event types to receive.
status"enabled" | "disabled"
descriptionstring
include_newslettersbooleanAlso send the email events of your newsletter issues (one per recipient). Default `false`: transactional emails only.
segment_idsuuid[]Only newsletter events of these newsletters (segments). Empty = all.
domainsstring[]Only email events sent from these domains (domain of the From address). Empty = all.
curl -X PATCH https://api.smartletter.ai/webhooks/<id> \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"disabled"}'

Response 200

{
  "object": "webhook",
  "id": "9a4c7e10-0000-4000-8000-000000000004"
}

delete/webhooks/{id}— Delete a webhook

Its delivery log is deleted with it.

Keys: full_access

curl -X DELETE https://api.smartletter.ai/webhooks/<id> \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Response 200

{
  "object": "webhook",
  "id": "9a4c7e10-0000-4000-8000-000000000004",
  "deleted": true
}

post/webhooks/{id}/signing-secret/rotate— Rotate the signing secret

Same path as Resend (resend.webhooks.rotateSigningSecret). Returns the new secret, shown once. For 24 hours both secrets sign every delivery (two signatures in svix-signature).

Keys: full_access

curl -X POST https://api.smartletter.ai/webhooks/<id>/signing-secret/rotate \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Response 200

{
  "object": "webhook",
  "id": "9a4c7e10-0000-4000-8000-000000000004",
  "signing_secret": "whsec_…",
  "previous_secret_expires_at": "2026-10-18T09:00:00.000Z"
}

post/webhooks/{id}/test— Send a test event

Queues a sample event (data.test: true), delivered within a minute. Check the result in the deliveries.

Keys: full_access

Body

type"email.sent" | "email.delivered" | "email.delivery_delayed" | "email.bounced" | "email.complained" | "email.opened" | "email.clicked" | "email.failed" | "email.scheduled" | "contact.created" | "contact.updated" | "contact.deleted" | "domain.created" | "domain.updated" | "domain.deleted" | "sequence.entered" | "sequence.completed" | "sequence.exited" | "inbound.received"Event type of the sample payload.
curl -X POST https://api.smartletter.ai/webhooks/<id>/test \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"email.delivered"}'

Response 202

{
  "object": "webhook_delivery",
  "id": "3e8b5d22-0000-4000-8000-000000000005",
  "msg_id": "msg_2f6c0e6a9b7d4c1e8f3a5b7c9d1e2f30",
  "webhook_id": "9a4c7e10-0000-4000-8000-000000000004",
  "event_type": "email.delivered",
  "status": "delivered",
  "attempts": 1,
  "next_attempt_at": null,
  "last_status_code": 200,
  "last_response": "ok",
  "last_error": null,
  "last_duration_ms": 182,
  "payload": {
    "type": "email.delivered",
    "created_at": "2026-10-17T09:05:00.000Z",
    "data": {
      "email_id": "5b1f2c90-0000-4000-8000-000000000002"
    }
  },
  "delivered_at": "2026-10-17T09:05:01.000Z",
  "created_at": "2026-10-17T09:05:00.000Z"
}

get/webhooks/{id}/deliveries— List deliveries

Newest first, 30 days of history: status, attempts, HTTP code, the first 4 KB of your answer.

Keys: full_access

Query parameters

status"pending" | "processing" | "delivered" | "failed"
limitinteger1–100, default 20.
afteruuidId of the last item of the previous page (older items).
beforeuuidId of the first item of the previous page (newer items).
curl -X GET https://api.smartletter.ai/webhooks/<id>/deliveries \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Response 200

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "webhook_delivery",
      "id": "3e8b5d22-0000-4000-8000-000000000005",
      "msg_id": "msg_2f6c0e6a9b7d4c1e8f3a5b7c9d1e2f30",
      "webhook_id": "9a4c7e10-0000-4000-8000-000000000004",
      "event_type": "email.delivered",
      "status": "delivered",
      "attempts": 1,
      "next_attempt_at": null,
      "last_status_code": 200,
      "last_response": "ok",
      "last_error": null,
      "last_duration_ms": 182,
      "payload": {
        "type": "email.delivered",
        "created_at": "2026-10-17T09:05:00.000Z",
        "data": {
          "email_id": "5b1f2c90-0000-4000-8000-000000000002"
        }
      },
      "delivered_at": "2026-10-17T09:05:01.000Z",
      "created_at": "2026-10-17T09:05:00.000Z"
    }
  ]
}

post/webhooks/{id}/deliveries/{delivery_id}/retry— Retry a delivery

Sends the same event again (same svix-id, so you can deduplicate) within a minute.

Keys: full_access

curl -X POST https://api.smartletter.ai/webhooks/<id>/deliveries/<id>/retry \
  -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Response 202

{
  "object": "webhook_delivery",
  "id": "3e8b5d22-0000-4000-8000-000000000005",
  "msg_id": "msg_2f6c0e6a9b7d4c1e8f3a5b7c9d1e2f30",
  "webhook_id": "9a4c7e10-0000-4000-8000-000000000004",
  "event_type": "email.delivered",
  "status": "pending",
  "attempts": 1,
  "next_attempt_at": null,
  "last_status_code": 200,
  "last_response": "ok",
  "last_error": null,
  "last_duration_ms": 182,
  "payload": {
    "type": "email.delivered",
    "created_at": "2026-10-17T09:05:00.000Z",
    "data": {
      "email_id": "5b1f2c90-0000-4000-8000-000000000002"
    }
  },
  "delivered_at": "2026-10-17T09:05:01.000Z",
  "created_at": "2026-10-17T09:05:00.000Z"
}