{"files":{"SKILL.md":"---\nname: resend\ndescription: \"Resend API skill. Use when working with Resend for emails, domains, api-keys. Covers 69 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Resend\nAPI version: 1.5.0\n\n## Auth\nBearer bearer\n\n## Base URL\nhttps://api.resend.com\n\n## Setup\n1. Set Authorization header with Bearer token\n2. GET /emails -- retrieve a list of emails\n3. POST /emails -- create first email\n\n## Endpoints\n69 endpoints across 12 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/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\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\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| DELETE | /api-keys/{api_key_id} | Remove an existing API key |\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| 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\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\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| DELETE | /segments/{id} | Remove an existing 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## Common Questions\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 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- \"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 api-key?\" -> POST /api-keys\n- \"List all api-keys?\" -> GET /api-keys\n- \"Delete a api-key?\" -> DELETE /api-keys/{api_key_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- \"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 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 segment?\" -> POST /segments\n- \"List all segments?\" -> GET /segments\n- \"Get segment details?\" -> GET /segments/{id}\n- \"Delete a segment?\" -> DELETE /segments/{id}\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 logs?\" -> GET /logs\n- \"Get log details?\" -> GET /logs/{log_id}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Create/update endpoints return the modified resource on success\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.0\n@auth Bearer bearer\n@endpoints 69\n@hint download_for_search\n@toc emails(12), domains(6), api-keys(3), templates(7), audiences(4), contacts(10), broadcasts(6), webhooks(5), segments(4), topics(5), contact-properties(5), logs(2)\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, to: [str], from: str, created_at: str(date-time), 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, to: [str], from: str, created_at: str(date-time), subject: str, html: str, text: str, bcc: [str], cc: [str], reply_to: [str], last_event: 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]?, 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@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.}\n@returns(201) {id: str, name: str, created_at: str(date-time), status: str, capabilities: map{sending: str, receiving: str}, records: [map], region: 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(date-time), region: 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., capabilities: map{sending: str, receiving: str} # Configure the domain capabilities for sending and receiving emails. At least one capability must be enabled.}\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@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 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 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(date-time), updated_at: str(date-time), status: str, published_at: str(date-time)?, 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: [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 {segment_id: str # Filter contacts by segment ID., 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]} # 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(date-time), 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(date-time), scheduled_at: str(date-time), sent_at: str(date-time), 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@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(date-time), 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@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(date-time)} # 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@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(date-time)} # 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(date-time)} # 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(date-time), endpoint: str, method: str, response_status: int, user_agent: str?, request_body: any?, response_body: any?} # OK\n\n@endgroup\n\n@end\n"}}