SendlySendly
API ReferenceEmails

Send a sandbox test email

POST
/api/v1/emails/test

Prove that sending works — before any domain, DNS record or verification exists.

The message is sent FROM this project's sandbox address (sandbox_address on GET /api/v1/projects) and can only reach ONE recipient: the project owner's own verified account email, which is also what to defaults to. Naming any other recipient answers 403, and naming a from answers 422 — the sender is resolved server-side and a request that expects a different one is refused rather than quietly re-addressed.

That restriction is the reason emails:test is a separate, non-sensitive scope: a call under it cannot put mail in a stranger's inbox, so it can sit in a default grant where emails:send may not. It is not a way to send real mail cheaply — use POST /api/v1/emails for that.

Sandbox sends are capped per project per day, and the response's sandbox: true marks the receipt so a relayed summary cannot pass a test send off as a real one.

Requires the emails:test scope — Send test emails to your own address from the Sendly sandbox.

Authorization

AuthorizationBearer <token>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body for POST /api/v1/emails/test. subject and body are required; to defaults to the project owner's verified email, and from is refused.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1/emails/test" \  -H "Content-Type: application/json" \  -d '{    "subject": "string",    "body": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "status": "PENDING",
  "to": "user@example.com",
  "from": "user@example.com",
  "sandbox": true
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "errors": [
    {
      "pointer": "string",
      "code": "string",
      "message": "string"
    }
  ]
}