GET/api/v1/emails
Stored emails, newest first, with search and filters.
- CLI
sendmock email list- MCP tool
sendmock_email_list- In the app
Answer
200 PageOf_EmailSummary
/api/v1/emailsStored emails, newest first, with search and filters.
sendmock email listsendmock_email_list200 PageOf_EmailSummary
/api/v1/emailsDelete every email, or only those that match the filters.
sendmock email delete-all --yessendmock_email_delete_all204 No content
/api/v1/emails/latestThe newest email to a recipient.
sendmock email latest --to <address>sendmock_email_latest200 EmailDetail
Errors: 404, as { error: { code, message } }
/api/v1/emails/inboundCreate an incoming email from fields or raw MIME; fires email.inbound.
sendmock email inboundsendmock_email_inboundEmailInboundRequest : Body of POST /api/v1/emails/inbound: an incoming email from fields, or raw MIME in `raw`.
| Field | Type | Description |
|---|---|---|
| from? | string | The sender, as an address or Name <address>.Example: Sam <[email protected]> |
| to? | string[] | The recipients, usually your app's inbound address. |
| subject? | string | The subject line.Example: Order arrived damaged |
| text? | string | The plain-text body.Example: The box was crushed, can I get a replacement? |
| html? | string | The HTML body.Example: <p>The box was crushed, can I get a replacement?</p> |
| raw? | string | A whole message (RFC 5322); when set, the other fields are ignored.Example: From: [email protected]
To: [email protected]
Subject: Hi
Hello |
| webhook_endpoint_ids? | Ulid[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide. |
| webhook_requests? | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads. |
201 NativeSendResult
Errors: 400, as { error: { code, message } }
/api/v1/emails/{emailId}One email with bodies, headers, attachments and extracted codes.
sendmock email show <emailId>sendmock_email_get200 EmailDetail
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}Mark read or unread, or change tags.
sendmock email update <emailId>sendmock_email_updateEmailUpdate
| Field | Type | Description |
|---|---|---|
| is_read? | boolean | Marks the email as read (true) or unread (false).Example: true |
| tags? | string[] | Replaces the email's tags; an empty list removes them all. |
200 EmailSummary
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}Delete one email.
sendmock email delete <emailId>sendmock_email_delete204 No content
/api/v1/emails/{emailId}/timelineDelivery events: received, delivered, opened, bounced.
sendmock email timeline <emailId>sendmock_email_timeline200 EmailTimelineEntry[]
/api/v1/emails/{emailId}/html-checkHTML and CSS support across email clients.
sendmock email check <emailId> htmlsendmock_email_check200 HtmlCheckReport
/api/v1/emails/{emailId}/list-unsubscribeList-Unsubscribe and one-click unsubscribe checks.
sendmock email check <emailId> unsubscribesendmock_email_check200 ListUnsubscribeReport
/api/v1/emails/{emailId}/mimeThe MIME tree of the message.
sendmock email mime <emailId>sendmock_email_mime200 MimePart
/api/v1/emails/{emailId}/mime/{partId}Download one MIME part, decoded, by its position in the MIME tree.
sendmock email mime-part <emailId> <partId>sendmock://emails/{emailId}/mime/{partId}200 string (application/octet-stream)
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}/rawThe raw message source.
sendmock email raw <emailId>sendmock://emails/{emailId}/raw200 string (message/rfc822)
/api/v1/emails/{emailId}/attachments/{attachmentIndex}Download one attachment.
sendmock email attachments <emailId> <attachmentIndex>sendmock://emails/{emailId}/attachments/{attachmentIndex}200 string (application/octet-stream)
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}/parts/{attachmentIndex}/thumbnailA preview image of an attachment.
sendmock email thumbnail <emailId> <attachmentIndex>sendmock://emails/{emailId}/parts/{attachmentIndex}/thumbnail200 string (image/*)
/api/v1/emails/{emailId}/link-checkCheck every link in the message.
sendmock email check <emailId> linkssendmock_email_check200 LinkCheckResult[]
/api/v1/emails/{emailId}/spam-checkScore the message with the spam rules.
sendmock email check <emailId> spamsendmock_email_check200 SpamCheckReport
/api/v1/emails/{emailId}/openRecord an open and fire email.opened.
sendmock email open <emailId>sendmock_email_openOpenEventRequest : Body of `POST /emails/{emailId}/open` and `POST /sms/{smsId}/open`.
| Field | Type | Description |
|---|---|---|
| source? | OpenSource | Who opened it: ui (the SendMock UI), manual (a person marking it) or api (a script). Defaults to api.One of: ui, manual, apiExample: api |
| user_agent? | string | The browser or client that opened it, kept in the open history. The UI sends its own.Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) |
| webhook_endpoint_ids? | Ulid[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide. |
| webhook_requests? | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads. |
204 No content
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}/opensEvery recorded open of the email, oldest first.
sendmock email opens <emailId>sendmock_email_opens200 OpenRecord[]
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}/clicksRecord a click on one of the email's links and fire email.clicked.
sendmock email click <emailId>sendmock_email_clickEmailClickRequest : Body of `POST /emails/{emailId}/clicks`.
| Field | Type | Description |
|---|---|---|
| url | string | The link that was clicked; one of the email's links ( extracted.links).Example: https://app.test/verify?token=abc123 |
| source? | OpenSource | Who clicked it: ui (a link in the preview), manual (Simulate click) or api (a script). Defaults to api.One of: ui, manual, apiExample: api |
| user_agent? | string | The browser or client that clicked, kept in the click history. The UI sends its own.Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) |
| webhook_endpoint_ids? | Ulid[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide. |
| webhook_requests? | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads. |
204 No content
Errors: 404, 422, as { error: { code, message } }
/api/v1/emails/{emailId}/clicksEvery recorded click on the email's links, newest first.
sendmock email clicks <emailId>sendmock_email_clicks200 EmailClickRecord[]
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}/releaseSend the email on through the allowlisted relay.
sendmock email release <emailId>sendmock_email_releaseEmailReleaseRequest : Body of `POST /emails/{emailId}/release`; empty sends to the original recipients.
| Field | Type | Description |
|---|---|---|
| to? | string[] | Who receives it on the real SMTP server; empty sends to the original recipients. Every address must match the release allowlist. |
204 No content
Errors: 400, as { error: { code, message } }
/api/v1/emails/{emailId}/simulateSimulate a delivery outcome such as a bounce or complaint.
sendmock email simulate <emailId> <event>sendmock_email_simulateSimulatedEmailOutcome
| Field | Type | Description |
|---|---|---|
| event | EmailDeliveryStatus | The delivery event to simulate; it is added to the timeline and fires its webhook.One of: delivered, deferred, bounced, complained, unsubscribedExample: bounced |
| bounce_type? | "hard" | "soft" | For bounced only: a hard bounce (the address does not exist) or a soft one (try again later).One of: hard, softExample: hard |
| webhook_endpoint_ids? | Ulid[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide. |
| webhook_requests? | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads. |
204 No content
Errors: 404, as { error: { code, message } }
/api/v1/emails/{emailId}/replyReply as the recipient; the reply arrives as inbound email.
sendmock email reply <emailId>sendmock_email_replyEmailReplyRequest : Body of POST /api/v1/emails/{emailId}/reply (simulate the recipient replying).
| Field | Type | Description |
|---|---|---|
| body? | string | The reply text, above the quoted original; empty or left out sends no text of its own.Example: Thanks, that fixed it! |
| from? | string | Who replies; defaults to the original recipient.Example: [email protected] |
| subject? | string | Defaults to Re: <original subject>.Example: Re: Ticket #318 updated |
| reply_all? | boolean | Also sends to the other original recipients, in Cc.Example: false |
| include_original? | boolean | Quotes the original below an "On ... wrote:" line (default true).Example: true |
| webhook_endpoint_ids? | Ulid[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide. |
| webhook_requests? | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads. |
201 EmailDetail
Errors: 400, as { error: { code, message } }
/api/v1/emails/{emailId}/forwardForward as the recipient; the copy arrives as inbound email.
sendmock email forward <emailId>sendmock_email_forwardEmailForwardRequest : Body of POST /api/v1/emails/{emailId}/forward (simulate the recipient forwarding).
| Field | Type | Description |
|---|---|---|
| to | string | Where the email is forwarded, e.g. your app's inbound address.Example: [email protected] |
| body? | string | A note above the forwarded message.Example: Can you look at this one? |
| from? | string | Who forwards; defaults to the original recipient.Example: [email protected] |
| subject? | string | Defaults to Fwd: <original subject>.Example: Fwd: Your invoice |
| include_original? | boolean | Adds the original below a "Forwarded message" block (default true).Example: true |
| include_attachments? | boolean | Forwards the original attachments too (default true).Example: true |
| webhook_endpoint_ids? | Ulid[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide. |
| webhook_requests? | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads. |
201 EmailDetail
Errors: 400, as { error: { code, message } }
/api/v1/sendNative send: JSON with optional base64 attachments.
sendmock email sendsendmock_email_sendNativeSendRequest : Body of POST /api/v1/send (native HTTP send API).
| Field | Type | Description |
|---|---|---|
| from | string | The sender, as an address or Name <address>.Example: Shop <[email protected]> |
| to | string[] | The recipients. |
| cc? | string[] | Copy recipients. |
| bcc? | string[] | Hidden copy recipients; stored with the email but not in its headers. |
| subject | string | The subject line.Example: Your order #1042 has shipped |
| text? | string | The plain-text body. Send text, html or both.Example: Hi Sam, your order is on its way. |
| html? | string | The HTML body. Send text, html or both.Example: <p>Hi Sam, your order is <b>on its way</b>.</p> |
| headers? | object | Extra headers, by name. |
| tags? | string[] | Tags to file the email under in Mail. |
| attachments? | NativeSendAttachment[] | Files to attach. |
201 NativeSendResult
Errors: 400, as { error: { code, message } }
/api/v1/send/rawStore a raw message as sent by your app, as the sendmail shim does.
sendmock sendmailsendmock_email_send_rawstring
201 NativeSendResult
Errors: 400, as { error: { code, message } }