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
| Limit | Value |
|---|---|
| Inboxes per organization | 5 |
| Messages per inbox | 1 000 (oldest messages are evicted when the limit is reached) |
| Message retention | 12 hours |
| Body size | 128 KB per field (bodyText, bodyHtml) |
List Inboxes
GET /v1/actions/email-inboxes.listScope: 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
}
]
}| Field | Notes |
|---|---|
id | UUID of the inbox |
address | Full email address to send messages to |
name | Optional display name set when the inbox was created |
createdAt | ISO 8601 timestamp |
messageCount | Number of messages currently stored in the inbox |
List Messages
GET /v1/actions/email-messages.listScope: 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
| Parameter | Type | Notes |
|---|---|---|
inboxId | string (required) | Inbox UUID or full email address. |
since | ISO 8601 datetime (optional) | Return only messages received at or after this time. Useful for polling. Example: 2026-09-01T10:05:00.000Z |
limit | integer (optional) | Number of messages per page. Default 50, max 1000. |
page | integer (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
}
}| Field | Notes |
|---|---|
id | UUID of the message |
fromAddress | Sender address |
subject | Email subject line |
bodyText | Plain-text version of the body |
bodyHtml | HTML version of the body |
receivedAt | ISO 8601 timestamp when the message arrived |
urls | All https:// and http:// links extracted from bodyHtml. Useful for grabbing confirmation links without parsing HTML. |
pagination.page | Current zero-based page index |
pagination.limit | Page size used for this response |
pagination.total | Total number of matching messages |
pagination.totalPages | Total number of pages |
pagination.hasMore | true 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.getScope: emailInbox:read
Returns a single message by ID.
Query Parameters
| Parameter | Type | Notes |
|---|---|---|
inboxId | string (required) | Inbox UUID or full email address. |
messageId | UUID (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.deleteScope: emailInbox:delete
Permanently deletes an inbox and all its messages.
Body
| Field | Required | Notes |
|---|---|---|
inboxId | yes | Inbox 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.
Test Runs
Query test run status, fetch results and artifact URLs, cancel runs, and rerun using the SmoothDeploy API. All actions require testRuns:read.
Webhooks
Configure SmoothDeploy webhooks to receive a signed JSON POST when a run completes or fails. Covers payload format, signature verification, and URL rules.