{"files":{"SKILL.md":"---\nname: resend\ndescription: \"Resend API skill. Use when working with Resend for emails, domains, api-keys. Covers 142 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Resend\nAPI version: 1.5.1\n\n## Auth\nBearer bearer\n\n## Base URL\nhttps://api.resend.com\n\n## Setup\n1. Set Authorization header with your Bearer token\n2. GET /emails -- verify access\n3. POST /emails -- create first emails\n\n## Endpoints\n\n142 endpoints across 18 groups. See references/api-spec.lap for full details.\n\n### emails\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /emails | Send an email |\n| GET | /emails | Retrieve a list of emails |\n| GET | /emails/{email_id} | Retrieve a single email |\n| PATCH | /emails/{email_id} | Update a single email |\n| POST | /emails/{email_id}/cancel | Cancel the schedule of the e-mail. |\n| POST | /emails/{email_id}/share | Create a shareable link for a sent or received email. |\n| POST | /emails/batch | Trigger up to 100 batch emails at once. |\n| GET | /emails/{email_id}/attachments | Retrieve a list of attachments for a sent email |\n| GET | /emails/{email_id}/attachments/{attachment_id} | Retrieve a single attachment for a sent email |\n| GET | /emails/receiving | Retrieve a list of received emails |\n| GET | /emails/receiving/{email_id} | Retrieve a single received email |\n| GET | /emails/receiving/{email_id}/attachments | Retrieve a list of attachments for a received email |\n| GET | /emails/receiving/{email_id}/attachments/{attachment_id} | Retrieve a single attachment for a received email |\n| GET | /emails/metrics | Retrieve account-level email metrics |\n\n### domains\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /domains | Create a new domain |\n| GET | /domains | Retrieve a list of domains |\n| GET | /domains/{domain_id} | Retrieve a single domain |\n| PATCH | /domains/{domain_id} | Update an existing domain |\n| DELETE | /domains/{domain_id} | Remove an existing domain |\n| POST | /domains/{domain_id}/verify | Verify an existing domain |\n| POST | /domains/claim | Claim a domain |\n| GET | /domains/{domain_id}/claim | Retrieve a domain claim |\n| POST | /domains/{domain_id}/claim/verify | Verify a domain claim |\n\n### api-keys\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /api-keys | Create a new API key |\n| GET | /api-keys | Retrieve a list of API keys |\n| PATCH | /api-keys/{api_key_id} | Update an existing API key |\n| DELETE | /api-keys/{api_key_id} | Remove an existing API key |\n\n### oauth\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /oauth/grants | Retrieve a list of OAuth grants |\n| DELETE | /oauth/grants/{oauth_grant_id} | Revoke an OAuth grant |\n\n### templates\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /templates | Create a template |\n| GET | /templates | Retrieve a list of templates |\n| GET | /templates/{id} | Retrieve a single template |\n| PATCH | /templates/{id} | Update an existing template |\n| DELETE | /templates/{id} | Remove an existing template |\n| POST | /templates/{id}/publish | Publish a template |\n| POST | /templates/{id}/duplicate | Duplicate a template |\n\n### audiences\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /audiences | Create a list of contacts |\n| GET | /audiences | Retrieve a list of audiences |\n| DELETE | /audiences/{id} | Remove an existing audience |\n| GET | /audiences/{id} | Retrieve a single audience |\n\n### contacts\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /contacts | Create a new contact |\n| GET | /contacts | Retrieve a list of contacts |\n| POST | /contacts/imports | Create a contact import |\n| GET | /contacts/imports | Retrieve a list of contact imports |\n| GET | /contacts/imports/{id} | Retrieve a single contact import |\n| GET | /contacts/{id} | Retrieve a single contact by ID or email |\n| PATCH | /contacts/{id} | Update a single contact by ID or email |\n| DELETE | /contacts/{id} | Remove an existing contact by ID or email |\n| GET | /contacts/{contact_id}/segments | Retrieve a list of segments for a contact |\n| POST | /contacts/{contact_id}/segments/{segment_id} | Add a contact to a segment |\n| DELETE | /contacts/{contact_id}/segments/{segment_id} | Remove a contact from a segment |\n| GET | /contacts/{contact_id}/topics | Retrieve topics for a contact |\n| PATCH | /contacts/{contact_id}/topics | Update topics for a contact |\n\n### broadcasts\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /broadcasts | Create a broadcast |\n| GET | /broadcasts | Retrieve a list of broadcasts |\n| DELETE | /broadcasts/{id} | Remove an existing broadcast that is in the draft status |\n| GET | /broadcasts/{id} | Retrieve a single broadcast |\n| PATCH | /broadcasts/{id} | Update an existing broadcast |\n| POST | /broadcasts/{id}/send | Send or schedule a broadcast |\n| POST | /broadcasts/{id}/cancel | Cancel a broadcast |\n| POST | /broadcasts/{id}/duplicate | Duplicate a broadcast |\n| GET | /broadcasts/{id}/recipients | Retrieve broadcast recipients |\n| GET | /broadcasts/{id}/clicked-links | Retrieve a broadcast's clicked links |\n\n### webhooks\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /webhooks | Create a new webhook |\n| GET | /webhooks | Retrieve a list of webhooks |\n| GET | /webhooks/{webhook_id} | Retrieve a single webhook |\n| PATCH | /webhooks/{webhook_id} | Update an existing webhook |\n| DELETE | /webhooks/{webhook_id} | Remove an existing webhook |\n| POST | /webhooks/{webhook_id}/signing-secret/rotate | Rotate a webhook signing secret |\n| GET | /webhooks/{webhook_id}/events | Retrieve a list of webhook events |\n| GET | /webhooks/{webhook_id}/events/{event_id} | Retrieve a single webhook event |\n| POST | /webhooks/{webhook_id}/events/{event_id}/replay | Replay a webhook event |\n| GET | /webhooks/{webhook_id}/events/{event_id}/attempts | Retrieve a list of webhook event attempts |\n\n### segments\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /segments | Create a new segment |\n| GET | /segments | Retrieve a list of segments |\n| GET | /segments/{id} | Retrieve a single segment |\n| PATCH | /segments/{id} | Update an existing segment |\n| DELETE | /segments/{id} | Remove an existing segment |\n| GET | /segments/{id}/contacts | Retrieve a list of contacts in a segment |\n\n### topics\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /topics | Create a new topic |\n| GET | /topics | Retrieve a list of topics |\n| GET | /topics/{id} | Retrieve a single topic |\n| PATCH | /topics/{id} | Update an existing topic |\n| DELETE | /topics/{id} | Remove an existing topic |\n\n### contact-properties\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /contact-properties | Create a new contact property |\n| GET | /contact-properties | Retrieve a list of contact properties |\n| GET | /contact-properties/{id} | Retrieve a single contact property |\n| PATCH | /contact-properties/{id} | Update an existing contact property |\n| DELETE | /contact-properties/{id} | Remove an existing contact property |\n\n### logs\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /logs | Retrieve a list of logs |\n| GET | /logs/{log_id} | Retrieve a single log |\n\n### automations\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /automations | Create an automation |\n| GET | /automations | Retrieve a list of automations |\n| GET | /automations/{automation_id} | Retrieve a single automation |\n| PATCH | /automations/{automation_id} | Update an automation |\n| DELETE | /automations/{automation_id} | Delete an automation |\n| POST | /automations/{automation_id}/duplicate | Duplicate an automation |\n| POST | /automations/{automation_id}/stop | Stop an automation |\n| GET | /automations/{automation_id}/runs | Retrieve a list of automation runs |\n| GET | /automations/{automation_id}/runs/{run_id} | Retrieve a single automation run |\n\n### events\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /events | Create an event |\n| GET | /events | Retrieve a list of events |\n| POST | /events/send | Send an event |\n| GET | /events/{identifier} | Retrieve a single event |\n| PATCH | /events/{identifier} | Update an event |\n| DELETE | /events/{identifier} | Delete an event |\n\n### suppressions\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /suppressions | Create a suppression |\n| GET | /suppressions | Retrieve a list of suppressions |\n| POST | /suppressions/batch/add | Add up to 100 suppressions at once |\n| POST | /suppressions/batch/remove | Remove up to 100 suppressions at once |\n| GET | /suppressions/{suppression} | Retrieve a single suppression by ID or email |\n| DELETE | /suppressions/{suppression} | Remove a single suppression by ID or email |\n\n### usage\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /usage | Retrieve account usage |\n\n### inboxes\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /inboxes | Create an inbox |\n| GET | /inboxes | Retrieve a list of inboxes |\n| GET | /inboxes/{inbox_id} | Retrieve a single inbox by ID or email address |\n| PATCH | /inboxes/{inbox_id} | Update an existing inbox by ID or email address |\n| DELETE | /inboxes/{inbox_id} | Remove an existing inbox by ID or email address |\n| GET | /inboxes/{inbox_id}/agent | Retrieve the agent settings for an inbox |\n| PATCH | /inboxes/{inbox_id}/agent | Update the agent settings for an inbox |\n| GET | /inboxes/{inbox_id}/labels | Retrieve a list of inbox labels |\n| POST | /inboxes/{inbox_id}/labels | Create a label on an inbox |\n| PATCH | /inboxes/{inbox_id}/labels/{label_id} | Update an existing inbox label |\n| DELETE | /inboxes/{inbox_id}/labels/{label_id} | Remove an existing inbox label |\n| GET | /inboxes/{inbox_id}/threads | Retrieve a list of inbox threads |\n| GET | /inboxes/{inbox_id}/threads/search | Search the threads of an inbox |\n| GET | /inboxes/{inbox_id}/threads/{thread_id} | Retrieve a single inbox thread |\n| PATCH | /inboxes/{inbox_id}/threads/{thread_id} | Update an existing inbox thread |\n| DELETE | /inboxes/{inbox_id}/threads/{thread_id} | Remove an existing inbox thread |\n| POST | /inboxes/{inbox_id}/threads/{thread_id}/labels | Add labels to an inbox thread |\n| PUT | /inboxes/{inbox_id}/threads/{thread_id}/labels | Set the labels of an inbox thread |\n| DELETE | /inboxes/{inbox_id}/threads/{thread_id}/labels/{label_id} | Remove a label from an inbox thread |\n| GET | /inboxes/{inbox_id}/threads/{thread_id}/emails | Retrieve a list of thread emails |\n| GET | /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id} | Retrieve a single thread email |\n| POST | /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/reply | Reply to a thread email |\n| POST | /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/forward | Forward a thread email |\n| GET | /inboxes/{inbox_id}/drafts | Retrieve a list of drafts |\n| POST | /inboxes/{inbox_id}/drafts | Create a draft |\n| GET | /inboxes/{inbox_id}/drafts/{draft_id} | Retrieve a single draft |\n| PATCH | /inboxes/{inbox_id}/drafts/{draft_id} | Update an existing draft |\n| DELETE | /inboxes/{inbox_id}/drafts/{draft_id} | Remove an existing draft |\n| POST | /inboxes/{inbox_id}/drafts/{draft_id}/send | Send a draft |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a email?\" -> POST /emails\n- \"List all emails?\" -> GET /emails\n- \"Get email details?\" -> GET /emails/{email_id}\n- \"Partially update a email?\" -> PATCH /emails/{email_id}\n- \"Create a cancel?\" -> POST /emails/{email_id}/cancel\n- \"Create a share?\" -> POST /emails/{email_id}/share\n- \"Create a batch?\" -> POST /emails/batch\n- \"List all attachments?\" -> GET /emails/{email_id}/attachments\n- \"Get attachment details?\" -> GET /emails/{email_id}/attachments/{attachment_id}\n- \"List all receiving?\" -> GET /emails/receiving\n- \"Get receiving details?\" -> GET /emails/receiving/{email_id}\n- \"List all attachments?\" -> GET /emails/receiving/{email_id}/attachments\n- \"Get attachment details?\" -> GET /emails/receiving/{email_id}/attachments/{attachment_id}\n- \"List all metrics?\" -> GET /emails/metrics\n- \"Create a domain?\" -> POST /domains\n- \"List all domains?\" -> GET /domains\n- \"Get domain details?\" -> GET /domains/{domain_id}\n- \"Partially update a domain?\" -> PATCH /domains/{domain_id}\n- \"Delete a domain?\" -> DELETE /domains/{domain_id}\n- \"Create a verify?\" -> POST /domains/{domain_id}/verify\n- \"Create a claim?\" -> POST /domains/claim\n- \"List all claim?\" -> GET /domains/{domain_id}/claim\n- \"Create a verify?\" -> POST /domains/{domain_id}/claim/verify\n- \"Create a api-key?\" -> POST /api-keys\n- \"List all api-keys?\" -> GET /api-keys\n- \"Partially update a api-key?\" -> PATCH /api-keys/{api_key_id}\n- \"Delete a api-key?\" -> DELETE /api-keys/{api_key_id}\n- \"List all grants?\" -> GET /oauth/grants\n- \"Delete a grant?\" -> DELETE /oauth/grants/{oauth_grant_id}\n- \"Create a template?\" -> POST /templates\n- \"List all templates?\" -> GET /templates\n- \"Get template details?\" -> GET /templates/{id}\n- \"Partially update a template?\" -> PATCH /templates/{id}\n- \"Delete a template?\" -> DELETE /templates/{id}\n- \"Create a publish?\" -> POST /templates/{id}/publish\n- \"Create a duplicate?\" -> POST /templates/{id}/duplicate\n- \"Create a audience?\" -> POST /audiences\n- \"List all audiences?\" -> GET /audiences\n- \"Delete a audience?\" -> DELETE /audiences/{id}\n- \"Get audience details?\" -> GET /audiences/{id}\n- \"Create a contact?\" -> POST /contacts\n- \"List all contacts?\" -> GET /contacts\n- \"Create a import?\" -> POST /contacts/imports\n- \"List all imports?\" -> GET /contacts/imports\n- \"Get import details?\" -> GET /contacts/imports/{id}\n- \"Get contact details?\" -> GET /contacts/{id}\n- \"Partially update a contact?\" -> PATCH /contacts/{id}\n- \"Delete a contact?\" -> DELETE /contacts/{id}\n- \"Create a broadcast?\" -> POST /broadcasts\n- \"List all broadcasts?\" -> GET /broadcasts\n- \"Delete a broadcast?\" -> DELETE /broadcasts/{id}\n- \"Get broadcast details?\" -> GET /broadcasts/{id}\n- \"Partially update a broadcast?\" -> PATCH /broadcasts/{id}\n- \"Create a send?\" -> POST /broadcasts/{id}/send\n- \"Create a cancel?\" -> POST /broadcasts/{id}/cancel\n- \"Create a duplicate?\" -> POST /broadcasts/{id}/duplicate\n- \"List all recipients?\" -> GET /broadcasts/{id}/recipients\n- \"List all clicked-links?\" -> GET /broadcasts/{id}/clicked-links\n- \"Create a webhook?\" -> POST /webhooks\n- \"List all webhooks?\" -> GET /webhooks\n- \"Get webhook details?\" -> GET /webhooks/{webhook_id}\n- \"Partially update a webhook?\" -> PATCH /webhooks/{webhook_id}\n- \"Delete a webhook?\" -> DELETE /webhooks/{webhook_id}\n- \"Create a rotate?\" -> POST /webhooks/{webhook_id}/signing-secret/rotate\n- \"List all events?\" -> GET /webhooks/{webhook_id}/events\n- \"Get event details?\" -> GET /webhooks/{webhook_id}/events/{event_id}\n- \"Create a replay?\" -> POST /webhooks/{webhook_id}/events/{event_id}/replay\n- \"List all attempts?\" -> GET /webhooks/{webhook_id}/events/{event_id}/attempts\n- \"Create a segment?\" -> POST /segments\n- \"List all segments?\" -> GET /segments\n- \"Get segment details?\" -> GET /segments/{id}\n- \"Partially update a segment?\" -> PATCH /segments/{id}\n- \"Delete a segment?\" -> DELETE /segments/{id}\n- \"List all contacts?\" -> GET /segments/{id}/contacts\n- \"Create a topic?\" -> POST /topics\n- \"List all topics?\" -> GET /topics\n- \"Get topic details?\" -> GET /topics/{id}\n- \"Partially update a topic?\" -> PATCH /topics/{id}\n- \"Delete a topic?\" -> DELETE /topics/{id}\n- \"Create a contact-property?\" -> POST /contact-properties\n- \"List all contact-properties?\" -> GET /contact-properties\n- \"Get contact-property details?\" -> GET /contact-properties/{id}\n- \"Partially update a contact-property?\" -> PATCH /contact-properties/{id}\n- \"Delete a contact-property?\" -> DELETE /contact-properties/{id}\n- \"List all segments?\" -> GET /contacts/{contact_id}/segments\n- \"Delete a segment?\" -> DELETE /contacts/{contact_id}/segments/{segment_id}\n- \"List all topics?\" -> GET /contacts/{contact_id}/topics\n- \"List all logs?\" -> GET /logs\n- \"Get log details?\" -> GET /logs/{log_id}\n- \"Create a automation?\" -> POST /automations\n- \"List all automations?\" -> GET /automations\n- \"Get automation details?\" -> GET /automations/{automation_id}\n- \"Partially update a automation?\" -> PATCH /automations/{automation_id}\n- \"Delete a automation?\" -> DELETE /automations/{automation_id}\n- \"Create a duplicate?\" -> POST /automations/{automation_id}/duplicate\n- \"Create a stop?\" -> POST /automations/{automation_id}/stop\n- \"List all runs?\" -> GET /automations/{automation_id}/runs\n- \"Get run details?\" -> GET /automations/{automation_id}/runs/{run_id}\n- \"Create a event?\" -> POST /events\n- \"List all events?\" -> GET /events\n- \"Create a send?\" -> POST /events/send\n- \"Get event details?\" -> GET /events/{identifier}\n- \"Partially update a event?\" -> PATCH /events/{identifier}\n- \"Delete a event?\" -> DELETE /events/{identifier}\n- \"Create a suppression?\" -> POST /suppressions\n- \"List all suppressions?\" -> GET /suppressions\n- \"Create a add?\" -> POST /suppressions/batch/add\n- \"Create a remove?\" -> POST /suppressions/batch/remove\n- \"Get suppression details?\" -> GET /suppressions/{suppression}\n- \"Delete a suppression?\" -> DELETE /suppressions/{suppression}\n- \"List all usage?\" -> GET /usage\n- \"Create a inboxe?\" -> POST /inboxes\n- \"List all inboxes?\" -> GET /inboxes\n- \"Get inboxe details?\" -> GET /inboxes/{inbox_id}\n- \"Partially update a inboxe?\" -> PATCH /inboxes/{inbox_id}\n- \"Delete a inboxe?\" -> DELETE /inboxes/{inbox_id}\n- \"List all agent?\" -> GET /inboxes/{inbox_id}/agent\n- \"List all labels?\" -> GET /inboxes/{inbox_id}/labels\n- \"Create a label?\" -> POST /inboxes/{inbox_id}/labels\n- \"Partially update a label?\" -> PATCH /inboxes/{inbox_id}/labels/{label_id}\n- \"Delete a label?\" -> DELETE /inboxes/{inbox_id}/labels/{label_id}\n- \"List all threads?\" -> GET /inboxes/{inbox_id}/threads\n- \"Search search?\" -> GET /inboxes/{inbox_id}/threads/search\n- \"Get thread details?\" -> GET /inboxes/{inbox_id}/threads/{thread_id}\n- \"Partially update a thread?\" -> PATCH /inboxes/{inbox_id}/threads/{thread_id}\n- \"Delete a thread?\" -> DELETE /inboxes/{inbox_id}/threads/{thread_id}\n- \"Create a label?\" -> POST /inboxes/{inbox_id}/threads/{thread_id}/labels\n- \"Delete a label?\" -> DELETE /inboxes/{inbox_id}/threads/{thread_id}/labels/{label_id}\n- \"List all emails?\" -> GET /inboxes/{inbox_id}/threads/{thread_id}/emails\n- \"Get email details?\" -> GET /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}\n- \"Create a reply?\" -> POST /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/reply\n- \"Create a forward?\" -> POST /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/forward\n- \"List all drafts?\" -> GET /inboxes/{inbox_id}/drafts\n- \"Create a draft?\" -> POST /inboxes/{inbox_id}/drafts\n- \"Get draft details?\" -> GET /inboxes/{inbox_id}/drafts/{draft_id}\n- \"Partially update a draft?\" -> PATCH /inboxes/{inbox_id}/drafts/{draft_id}\n- \"Delete a draft?\" -> DELETE /inboxes/{inbox_id}/drafts/{draft_id}\n- \"Create a send?\" -> POST /inboxes/{inbox_id}/drafts/{draft_id}/send\n- \"How to authenticate?\" -> See Auth section\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- List endpoints may support pagination; check for limit, offset, or cursor params\n- Create/update endpoints typically return the created/updated object\n\n## CLI\n\n```bash\n# Update this spec to the latest version\nnpx @lap-platform/lapsh get resend -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search resend\n```\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Resend\n@base https://api.resend.com\n@version 1.5.1\n@auth Bearer bearer\n@endpoints 142\n@hint download_for_search\n@toc emails(14), domains(9), api-keys(4), oauth(2), templates(7), audiences(4), contacts(13), broadcasts(10), webhooks(10), segments(6), topics(5), contact-properties(5), logs(2), automations(9), events(6), suppressions(6), usage(1), inboxes(29)\n\n@group emails\n@endpoint POST /emails\n@desc Send an email\n@required {from: str # Sender email address. To include a friendly name, use the format \"Your Name \"., to: any # Recipient email address. For multiple addresses, send as an array of strings. Max 50., subject: str # Email subject.}\n@optional {Idempotency-Key: str # A unique identifier for the request to ensure emails are only sent once. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys), bcc: any # Bcc recipient email address. For multiple addresses, send as an array of strings., cc: any # Cc recipient email address. For multiple addresses, send as an array of strings., reply_to: any # Reply-to email address. For multiple addresses, send as an array of strings., html: str # The HTML version of the message., text: str # The plain text version of the message., template: any, headers: map # Custom headers to add to the email., scheduled_at: str # Schedule email to be sent later. The date should be in ISO 8601 format., attachments: [map{content: str(binary), filename: str, path: str, content_type: str, content_id: str}], tags: [map{name: str, value: str}], topic_id: str # The topic ID to scope the email to. If the recipient is a contact and opted-in to the topic, the email is sent. If opted-out, the email is not sent. If the recipient is not a contact, the email is sent if the topic's default subscription is opt_in.}\n@returns(200) {id: str} # OK\n\n@endpoint GET /emails\n@desc Retrieve a list of emails\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /emails/{email_id}\n@desc Retrieve a single email\n@required {email_id: str # The ID of the email.}\n@returns(200) {object: str, id: str, message_id: str, to: [str], from: str, created_at: str, subject: str, html: str, text: str, bcc: [str], cc: [str], reply_to: [str], last_event: str} # OK\n\n@endpoint PATCH /emails/{email_id}\n@desc Update a single email\n@required {email_id: str # The ID of the email.}\n@returns(200) {scheduled_at: str} # OK\n\n@endpoint POST /emails/{email_id}/cancel\n@desc Cancel the schedule of the e-mail.\n@required {email_id: str # The ID of the email.}\n@returns(200) {object: str, id: str, message_id: str, to: [str], from: str, created_at: str, subject: str, html: str, text: str, bcc: [str], cc: [str], reply_to: [str], last_event: str} # OK\n\n@endpoint POST /emails/{email_id}/share\n@desc Create a shareable link for a sent or received email.\n@required {email_id: str # The ID of the email.}\n@optional {expires_in: str # How long the link stays valid for, as a duration like `10m`, `2 hours`, or `1 day`. Defaults to `48h` and cannot exceed 48 hours.}\n@returns(200) {object: str, id: str, url: str} # OK\n\n@endpoint POST /emails/batch\n@desc Trigger up to 100 batch emails at once.\n@optional {Idempotency-Key: str # A unique identifier for the request to ensure emails are only sent once. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys)}\n@returns(200) {data: [map]} # OK\n\n@endpoint GET /emails/{email_id}/attachments\n@desc Retrieve a list of attachments for a sent email\n@required {email_id: str(uuid) # The ID of the email.}\n@optional {limit: int # Maximum number of attachments to return., after: str(uuid) # Pagination cursor to fetch results after this attachment ID. Cannot be used with 'before'., before: str(uuid) # Pagination cursor to fetch results before this attachment ID. Cannot be used with 'after'.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /emails/{email_id}/attachments/{attachment_id}\n@desc Retrieve a single attachment for a sent email\n@required {email_id: str(uuid) # The ID of the email., attachment_id: str(uuid) # The ID of the attachment.}\n@returns(200) {object: str, id: str(uuid), filename: str?, content_type: str, content_id: str, content_disposition: str?, download_url: str, expires_at: str(date-time), size: int} # OK\n\n@endpoint GET /emails/receiving\n@desc Retrieve a list of received emails\n@optional {limit: int # Maximum number of received emails to return., after: str(uuid) # Pagination cursor to fetch results after this email ID. Cannot be used with 'before'., before: str(uuid) # Pagination cursor to fetch results before this email ID. Cannot be used with 'after'.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /emails/receiving/{email_id}\n@desc Retrieve a single received email\n@required {email_id: str(uuid) # The ID of the received email.}\n@returns(200) {object: str, id: str(uuid), to: [str], from: str, subject: str, message_id: str, bcc: [str]?, cc: [str]?, reply_to: [str]?, received_for: [str], html: str?, text: str?, headers: map?, created_at: str(date-time), attachments: [map]} # OK\n\n@endpoint GET /emails/receiving/{email_id}/attachments\n@desc Retrieve a list of attachments for a received email\n@required {email_id: str(uuid) # The ID of the received email.}\n@optional {limit: int # Maximum number of attachments to return., after: str(uuid) # Pagination cursor to fetch results after this attachment ID. Cannot be used with 'before'., before: str(uuid) # Pagination cursor to fetch results before this attachment ID. Cannot be used with 'after'.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /emails/receiving/{email_id}/attachments/{attachment_id}\n@desc Retrieve a single attachment for a received email\n@required {email_id: str(uuid) # The ID of the received email., attachment_id: str(uuid) # The ID of the attachment.}\n@returns(200) {object: str, id: str(uuid), filename: str?, content_type: str, content_id: str, content_disposition: str?, download_url: str, expires_at: str(date-time), size: int} # OK\n\n@endpoint GET /emails/metrics\n@desc Retrieve account-level email metrics\n@optional {start_date: str # The start of the date range, as an ISO 8601 date or datetime. Must be on or before `end_date`. Defaults to 6 days before `end_date`., end_date: str # The end of the date range, as an ISO 8601 date or datetime. Values in the future are clamped to the current time. Defaults to now., timezone: str=UTC # The IANA timezone (e.g. `America/New_York`) used to bucket periods when `period` is in `dimensions`., granularity: str(hourly/daily/weekly/monthly)=daily # The bucket size used when `period` is in `dimensions`. The date range can't produce more than 10,000 periods at the chosen granularity., metrics: [str] # List of metrics to include in the response. Defaults to all metrics. Accepts a comma-separated value, the parameter repeated, or a mix of both., dimensions: [str] # List of dimensions to break the response down by. `email` cannot be combined with `broadcast`. Defaults to `[]`, returning a single `totals` row for the whole range, with no `data`. Accepts a comma-separated value, the parameter repeated, or a mix of both., domain_id: [str(uuid)] # List of sending domain IDs to restrict the response to, up to 100. Accepts a comma-separated value, the parameter repeated, or a mix of both., email_id: [str(uuid)] # List of email IDs to restrict the response to, up to 100. Cannot be combined with the `broadcast` dimension or `broadcast_id`. Accepts a comma-separated value, the parameter repeated, or a mix of both., broadcast_id: [str(uuid)] # List of broadcast IDs to restrict the response to, up to 100. Cannot be combined with the `email` dimension or `email_id`. Accepts a comma-separated value, the parameter repeated, or a mix of both.}\n@returns(200) {object: str, start_date: str, end_date: str, metrics: [str], dimensions: [str], granularity: str, totals: map, data: [map]} # OK\n\n@endgroup\n\n@group domains\n@endpoint POST /domains\n@desc Create a new domain\n@required {name: str # The name of the domain you want to create.}\n@optional {region: str(us-east-1/eu-west-1/sa-east-1/ap-northeast-1)=us-east-1 # The region where emails will be sent from. Possible values are us-east-1 | eu-west-1 | sa-east-1 | ap-northeast-1, custom_return_path: str # For advanced use cases, choose a subdomain for the Return-Path address. Defaults to 'send' (i.e., send.yourdomain.tld)., open_tracking: bool # Track the open rate of each email., click_tracking: bool # Track clicks within the body of each HTML email., tls: str(opportunistic/enforced)=opportunistic # TLS mode. Opportunistic attempts secure connection but falls back to unencrypted. Enforced requires TLS or email won't be sent., capabilities: map{sending: str, receiving: str} # Configure the domain capabilities for sending and receiving emails. At least one capability must be enabled., tracking_subdomain: str # The subdomain to use for click and open tracking.}\n@returns(201) {id: str, name: str, created_at: str, status: str, capabilities: map{sending: str, receiving: str}, records: [map], region: str, open_tracking: bool, click_tracking: bool, tracking_subdomain: str} # OK\n\n@endpoint GET /domains\n@desc Retrieve a list of domains\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /domains/{domain_id}\n@desc Retrieve a single domain\n@required {domain_id: str # The ID of the domain.}\n@returns(200) {object: str, id: str, name: str, status: str, created_at: str, region: str, open_tracking: bool, click_tracking: bool, tracking_subdomain: str, capabilities: map{sending: str, receiving: str}, records: [map]} # OK\n\n@endpoint PATCH /domains/{domain_id}\n@desc Update an existing domain\n@required {domain_id: str # The ID of the domain.}\n@optional {open_tracking: bool # Track the open rate of each email., click_tracking: bool # Track clicks within the body of each HTML email., tls: str(opportunistic/enforced)=opportunistic # enforced | opportunistic., capabilities: map{sending: str, receiving: str} # Configure the domain capabilities for sending and receiving emails. At least one capability must be enabled., tracking_subdomain: str # The subdomain to use for click and open tracking.}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint DELETE /domains/{domain_id}\n@desc Remove an existing domain\n@required {domain_id: str # The ID of the domain.}\n@returns(200) {object: str, id: str, deleted: bool} # OK\n\n@endpoint POST /domains/{domain_id}/verify\n@desc Verify an existing domain\n@required {domain_id: str # The ID of the domain.}\n@returns(200) {object: str, id: str} # OK\n\n@endpoint POST /domains/claim\n@desc Claim a domain\n@required {name: str # The name of the domain you want to claim.}\n@optional {region: str(us-east-1/eu-west-1/sa-east-1/ap-northeast-1)=us-east-1 # The region where emails will be sent from. Possible values are us-east-1 | eu-west-1 | sa-east-1 | ap-northeast-1, custom_return_path: str=send # For advanced use cases, choose a subdomain for the Return-Path address. Defaults to 'send' (i.e., send.yourdomain.tld)., open_tracking: bool # Track the open rate of each email., click_tracking: bool # Track clicks within the body of each HTML email., tracking_subdomain: str # The subdomain to use for click and open tracking.}\n@returns(200) {object: str, id: str, name: str, status: str, domain_id: str?, region: str?, record: map{type: str, name: str, value: str, ttl: str}, blocked_reason: str?, failure_reason: str?, created_at: str, expires_at: str} # An identical pending claim already existed and was returned unchanged.\n@returns(201) {object: str, id: str, name: str, status: str, domain_id: str?, region: str?, record: map{type: str, name: str, value: str, ttl: str}, blocked_reason: str?, failure_reason: str?, created_at: str, expires_at: str} # Claim created.\n\n@endpoint GET /domains/{domain_id}/claim\n@desc Retrieve a domain claim\n@required {domain_id: str # The ID of the placeholder domain created by the claim.}\n@returns(200) {object: str, id: str, name: str, status: str, domain_id: str?, region: str?, record: map{type: str, name: str, value: str, ttl: str}, blocked_reason: str?, failure_reason: str?, created_at: str, expires_at: str} # OK\n\n@endpoint POST /domains/{domain_id}/claim/verify\n@desc Verify a domain claim\n@required {domain_id: str # The ID of the placeholder domain created by the claim.}\n@returns(200) {object: str, id: str, name: str, status: str, domain_id: str?, region: str?, record: map{type: str, name: str, value: str, ttl: str}, blocked_reason: str?, failure_reason: str?, created_at: str, expires_at: str} # OK\n\n@endgroup\n\n@group api-keys\n@endpoint POST /api-keys\n@desc Create a new API key\n@required {name: str # The API key name.}\n@optional {permission: str(full_access/sending_access) # The API key can have full access to Resend’s API or be only restricted to send emails. * full_access - Can create, delete, get, and update any resource. * sending_access - Can only send emails., domain_id: str # Restrict an API key to send emails only from a specific domain. Only used when the permission is sending_access.}\n@returns(201) {id: str, token: str} # OK\n\n@endpoint GET /api-keys\n@desc Retrieve a list of API keys\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint PATCH /api-keys/{api_key_id}\n@desc Update an existing API key\n@required {api_key_id: str # The API key ID., name: str # The API key name.}\n@returns(200) {object: str, id: str} # OK\n\n@endpoint DELETE /api-keys/{api_key_id}\n@desc Remove an existing API key\n@required {api_key_id: str # The API key ID.}\n@returns(200) {object: str, id: str, deleted: bool} # OK\n\n@endgroup\n\n@group oauth\n@endpoint GET /oauth/grants\n@desc Retrieve a list of OAuth grants\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint DELETE /oauth/grants/{oauth_grant_id}\n@desc Revoke an OAuth grant\n@required {oauth_grant_id: str # The OAuth grant ID.}\n@returns(200) {object: str, id: str, revoked_at: str(date-time), revoked_reason: str} # OK\n\n@endgroup\n\n@group templates\n@endpoint POST /templates\n@desc Create a template\n@required {name: str # The name of the template., html: str # The HTML version of the template.}\n@optional {alias: str # The alias of the template., from: str # Sender email address. To include a friendly name, use the format \"Your Name \"., subject: str # Email subject., reply_to: [str] # Reply-to email addresses., text: str # The plain text version of the template., variables: [map{key!: str, type!: str, fallback_value: any}]}\n@returns(201) {id: str, object: str} # OK\n\n@endpoint GET /templates\n@desc Retrieve a list of templates\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, data: [map], has_more: bool} # OK\n\n@endpoint GET /templates/{id}\n@desc Retrieve a single template\n@required {id: str # The Template ID or alias.}\n@returns(200) {object: str, id: str, current_version_id: str, name: str, alias: str, from: str, subject: str, reply_to: [str]?, html: str, text: str, variables: [map], created_at: str, updated_at: str, status: str, published_at: str?, has_unpublished_versions: bool} # OK\n\n@endpoint PATCH /templates/{id}\n@desc Update an existing template\n@required {id: str # The Template ID or alias.}\n@optional {name: str # The name of the template., alias: str # The alias of the template., from: str # Sender email address. To include a friendly name, use the format \"Your Name \"., subject: str # Email subject., reply_to: [str] # Reply-to email addresses., html: str # The HTML version of the template., text: str # The plain text version of the template., variables: [map{key!: str, type!: str, fallback_value: any}]}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint DELETE /templates/{id}\n@desc Remove an existing template\n@required {id: str # The Template ID or alias.}\n@returns(200) {object: str, id: str, deleted: bool} # OK\n\n@endpoint POST /templates/{id}/publish\n@desc Publish a template\n@required {id: str # The Template ID or alias.}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint POST /templates/{id}/duplicate\n@desc Duplicate a template\n@required {id: str # The Template ID or alias.}\n@returns(200) {id: str, object: str} # OK\n\n@endgroup\n\n@group audiences\n@endpoint POST /audiences\n@desc Create a list of contacts\n@required {name: str # The name of the audience you want to create.}\n@returns(201) {id: str, object: str, name: str} # OK\n\n@endpoint GET /audiences\n@desc Retrieve a list of audiences\n@returns(200) {object: str, data: [map]} # OK\n\n@endpoint DELETE /audiences/{id}\n@desc Remove an existing audience\n@required {id: str # The Audience ID.}\n@returns(200) {id: str, object: str, deleted: bool} # OK\n\n@endpoint GET /audiences/{id}\n@desc Retrieve a single audience\n@required {id: str # The Audience ID.}\n@returns(200) {id: str, object: str, name: str, created_at: str} # OK\n\n@endgroup\n\n@group contacts\n@endpoint POST /contacts\n@desc Create a new contact\n@required {email: str # Email address of the contact.}\n@optional {first_name: str # First name of the contact., last_name: str # Last name of the contact., unsubscribed: bool # The Contact's global subscription status. If set to true, the contact will be unsubscribed from all Broadcasts., properties: map # A map of custom property keys and values to create., segments: [map{id: str}] # Array of segment IDs to add the contact to., topics: [map{id: str, subscription: str}] # Array of topic subscriptions for the contact., audience_id: str # Unique identifier of the audience to which the contact belongs.}\n@returns(201) {object: str, id: str} # OK\n\n@endpoint GET /contacts\n@desc Retrieve a list of contacts\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint POST /contacts/imports\n@desc Create a contact import\n@returns(201) {object: str, id: str(uuid)} # OK\n\n@endpoint GET /contacts/imports\n@desc Retrieve a list of contact imports\n@optional {status: str(queued/in_progress/completed/failed) # Filter contact imports by status., limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /contacts/imports/{id}\n@desc Retrieve a single contact import\n@required {id: str(uuid) # The Contact Import ID.}\n@returns(200) OK\n\n@endpoint GET /contacts/{id}\n@desc Retrieve a single contact by ID or email\n@required {id: str # The Contact ID or email address.}\n@returns(200) {object: str, id: str, email: str, first_name: str?, last_name: str?, created_at: str, unsubscribed: bool, properties: map} # OK\n\n@endpoint PATCH /contacts/{id}\n@desc Update a single contact by ID or email\n@required {id: str # The Contact ID or email address.}\n@optional {email: str # Email address of the contact., first_name: str # First name of the contact., last_name: str # Last name of the contact., unsubscribed: bool # The Contact's global subscription status. If set to true, the contact will be unsubscribed from all Broadcasts., properties: map # A map of custom property keys and values to update.}\n@returns(200) {object: str, id: str} # OK\n\n@endpoint DELETE /contacts/{id}\n@desc Remove an existing contact by ID or email\n@required {id: str # The Contact ID or email address.}\n@returns(200) {object: str, id: str, deleted: bool} # OK\n\n@endgroup\n\n@group broadcasts\n@endpoint POST /broadcasts\n@desc Create a broadcast\n@required {segment_id: str # Unique identifier of the segment this broadcast will be sent to., from: str # The email address of the sender., subject: str # The subject line of the email.}\n@optional {name: str # Name of the broadcast., audience_id: str # Use `segment_id` instead. Unique identifier of the segment this broadcast will be sent to., reply_to: [str] # The email addresses to which replies should be sent., preview_text: str # The preview text of the email., html: str # The HTML version of the message., text: str # The plain text version of the message., topic_id: str # The topic ID that the broadcast will be scoped to., send: bool # Whether to send the broadcast immediately or keep it as a draft., scheduled_at: str # Schedule time to send the broadcast. Can only be used if `send` is true.}\n@returns(201) {id: str, object: str} # OK\n\n@endpoint GET /broadcasts\n@desc Retrieve a list of broadcasts\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint DELETE /broadcasts/{id}\n@desc Remove an existing broadcast that is in the draft status\n@required {id: str # The Broadcast ID.}\n@returns(200) {id: str, object: str, deleted: bool} # OK\n\n@endpoint GET /broadcasts/{id}\n@desc Retrieve a single broadcast\n@required {id: str # The Broadcast ID.}\n@returns(200) {id: str, name: str, audience_id: str?, segment_id: str?, from: str, subject: str, reply_to: [str], preview_text: str, status: str, created_at: str, scheduled_at: str, sent_at: str, text: str?, html: str?, topic_id: str?} # OK\n\n@endpoint PATCH /broadcasts/{id}\n@desc Update an existing broadcast\n@required {id: str # The Broadcast ID.}\n@optional {name: str # Name of the broadcast., audience_id: str # Use `segment_id` instead. Unique identifier of the audience this broadcast will be sent to., segment_id: str # Unique identifier of the segment this broadcast will be sent to., from: str # The email address of the sender., subject: str # The subject line of the email., reply_to: [str] # The email addresses to which replies should be sent., preview_text: str # The preview text of the email., html: str # The HTML version of the message., text: str # The plain text version of the message., topic_id: str # The topic ID that the broadcast will be scoped to.}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint POST /broadcasts/{id}/send\n@desc Send or schedule a broadcast\n@required {id: str # The Broadcast ID.}\n@optional {scheduled_at: str # Schedule email to be sent later. The date should be in ISO 8601 format.}\n@returns(200) {id: str} # OK\n\n@endpoint POST /broadcasts/{id}/cancel\n@desc Cancel a broadcast\n@required {id: str(uuid) # The Broadcast ID.}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint POST /broadcasts/{id}/duplicate\n@desc Duplicate a broadcast\n@required {id: str(uuid) # The Broadcast ID.}\n@returns(201) {id: str, object: str} # Created\n\n@endpoint GET /broadcasts/{id}/recipients\n@desc Retrieve broadcast recipients\n@required {id: str(uuid) # The Broadcast ID., type: str(sent/delivered/opened/clicked/bounced/complained/unsubscribed/suppressed) # The recipient event type to filter by.}\n@optional {email: str # Filter recipients whose email address contains this value., bounce_type: str(permanent/transient/undetermined) # Filter bounced recipients by bounce type. Only valid when `type` is `bounced`., limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /broadcasts/{id}/clicked-links\n@desc Retrieve a broadcast's clicked links\n@required {id: str(uuid) # The Broadcast ID.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endgroup\n\n@group webhooks\n@endpoint POST /webhooks\n@desc Create a new webhook\n@required {endpoint: str # The URL where webhook events will be sent., events: [str] # Array of event types to subscribe to.}\n@returns(201) {object: str, id: str(uuid), signing_secret: str} # Created\n\n@endpoint GET /webhooks\n@desc Retrieve a list of webhooks\n@optional {limit: int # Maximum number of webhooks to return., after: str(uuid) # Pagination cursor to fetch results after this webhook ID. Cannot be used with 'before'., before: str(uuid) # Pagination cursor to fetch results before this webhook ID. Cannot be used with 'after'.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /webhooks/{webhook_id}\n@desc Retrieve a single webhook\n@required {webhook_id: str(uuid) # The Webhook ID.}\n@returns(200) {object: str, id: str(uuid), endpoint: str, events: [str]?, status: str, created_at: str, signing_secret: str} # OK\n\n@endpoint PATCH /webhooks/{webhook_id}\n@desc Update an existing webhook\n@required {webhook_id: str(uuid) # The Webhook ID.}\n@optional {endpoint: str # The URL where webhook events will be sent., events: [str] # Array of event types to subscribe to., status: str(enabled/disabled) # The status of the webhook.}\n@returns(200) {object: str, id: str(uuid)} # OK\n\n@endpoint DELETE /webhooks/{webhook_id}\n@desc Remove an existing webhook\n@required {webhook_id: str(uuid) # The Webhook ID.}\n@returns(200) {object: str, id: str(uuid), deleted: bool} # OK\n\n@endpoint POST /webhooks/{webhook_id}/signing-secret/rotate\n@desc Rotate a webhook signing secret\n@required {webhook_id: str(uuid) # The Webhook ID.}\n@returns(200) {object: str, id: str(uuid), signing_secret: str} # OK\n\n@endpoint GET /webhooks/{webhook_id}/events\n@desc Retrieve a list of webhook events\n@required {webhook_id: str(uuid) # The Webhook ID.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /webhooks/{webhook_id}/events/{event_id}\n@desc Retrieve a single webhook event\n@required {webhook_id: str(uuid) # The Webhook ID., event_id: str # The Webhook Event ID.}\n@returns(200) {object: str, id: str, type: str, created_at: str(date-time), status: str, next_attempt_at: str(date-time)?, payload: map} # OK\n\n@endpoint POST /webhooks/{webhook_id}/events/{event_id}/replay\n@desc Replay a webhook event\n@required {webhook_id: str(uuid) # The Webhook ID., event_id: str # The Webhook Event ID.}\n@returns(200) {object: str, id: str} # OK\n\n@endpoint GET /webhooks/{webhook_id}/events/{event_id}/attempts\n@desc Retrieve a list of webhook event attempts\n@required {webhook_id: str(uuid) # The Webhook ID., event_id: str # The Webhook Event ID.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endgroup\n\n@group segments\n@endpoint POST /segments\n@desc Create a new segment\n@required {name: str # The name of the segment.}\n@optional {audience_id: str # The ID of the audience this segment belongs to., filter: map # Filter conditions for the segment.}\n@returns(201) {id: str, object: str} # OK\n\n@endpoint GET /segments\n@desc Retrieve a list of segments\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /segments/{id}\n@desc Retrieve a single segment\n@required {id: str # The Segment ID.}\n@returns(200) {id: str, object: str, name: str, audience_id: str, filter: map, created_at: str} # OK\n\n@endpoint PATCH /segments/{id}\n@desc Update an existing segment\n@required {id: str # The Segment ID., name: str # The name of the segment.}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint DELETE /segments/{id}\n@desc Remove an existing segment\n@required {id: str # The Segment ID.}\n@returns(200) {id: str, object: str, deleted: bool} # OK\n\n@endpoint GET /segments/{id}/contacts\n@desc Retrieve a list of contacts in a segment\n@required {id: str(uuid) # The Segment ID.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endgroup\n\n@group topics\n@endpoint POST /topics\n@desc Create a new topic\n@required {name: str # The name of the topic. Max 50 characters., default_subscription: str(opt_in/opt_out) # The default subscription status for the topic. Cannot be changed after creation.}\n@optional {description: str # A description of the topic. Max 200 characters., visibility: str(public/private)=private # The visibility of the topic. Public topics are visible to all contacts on the unsubscribe page. Private topics are only visible to opted-in contacts.}\n@returns(201) {id: str, object: str} # OK\n\n@endpoint GET /topics\n@desc Retrieve a list of topics\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /topics/{id}\n@desc Retrieve a single topic\n@required {id: str # The Topic ID.}\n@returns(200) {id: str, object: str, name: str, description: str, default_subscription: str, visibility: str, created_at: str} # OK\n\n@endpoint PATCH /topics/{id}\n@desc Update an existing topic\n@required {id: str # The Topic ID.}\n@optional {name: str # The name of the topic. Max 50 characters., description: str # A description of the topic. Max 200 characters., visibility: str(public/private) # The visibility of the topic.}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint DELETE /topics/{id}\n@desc Remove an existing topic\n@required {id: str # The Topic ID.}\n@returns(200) {id: str, object: str, deleted: bool} # OK\n\n@endgroup\n\n@group contact-properties\n@endpoint POST /contact-properties\n@desc Create a new contact property\n@required {key: str # The property key. Max length is 50 characters. Only alphanumeric characters and underscores are allowed., type: str(string/number) # The property type.}\n@optional {fallback_value: any # The default value to use when the property is not set for a contact. Must match the type specified in the type field.}\n@returns(201) {id: str, object: str} # OK\n\n@endpoint GET /contact-properties\n@desc Retrieve a list of contact properties\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /contact-properties/{id}\n@desc Retrieve a single contact property\n@required {id: str # The Contact Property ID.}\n@returns(200) {object: str, id: str, key: str, type: str, fallback_value: any, created_at: str} # OK\n\n@endpoint PATCH /contact-properties/{id}\n@desc Update an existing contact property\n@required {id: str # The Contact Property ID.}\n@optional {fallback_value: any # The default value to use when the property is not set for a contact. Must match the type of the property.}\n@returns(200) {id: str, object: str} # OK\n\n@endpoint DELETE /contact-properties/{id}\n@desc Remove an existing contact property\n@required {id: str # The Contact Property ID.}\n@returns(200) {id: str, object: str, deleted: bool} # OK\n\n@endgroup\n\n@group contacts\n@endpoint GET /contacts/{contact_id}/segments\n@desc Retrieve a list of segments for a contact\n@required {contact_id: str # The Contact ID or email address.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint POST /contacts/{contact_id}/segments/{segment_id}\n@desc Add a contact to a segment\n@required {contact_id: str # The Contact ID or email address., segment_id: str # The Segment ID.}\n@returns(200) {object: str, contact_id: str, segment_id: str} # OK\n\n@endpoint DELETE /contacts/{contact_id}/segments/{segment_id}\n@desc Remove a contact from a segment\n@required {contact_id: str # The Contact ID or email address., segment_id: str # The Segment ID.}\n@returns(200) {object: str, contact_id: str, segment_id: str, deleted: bool} # OK\n\n@endpoint GET /contacts/{contact_id}/topics\n@desc Retrieve topics for a contact\n@required {contact_id: str # The Contact ID or email address.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint PATCH /contacts/{contact_id}/topics\n@desc Update topics for a contact\n@required {contact_id: str # The Contact ID or email address., topics: [map{id: str, subscription: str}]}\n@returns(200) {object: str, contact_id: str, topics: [map]} # OK\n\n@endgroup\n\n@group logs\n@endpoint GET /logs\n@desc Retrieve a list of logs\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /logs/{log_id}\n@desc Retrieve a single log\n@required {log_id: str(uuid) # The ID of the log.}\n@returns(200) {object: str, id: str(uuid), created_at: str, endpoint: str, method: str, response_status: int, user_agent: str?, request_body: map?, response_body: map?} # OK\n\n@endgroup\n\n@group automations\n@endpoint POST /automations\n@desc Create an automation\n@required {name: str # The name of the automation., steps: [map{key!: str, type!: str, config!: map}] # The steps that compose the automation workflow. Must include at least one `trigger` step., connections: [map{from!: str, to!: str, type: str}] # The connections between steps in the automation graph.}\n@optional {status: str(enabled/disabled)=disabled # The initial status of the automation. Defaults to `disabled`.}\n@returns(201) {object: str, id: str} # OK\n\n@endpoint GET /automations\n@desc Retrieve a list of automations\n@optional {status: str(enabled/disabled) # Filter automations by status., limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /automations/{automation_id}\n@desc Retrieve a single automation\n@required {automation_id: str(uuid) # The ID of the automation.}\n@returns(200) {object: str, id: str, name: str, status: str, created_at: str, updated_at: str, steps: [map], connections: [map]} # OK\n\n@endpoint PATCH /automations/{automation_id}\n@desc Update an automation\n@required {automation_id: str(uuid) # The ID of the automation.}\n@optional {name: str # The name of the automation., status: str(enabled/disabled) # The status of the automation., steps: [map{key!: str, type!: str, config!: map}] # The steps that compose the automation workflow. Must be provided together with `connections`., connections: [map{from!: str, to!: str, type: str}] # The connections between steps in the automation graph. Must be provided together with `steps`.}\n@returns(200) {object: str, id: str} # OK\n\n@endpoint DELETE /automations/{automation_id}\n@desc Delete an automation\n@required {automation_id: str(uuid) # The ID of the automation.}\n@returns(200) {object: str, id: str, deleted: bool} # OK\n\n@endpoint POST /automations/{automation_id}/duplicate\n@desc Duplicate an automation\n@required {automation_id: str(uuid) # The ID of the automation.}\n@returns(201) {object: str, id: str} # OK\n\n@endpoint POST /automations/{automation_id}/stop\n@desc Stop an automation\n@required {automation_id: str(uuid) # The ID of the automation.}\n@returns(200) {object: str, id: str, status: str} # OK\n\n@endpoint GET /automations/{automation_id}/runs\n@desc Retrieve a list of automation runs\n@required {automation_id: str(uuid) # The ID of the automation.}\n@optional {status: str # Filter runs by status. Comma-separated list of: running, completed, failed, cancelled., limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /automations/{automation_id}/runs/{run_id}\n@desc Retrieve a single automation run\n@required {automation_id: str(uuid) # The ID of the automation., run_id: str(uuid) # The ID of the automation run.}\n@returns(200) {object: str, id: str, status: str, started_at: str?, completed_at: str?, created_at: str, steps: [map]} # OK\n\n@endgroup\n\n@group events\n@endpoint POST /events\n@desc Create an event\n@required {name: str # The name of the event. Cannot start with the reserved `resend:` prefix.}\n@optional {schema: map # An optional flat key/type map defining the event payload schema. Supported types are `string`, `number`, `boolean`, and `date`.}\n@returns(201) {object: str, id: str(uuid)} # OK\n\n@endpoint GET /events\n@desc Retrieve a list of events\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint POST /events/send\n@desc Send an event\n@required {event: str # The name of the event to send.}\n@optional {contact_id: str(uuid) # The ID of the contact to associate with this event. Exactly one of `contact_id` or `email` must be provided., email: str(email) # The email address to associate with this event. Exactly one of `contact_id` or `email` must be provided., payload: map # An optional payload of key/value pairs to include with the event.}\n@returns(202) {object: str, event: str} # Accepted\n\n@endpoint GET /events/{identifier}\n@desc Retrieve a single event\n@required {identifier: str # The event ID (UUID) or event name.}\n@returns(200) {object: str, id: str(uuid), name: str, schema: map?, created_at: str, updated_at: str?} # OK\n\n@endpoint PATCH /events/{identifier}\n@desc Update an event\n@required {identifier: str # The event ID (UUID) or event name., schema: map # A flat key/type map defining the event payload schema. Set to `null` to clear the schema. Supported types are `string`, `number`, `boolean`, and `date`.}\n@returns(200) {object: str, id: str(uuid)} # OK\n\n@endpoint DELETE /events/{identifier}\n@desc Delete an event\n@required {identifier: str # The event ID (UUID) or event name.}\n@returns(200) {object: str, id: str(uuid), deleted: bool} # OK\n\n@endgroup\n\n@group suppressions\n@endpoint POST /suppressions\n@desc Create a suppression\n@required {email: str # Email address to suppress.}\n@returns(201) {object: str, id: str} # OK\n\n@endpoint GET /suppressions\n@desc Retrieve a list of suppressions\n@optional {origin: str(bounce/complaint/manual) # Filter suppressions by origin., limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint POST /suppressions/batch/add\n@desc Add up to 100 suppressions at once\n@required {emails: [str] # Email addresses to suppress.}\n@returns(201) {data: [map]} # OK\n\n@endpoint POST /suppressions/batch/remove\n@desc Remove up to 100 suppressions at once\n@optional {emails: [str] # Email addresses to remove from the suppression list., ids: [str] # Suppression IDs to remove from the suppression list.}\n@returns(200) {data: [map]} # OK\n\n@endpoint GET /suppressions/{suppression}\n@desc Retrieve a single suppression by ID or email\n@required {suppression: str # The Suppression ID or email address.}\n@returns(200) {object: str, id: str, email: str, origin: str, source_id: str?, created_at: str} # OK\n\n@endpoint DELETE /suppressions/{suppression}\n@desc Remove a single suppression by ID or email\n@required {suppression: str # The Suppression ID or email address.}\n@returns(200) {object: str, id: str, deleted: bool} # OK\n\n@endgroup\n\n@group usage\n@endpoint GET /usage\n@desc Retrieve account usage\n@returns(200) {object: str, emails: map{daily: map{used: int, limit: int?, sent: int, received: int, resets_at: str}, monthly: map{used: int, limit: int, sent: int, received: int, resets_at: str}}, contacts: map{used: int, limit: int}, segments: map{used: int, limit: int?}, broadcasts: map{used: int, limit: null?}, ai_credits: map{used: int, limit: int?, next_increase_at: str?}, automation_runs: map{used: int, limit: int, resets_at: str}, domains: map{used: int, limit: int?}, rate_limit: map{limit: int, duration: str}} # OK\n\n@endgroup\n\n@group inboxes\n@endpoint POST /inboxes\n@desc Create an inbox\n@required {email_address: str # The inbox email address on one of your domains. The API trims and lowercases it. The part before the `@` is at most 64 characters and contains only letters, numbers, and `. _ % -`. A `+` returns a 422. It cannot start or end with a dot or contain two dots in a row.}\n@optional {name: str # Internal name for the inbox. Recipients do not see it. Max 64 characters. Defaults to `email_address`., from_name: str # The name recipients see when mail is sent from this inbox. A plain name, not a `Name ` address. Max 78 characters. It cannot contain a colon, ``, line breaks, or other control characters. An email address inside the name must be on a domain the team has verified for sending. An empty string leaves it unset., forwarding: bool=false # When `true`, Resend provisions a receiving address so you can receive mail without adding an MX record. The address is returned in `receiving_address`.}\n@returns(201) {object: str, id: str(uuid)} # OK\n\n@endpoint GET /inboxes\n@desc Retrieve a list of inboxes\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /inboxes/{inbox_id}\n@desc Retrieve a single inbox by ID or email address\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@returns(200) {object: str, id: str(uuid), name: str, email_address: str, domain_id: str(uuid), receiving_address: str?, from_name: str?, unread: int, drafts: int, last_received: str(date-time)?, created_at: str(date-time), updated_at: str(date-time)} # OK\n\n@endpoint PATCH /inboxes/{inbox_id}\n@desc Update an existing inbox by ID or email address\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@optional {name: str # New internal name for the inbox. Recipients do not see it. Between 1 and 64 characters after trimming., from_name: str # The name recipients see when mail is sent from this inbox. A plain name, not a `Name ` address. Max 78 characters. It cannot contain a colon, ``, line breaks, or other control characters. An email address inside the name must be on a domain the team has verified for sending. An empty string removes it.}\n@returns(200) {object: str, id: str(uuid)} # OK\n\n@endpoint DELETE /inboxes/{inbox_id}\n@desc Remove an existing inbox by ID or email address\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@returns(200) {object: str, id: str(uuid), deleted: bool} # OK\n\n@endpoint GET /inboxes/{inbox_id}/agent\n@desc Retrieve the agent settings for an inbox\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@returns(200) {object: str, instructions: str?, tone: str?, actions: [str]} # OK\n\n@endpoint PATCH /inboxes/{inbox_id}/agent\n@desc Update the agent settings for an inbox\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@optional {instructions: str # Instructions the agent follows when it handles the threads of the inbox. Max 4000 characters. Leading and trailing whitespace is trimmed, and the trimmed value must not be empty. Send null to clear the instructions., tone: str(concise_professional/concise_casual/expanded_professional/expanded_casual) # The tone the agent writes in. Send null to clear the tone., actions: [str] # The actions the agent can take. Replaces the whole set. Duplicates are removed. Send an empty array to disable all actions. The old names `archive_thread` and `delete_thread` return a 422. Use `archive` and `move_to_trash`.}\n@returns(200) {object: str, id: str(uuid)} # OK\n\n@endpoint GET /inboxes/{inbox_id}/labels\n@desc Retrieve a list of inbox labels\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@returns(200) {object: str, data: [map]} # OK\n\n@endpoint POST /inboxes/{inbox_id}/labels\n@desc Create a label on an inbox\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., name: str # The name of the label. Max 64 characters. Leading and trailing whitespace is trimmed. Must not match another label on the inbox, compared without case.}\n@optional {color: str # The color of the label, as a `#RRGGBB` hex color. It is stored in uppercase. When omitted, a random color from the dashboard palette is used.}\n@returns(201) {object: str, id: str(uuid)} # OK\n\n@endpoint PATCH /inboxes/{inbox_id}/labels/{label_id}\n@desc Update an existing inbox label\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., label_id: str(uuid) # The Label ID.}\n@optional {name: str # A new name for the label. Max 64 characters. Leading and trailing whitespace is trimmed. Must not match another label on the inbox, compared without case., color: str # A new color for the label, as a `#RRGGBB` hex color. It is stored in uppercase.}\n@returns(200) {object: str, id: str(uuid)} # OK\n\n@endpoint DELETE /inboxes/{inbox_id}/labels/{label_id}\n@desc Remove an existing inbox label\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., label_id: str(uuid) # The Label ID.}\n@returns(200) {object: str, id: str(uuid), deleted: bool} # OK\n\n@endpoint GET /inboxes/{inbox_id}/threads\n@desc Retrieve a list of inbox threads\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@optional {folders: [str] # Comma-separated folders to list, for example `inbox,sent`. Repeating the parameter returns a 422 validation_error. A thread is returned when any of its emails is in one of the folders, so a thread in `inbox` with an email you sent matches both `inbox` and `sent`. Defaults to `inbox`, or to `inbox,archive,sent` when `labels` is set. `spam` and `trash` are only included when you name them., labels: [str(uuid)] # Comma-separated label IDs. Returns threads with any of these labels. Up to 50 IDs. An ID that does not exist in the inbox returns a 404. Repeating the parameter returns a 422 validation_error., read: bool # `true` returns threads where every email is read. `false` returns threads with at least one unread email. Only the literal values `true` and `false` are accepted., limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /inboxes/{inbox_id}/threads/search\n@desc Search the threads of an inbox\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@optional {query: str # Free text to search for in the subject, body, sender, recipients, and attachment names. Every word must match. Wrap words in double quotes to match an exact phrase. Start a word or quoted phrase with `-` to exclude it. Max 256 characters and 32 words., from: [str] # Comma-separated senders. Each value matches part of the sender's address or name, without case. Returns threads that match any of them. Up to 20 values. Repeating the parameter returns a 422 validation_error., to: [str] # Comma-separated recipients, matched the same way as `from`. Up to 20 values. Repeating the parameter returns a 422 validation_error., cc: [str] # Comma-separated CC recipients, matched the same way as `from`. Up to 20 values. Repeating the parameter returns a 422 validation_error., bcc: [str] # Comma-separated BCC recipients, matched the same way as `from`. Up to 20 values. Repeating the parameter returns a 422 validation_error., has_attachment: bool # `true` matches emails with an attachment. `false` matches emails without one. Only the literal values `true` and `false` are accepted., start_date: str # Matches emails sent on or after this date. Accepts a date like `2026-09-01` or an ISO 8601 timestamp, in UTC unless the timestamp has an offset. An empty value returns a 422., end_date: str # Matches emails sent on or before this date. Same formats as `start_date`. A date covers that whole day, so `start_date=2026-09-01&end_date=2026-09-30` covers all of September. A timestamp is used as given. An `end_date` before `start_date` returns a 422 validation_error. An empty value returns a 422., folders: [str] # Comma-separated folders to search, for example `inbox,sent`. Repeating the parameter returns a 422 validation_error. A thread is returned when any of its emails is in one of the folders. Defaults to `inbox`, or to `inbox,archive,sent` when `labels` is set. `spam` and `trash` are only included when you name them., labels: [str(uuid)] # Comma-separated label IDs. Returns threads with any of these labels. Up to 50 IDs. An ID that does not exist in the inbox returns a 404. Repeating the parameter returns a 422 validation_error., read: bool # `true` returns threads where every email is read. `false` returns threads with at least one unread email. Only the literal values `true` and `false` are accepted., limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [any]} # OK\n\n@endpoint GET /inboxes/{inbox_id}/threads/{thread_id}\n@desc Retrieve a single inbox thread\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID.}\n@returns(200) {object: str, id: str(uuid), subject: str?, folder: str, labels: [map], read: bool} # OK\n\n@endpoint PATCH /inboxes/{inbox_id}/threads/{thread_id}\n@desc Update an existing inbox thread\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID.}\n@optional {read: bool # Marks every email in the thread read or unread., folder: str(inbox/archive/spam/trash) # Moves the thread to this folder. `sent` is assigned automatically and cannot be set.}\n@returns(200) {object: str, id: str(uuid), subject: str?, folder: str, labels: [map], read: bool} # OK\n\n@endpoint DELETE /inboxes/{inbox_id}/threads/{thread_id}\n@desc Remove an existing inbox thread\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID.}\n@returns(200) {object: str, id: str(uuid), deleted: bool} # OK\n\n@endpoint POST /inboxes/{inbox_id}/threads/{thread_id}/labels\n@desc Add labels to an inbox thread\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID., labels: [str(uuid)] # The IDs of the labels to apply to the thread. Between 1 and 10 IDs, each a label of the inbox.}\n@returns(200) {object: str, data: [map]} # OK\n\n@endpoint PUT /inboxes/{inbox_id}/threads/{thread_id}/labels\n@desc Set the labels of an inbox thread\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID., labels: [str(uuid)] # The IDs of the labels the thread carries after the change. Up to 100 IDs, each a label of the inbox. Pass an empty array to take every label off the thread.}\n@returns(200) {object: str, data: [map]} # OK\n\n@endpoint DELETE /inboxes/{inbox_id}/threads/{thread_id}/labels/{label_id}\n@desc Remove a label from an inbox thread\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID., label_id: str(uuid) # The Label ID.}\n@returns(200) {object: str, data: [map]} # OK\n\n@endpoint GET /inboxes/{inbox_id}/threads/{thread_id}/emails\n@desc Retrieve a list of thread emails\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint GET /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}\n@desc Retrieve a single thread email\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID., email_id: str(uuid) # The Email ID, as returned in `data[].id` by the list thread emails endpoint.}\n@returns(200) {id: str(uuid), direction: str, from: str, to: [str], cc: [str], bcc: [str], reply_to: [str], subject: str?, message_id: str?, html: str?, text: str?, attachments: [map], read: bool, received_at: str(date-time)} # OK\n\n@endpoint POST /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/reply\n@desc Reply to a thread email\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID., email_id: str(uuid) # The Email ID of the message to reply to, as returned in `data[].id` by the list thread emails endpoint.}\n@optional {Idempotency-Key: str # A unique key for the request, so the reply is sent only once. A retry with the same key within 24 hours returns the first successful (2xx) response, with the `idempotent-replayed: true` header. A failed request is not stored, so it can be retried with the same key. Reusing the key with a different body, or while the first request is still running, returns a 409. An empty key, or one longer than 256 characters, returns a 400 `invalid_idempotency_key`. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys), cc: any # CC recipient email address. For multiple addresses, send as an array of strings. Without `reply_all`, the reply copies only these addresses. With `reply_all`, these addresses are merged with the copied recipients, without duplicates. `cc` and `bcc` combined must be fewer than 50 addresses. After the `to` recipients are added, the reply cannot exceed 50 recipients. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., bcc: any # BCC recipient email address. For multiple addresses, send as an array of strings. BCC recipients of the original message are never copied. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., html: str # The HTML body of the reply., text: str # The plain-text body of the reply., subject: str # The subject of the reply. Cannot be only whitespace or contain a line break. When omitted, the thread subject is used, prefixed with `Re:` if it does not already start with it., reply_all: bool=false # Reply to everyone on the original message. For a message the inbox received, the reply goes to its `Reply-To` addresses, or to its sender when it has none, and copies the other addresses of its `To` header and its `cc` recipients in `cc`. For a message the inbox sent, the reply goes to that message's `Reply-To` addresses when they are not the inbox address, otherwise to its `to` recipients, and copies its `cc` recipients. The inbox address is always excluded, and duplicates are removed., attachments: [map{content: str(binary), filename: str, path: str, content_type: str, content_id: str}] # Files to attach, as on `POST /emails`. Each one needs `content` or `path`. The `content` of all files can total at most 25 MB. A `path` file does not count toward the 25 MB, because it is fetched when the email is sent. An empty file, a blocked file type, a `path` that does not start with `http` or that starts with `http://localhost:`, or a `content_type` that is not a valid MIME type returns a 422. Other `path` problems fail the email when it is sent, not the request., headers: map # Custom headers to add to the email. The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here. Sending one of them, in any letter case, returns a 422. Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422. `null` means no custom headers.}\n@returns(200) {id: str(uuid)} # OK\n\n@endpoint POST /inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/forward\n@desc Forward a thread email\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., thread_id: str(uuid) # The Thread ID., email_id: str(uuid) # The Email ID of the message to forward, as returned in `data[].id` by the list thread emails endpoint., to: any # Recipient email address. For multiple addresses, send as an array of strings. Must name at least one address. `to`, `cc` and `bcc` combined cannot exceed 50 recipients. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422.}\n@optional {Idempotency-Key: str # A unique key for the request, so the forward is sent only once. A retry with the same key within 24 hours returns the first successful (2xx) response, with the `idempotent-replayed: true` header. A failed request is not stored, so it can be retried with the same key. Reusing the key with a different body, or while the first request is still running, returns a 409. An empty key, or one longer than 256 characters, returns a 400 `invalid_idempotency_key`. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys), cc: any # CC recipient email address. For multiple addresses, send as an array of strings. Counts toward the 50-recipient limit. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., bcc: any # BCC recipient email address. For multiple addresses, send as an array of strings. Counts toward the 50-recipient limit. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., html: str # An HTML note sent above the quoted original., text: str # A plain-text note sent above the quoted original., subject: str # The subject of the forward. Cannot be only whitespace or contain a line break. When omitted, the thread subject is used, prefixed with `Fwd:` if it does not already start with it., attachments: [map{content: str(binary), filename: str, path: str, content_type: str, content_id: str}] # Files to attach, as on `POST /emails`. Each one needs `content` or `path`. They share one limit with the attachments of the original message, which the forward also sends. Together they can have at most 25 MB of `content`. A `path` file does not count toward the 25 MB, because it is fetched when the email is sent. An empty file, a blocked file type, a `path` that does not start with `http` or that starts with `http://localhost:`, or a `content_type` that is not a valid MIME type returns a 422. Other `path` problems fail the email when it is sent, not the request., headers: map # Custom headers to add to the email. The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here. Sending one of them, in any letter case, returns a 422. Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422. `null` means no custom headers.}\n@returns(200) {id: str(uuid)} # OK\n\n@endpoint GET /inboxes/{inbox_id}/drafts\n@desc Retrieve a list of drafts\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@optional {limit: int # Number of items to return., after: str # Return items after this cursor., before: str # Return items before this cursor.}\n@returns(200) {object: str, has_more: bool, data: [map]} # OK\n\n@endpoint POST /inboxes/{inbox_id}/drafts\n@desc Create a draft\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404.}\n@optional {Idempotency-Key: str # A unique key for the request, so the draft is created only once. A retry with the same key within 24 hours returns the first successful (2xx) response, with the `idempotent-replayed: true` header. A failed request is not stored, so it can be retried with the same key. Reusing the key with a different body, or while the first request is still running, returns a 409. An empty key, or one longer than 256 characters, returns a 400 `invalid_idempotency_key`. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys), to: any # The recipients. For multiple addresses, send an array of strings. Each value can include a friendly name, for example `Ada Lovelace `. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., cc: any # The CC recipients. For multiple addresses, send an array of strings. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., bcc: any # The BCC recipients. For multiple addresses, send an array of strings. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., subject: str # The subject. Max 2000 characters. A string that is only whitespace, or that contains a line break, is rejected., html: str # The HTML body., text: str # The plain text body., attachments: [map{content: str, path: str, filename!: str, content_type: str}] # Files to store on the draft. Each one needs a `filename` and either `content` or a `path` URL. A `path` file is downloaded when the request is made and stored on the draft. When both are sent, `path` is ignored. A `content_id` returns a 422. The files on a draft, downloaded ones included, can total at most 25 MB. A `path` that does not start with `http` or `https`, or that cannot be downloaded, returns a 422, and so does a request whose downloads take more than 20 seconds together. An empty file or a blocked file type returns a 422., thread_id: str(uuid) # The Thread ID to reply in. Must be sent with `reply_to_email_id`., reply_to_email_id: str(uuid) # The Email ID to reply to, as returned in `data[].id` by the list thread emails endpoint. Must be sent with `thread_id`.}\n@returns(200) {object: str, id: str(uuid)} # The reply draft for this email already exists. The response holds the ID of the existing draft, and the request fields other than `attachments` are not applied.\n@returns(201) {object: str, id: str(uuid)} # OK\n\n@endpoint GET /inboxes/{inbox_id}/drafts/{draft_id}\n@desc Retrieve a single draft\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., draft_id: str(uuid) # The Draft ID.}\n@returns(200) {object: str, id: str(uuid), type: str, to: [str]?, cc: [str], bcc: [str], subject: str?, html: str?, text: str?, thread_id: str(uuid)?, reply_to_email_id: str(uuid)?, email_id: str(uuid)?, created_at: str(date-time), updated_at: str(date-time), attachments: [map]} # OK\n\n@endpoint PATCH /inboxes/{inbox_id}/drafts/{draft_id}\n@desc Update an existing draft\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., draft_id: str(uuid) # The Draft ID.}\n@optional {to: any # The recipients. For multiple addresses, send an array of strings. Each value can include a friendly name. Pass `null` to clear. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., cc: any # The CC recipients. Pass `null` or `[]` to clear. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., bcc: any # The BCC recipients. Pass `null` or `[]` to clear. Each address is `email@example.com` or `Name `. An address that is not valid returns a 422., subject: str # The subject. Max 2000 characters. Cannot be only whitespace or contain a line break. Pass `null` to clear., html: str # The HTML body. Pass `null` to clear., text: str # The plain text body. Pass `null` to clear., attachments: [map{content: str, path: str, filename!: str, content_type: str}] # Files to store on the draft. Each one needs a `filename` and either `content` or a `path` URL. A `path` file is downloaded when the request is made and stored on the draft. When both are sent, `path` is ignored. A `content_id` returns a 422. The files on a draft, downloaded ones included, can total at most 25 MB. A `path` that does not start with `http` or `https`, or that cannot be downloaded, returns a 422, and so does a request whose downloads take more than 20 seconds together. An empty file or a blocked file type returns a 422. Sending the field replaces every attachment on the draft. Send `[]` to remove them all. `null` also removes them all.}\n@returns(200) {object: str, id: str(uuid)} # OK\n\n@endpoint DELETE /inboxes/{inbox_id}/drafts/{draft_id}\n@desc Remove an existing draft\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., draft_id: str(uuid) # The Draft ID.}\n@returns(200) {object: str, id: str(uuid), deleted: bool} # OK\n\n@endpoint POST /inboxes/{inbox_id}/drafts/{draft_id}/send\n@desc Send a draft\n@required {inbox_id: str # The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404., draft_id: str(uuid) # The Draft ID.}\n@optional {Idempotency-Key: str # A unique key for the request, so the draft is sent only once. A retry with the same key within 24 hours returns the first successful (2xx) response, with the `idempotent-replayed: true` header. A failed request is not stored, so it can be retried with the same key. Reusing the key with a different body, or while the first request is still running, returns a 409. An empty key, or one longer than 256 characters, returns a 400 `invalid_idempotency_key`. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys), headers: map # Custom headers to add to the email. The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here. Sending one of them, in any letter case, returns a 422. Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422. `null` means no custom headers.}\n@returns(200) {id: str(uuid)} # OK\n\n@endgroup\n\n@end\n"}}