SmoothDeploy Docs
API Reference

Email Inboxes

Use the SmoothDeploy API to list email inboxes and messages, read message content, and delete messages. Inboxes are org-scoped and need only x-api-key.

Email inboxes let your tests receive email and inspect the messages programmatically. Use these actions to list inboxes, poll for new messages, read message content, and clean up inboxes when you are done.

All email inbox actions require the x-api-key header. They do not require x-project-id — inboxes are organization-scoped, not project-scoped.

For inbox management (creating inboxes) and the console workflow, see Email Inboxes.

Limits

LimitValue
Inboxes per organization5
Messages per inbox1 000 (oldest messages are evicted when the limit is reached)
Message retention12 hours
Body size128 KB per field (bodyText, bodyHtml)

List Inboxes

GET /v1/actions/email-inboxes.list

Scope: emailInbox:read

Returns all inboxes in your organization.

Response

{
  "data": [
    {
      "id": "01932f1a-0000-7000-a000-000000000001",
      "address": "a1b2c3d4e5f6g7h8@inbox.smoothdeploy.com",
      "name": "signup-flow",
      "createdAt": "2026-09-01T10:00:00.000Z",
      "messageCount": 3
    }
  ]
}
FieldNotes
idUUID of the inbox
addressFull email address to send messages to
nameOptional display name set when the inbox was created
createdAtISO 8601 timestamp
messageCountNumber of messages currently stored in the inbox

List Messages

GET /v1/actions/email-messages.list

Scope: emailInbox:read

Returns messages in an inbox, ordered newest first, with pagination. inboxId accepts either the inbox UUID or its full email address.

Query Parameters

ParameterTypeNotes
inboxIdstring (required)Inbox UUID or full email address.
sinceISO 8601 datetime (optional)Return only messages received at or after this time. Useful for polling. Example: 2026-09-01T10:05:00.000Z
limitinteger (optional)Number of messages per page. Default 50, max 1000.
pageinteger (optional)Zero-based page index. Default 0.

Response

{
  "data": [
    {
      "id": "01932f1a-0000-7000-b000-000000000002",
      "fromAddress": "noreply@example.com",
      "subject": "Confirm your email address",
      "bodyText": "Click here to confirm: https://example.com/confirm?token=abc123",
      "bodyHtml": "<p>Click <a href=\"https://example.com/confirm?token=abc123\">here</a> to confirm.</p>",
      "receivedAt": "2026-09-01T10:04:30.000Z",
      "urls": ["https://example.com/confirm?token=abc123"]
    }
  ],
  "pagination": {
    "page": 0,
    "limit": 50,
    "total": 3,
    "totalPages": 1,
    "hasMore": false
  }
}
FieldNotes
idUUID of the message
fromAddressSender address
subjectEmail subject line
bodyTextPlain-text version of the body
bodyHtmlHTML version of the body
receivedAtISO 8601 timestamp when the message arrived
urlsAll https:// and http:// links extracted from bodyHtml. Useful for grabbing confirmation links without parsing HTML.
pagination.pageCurrent zero-based page index
pagination.limitPage size used for this response
pagination.totalTotal number of matching messages
pagination.totalPagesTotal number of pages
pagination.hasMoretrue if there is a next page

Example — Poll Until a Message Arrives

API_KEY="sd_..."
INBOX_ID="01932f1a-0000-7000-a000-000000000001"
SINCE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")

while :; do
  COUNT=$(curl -s "https://api.smoothdeploy.com/v1/actions/email-messages.list?inboxId=$INBOX_ID&since=$SINCE" \
    -H "x-api-key: $API_KEY" | jq '.data | length')
  [ "$COUNT" -gt 0 ] && break
  sleep 2
done

curl -s "https://api.smoothdeploy.com/v1/actions/email-messages.list?inboxId=$INBOX_ID&since=$SINCE" \
  -H "x-api-key: $API_KEY" | jq '.data[0].urls[0]'

Get Message

GET /v1/actions/email-messages.get

Scope: emailInbox:read

Returns a single message by ID.

Query Parameters

ParameterTypeNotes
inboxIdstring (required)Inbox UUID or full email address.
messageIdUUID (required)The message to read.

Response

{
  "data": {
    "id": "01932f1a-0000-7000-b000-000000000002",
    "inboxId": "01932f1a-0000-7000-a000-000000000001",
    "organizationId": "01932f1a-0000-7000-c000-000000000003",
    "sesMessageId": "0100018f2c3d4e5f-example-000000",
    "fromAddress": "noreply@example.com",
    "subject": "Confirm your email address",
    "bodyText": "Click here to confirm: https://example.com/confirm?token=abc123",
    "bodyHtml": "<p>Click <a href=\"https://example.com/confirm?token=abc123\">here</a> to confirm.</p>",
    "receivedAt": "2026-09-01T10:04:30.000Z",
    "createdAt": "2026-09-01T10:04:31.000Z"
  }
}

Note: the single-message response does not include urls. Parse bodyHtml directly if you need links.

Returns 404 if the message does not exist or belongs to a different inbox or organization.


Delete Inbox

DELETE /v1/actions/email-inboxes.delete

Scope: emailInbox:delete

Permanently deletes an inbox and all its messages.

Body

FieldRequiredNotes
inboxIdyesInbox UUID or full email address.

Requires an active subscription. A lapsed or missing subscription returns 403 { "error": "LICENSE_REQUIRED" }.

Response

{ "data": null }

Returns 404 if the inbox does not exist in your organization.