{"components":{"parameters":{"PaginationAfter":{"description":"Return items after this cursor.","in":"query","name":"after","required":false,"schema":{"type":"string"}},"PaginationBefore":{"description":"Return items before this cursor.","in":"query","name":"before","required":false,"schema":{"type":"string"}},"PaginationLimit":{"description":"Number of items to return.","in":"query","name":"limit","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}}},"schemas":{"AddContactToSegmentResponseSuccess":{"properties":{"contact_id":{"description":"The ID of the contact.","type":"string"},"object":{"description":"The object type.","example":"contact_segment","type":"string"},"segment_id":{"description":"The ID of the segment.","type":"string"}},"type":"object"},"ApiKey":{"properties":{"created_at":{"description":"The date and time the API key was created.","format":"date-time","type":"string"},"id":{"description":"The ID of the API key.","type":"string"},"last_used_at":{"description":"The date and time the API key was last used.","format":"date-time","type":["null","string"]},"name":{"description":"The name of the API key.","type":"string"}},"type":"object"},"Attachment":{"properties":{"content":{"description":"Content of an attached file.","format":"binary","type":"string"},"content_id":{"description":"Content ID for embedding inline images using cid references (e.g., cid:image001).","type":"string"},"content_type":{"description":"Optional content type for the attachment, if not set it will be derived from the filename property","type":"string"},"filename":{"description":"Name of attached file.","type":"string"},"path":{"description":"Path where the attachment file is hosted","type":"string"}},"type":"object"},"Automation":{"properties":{"connections":{"description":"The connections between steps in the active version of the automation.","items":{"$ref":"#/components/schemas/AutomationConnection"},"type":"array"},"created_at":{"description":"The date and time the automation was created.","type":"string"},"id":{"description":"The ID of the automation.","type":"string"},"name":{"description":"The name of the automation.","type":"string"},"object":{"description":"Type of the response object.","example":"automation","type":"string"},"status":{"description":"The current status of the automation.","enum":["enabled","disabled"],"type":"string"},"steps":{"description":"The steps in the active version of the automation.","items":{"$ref":"#/components/schemas/AutomationStepResponse"},"type":"array"},"updated_at":{"description":"The date and time the automation was last updated.","type":"string"}},"type":"object"},"AutomationConnection":{"description":"A connection between two steps in the automation graph.","properties":{"from":{"description":"The `key` of the source step.","type":"string"},"to":{"description":"The `key` of the target step.","type":"string"},"type":{"default":"default","description":"The type of connection. Defaults to `default`.","enum":["default","condition_met","condition_not_met","timeout","event_received"],"type":"string"}},"required":["from","to"],"type":"object"},"AutomationListItem":{"properties":{"created_at":{"description":"The date and time the automation was created.","type":"string"},"id":{"description":"The ID of the automation.","type":"string"},"name":{"description":"The name of the automation.","type":"string"},"status":{"description":"The current status of the automation.","enum":["enabled","disabled"],"type":"string"},"updated_at":{"description":"The date and time the automation was last updated.","type":"string"}},"type":"object"},"AutomationRun":{"properties":{"completed_at":{"description":"The date and time the run completed.","type":["null","string"]},"created_at":{"description":"The date and time the run was created.","type":"string"},"id":{"description":"The ID of the automation run.","type":"string"},"object":{"description":"Type of the response object.","example":"automation_run","type":"string"},"started_at":{"description":"The date and time the run started.","type":["null","string"]},"status":{"description":"The current status of the automation run.","enum":["running","completed","failed","cancelled"],"type":"string"},"steps":{"description":"The steps executed in this run, sorted in graph order.","items":{"$ref":"#/components/schemas/AutomationRunStep"},"type":"array"}},"type":"object"},"AutomationRunListItem":{"properties":{"completed_at":{"description":"The date and time the run completed.","type":["null","string"]},"created_at":{"description":"The date and time the run was created.","type":"string"},"id":{"description":"The ID of the automation run.","type":"string"},"started_at":{"description":"The date and time the run started.","type":["null","string"]},"status":{"description":"The current status of the automation run.","enum":["running","completed","failed","cancelled"],"type":"string"}},"type":"object"},"AutomationRunStep":{"description":"A step execution within an automation run.","properties":{"completed_at":{"description":"The date and time the step completed executing.","type":["null","string"]},"created_at":{"description":"The date and time the step record was created.","type":"string"},"error":{"anyOf":[{"description":"The error produced by the step, if any."},{"type":"null"}]},"key":{"description":"The key of the automation step.","type":"string"},"output":{"anyOf":[{"description":"The output produced by the step, if any."},{"type":"null"}]},"started_at":{"description":"The date and time the step started executing.","type":["null","string"]},"status":{"description":"The execution status of this step.","type":"string"},"type":{"description":"The type of automation step.","enum":["trigger","send_email","delay","wait_for_event","condition","contact_update","contact_delete","add_to_segment"],"type":"string"}},"type":"object"},"AutomationStep":{"description":"A step in an automation workflow. The `config` object varies based on the step `type`.","properties":{"config":{"description":"Configuration for the step. Shape depends on `type`: - **trigger**: `{ event_name: string }` - **send_email**: `{ template: { id: string, variables?: object }, subject?: string, from?: string, reply_to?: string }` - **delay**: `{ duration: string }` — a human-readable duration (e.g. `\"30 minutes\"`) - **wait_for_event**: `{ event_name: string, timeout?: string, filter_rule?: object }` — `timeout` is a human-readable duration (e.g. `\"1 hour\"`) - **condition**: A rule tree with `type` (`rule`, `and`, `or`), `field`, `operator`, and `value` - **contact_update**: `{ first_name?: string|object, last_name?: string|object, unsubscribed?: boolean|object, properties?: object }` - **contact_delete**: `{}` - **add_to_segment**: `{ segment_id: string }`\n","type":"object"},"key":{"description":"A unique key for this step within the automation graph.","type":"string"},"type":{"description":"The type of automation step.","enum":["trigger","send_email","delay","wait_for_event","condition","contact_update","contact_delete","add_to_segment"],"type":"string"}},"required":["config","key","type"],"type":"object"},"AutomationStepResponse":{"description":"A step as returned when retrieving an automation.","properties":{"config":{"description":"Configuration for the step. Shape depends on `type`. For `delay` steps, config contains `{ duration: string }` with a human-readable duration (e.g. `\"30 minutes\"`). For `wait_for_event` steps, config contains `{ event_name: string, timeout?: string, filter_rule?: object }` where `timeout` is a human-readable duration.\n","type":"object"},"key":{"description":"The unique key of this step within the automation graph.","type":"string"},"type":{"description":"The type of automation step.","enum":["trigger","send_email","delay","wait_for_event","condition","contact_update","contact_delete","add_to_segment"],"type":"string"}},"type":"object"},"CreateApiKeyRequest":{"properties":{"domain_id":{"description":"Restrict an API key to send emails only from a specific domain. Only used when the permission is sending_access.","type":"string"},"name":{"description":"The API key name.","type":"string"},"permission":{"description":"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.","enum":["full_access","sending_access"],"type":"string"}},"required":["name"],"type":"object"},"CreateApiKeyResponse":{"properties":{"id":{"description":"The ID of the API key.","type":"string"},"token":{"description":"The token of the API key.","type":"string"}},"type":"object"},"CreateAudienceOptions":{"deprecated":true,"properties":{"name":{"description":"The name of the audience you want to create.","type":"string"}},"required":["name"],"type":"object"},"CreateAudienceResponseSuccess":{"deprecated":true,"properties":{"id":{"description":"The ID of the audience.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"name":{"description":"The name of the audience.","example":"Registered Users","type":"string"},"object":{"description":"The object of the audience.","example":"audience","type":"string"}},"type":"object"},"CreateAutomationRequest":{"properties":{"connections":{"description":"The connections between steps in the automation graph.","items":{"$ref":"#/components/schemas/AutomationConnection"},"type":"array"},"name":{"description":"The name of the automation.","minLength":1,"type":"string"},"status":{"default":"disabled","description":"The initial status of the automation. Defaults to `disabled`.","enum":["enabled","disabled"],"type":"string"},"steps":{"description":"The steps that compose the automation workflow. Must include at least one `trigger` step.","items":{"$ref":"#/components/schemas/AutomationStep"},"maxItems":150,"minItems":1,"type":"array"}},"required":["connections","name","steps"],"type":"object"},"CreateAutomationResponse":{"properties":{"id":{"description":"The ID of the created automation.","type":"string"},"object":{"description":"Type of the response object.","example":"automation","type":"string"}},"type":"object"},"CreateBatchEmailsResponse":{"properties":{"data":{"items":{"properties":{"id":{"description":"The ID of the sent email.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"CreateBroadcastOptions":{"properties":{"audience_id":{"deprecated":true,"description":"Use `segment_id` instead. Unique identifier of the segment this broadcast will be sent to.","type":"string"},"from":{"description":"The email address of the sender.","type":"string"},"html":{"description":"The HTML version of the message.","type":"string"},"name":{"description":"Name of the broadcast.","type":"string"},"preview_text":{"description":"The preview text of the email.","example":"Here are our announcements","type":"string"},"reply_to":{"description":"The email addresses to which replies should be sent.","items":{"type":"string"},"type":"array"},"scheduled_at":{"description":"Schedule time to send the broadcast. Can only be used if `send` is true.\n","type":"string"},"segment_id":{"description":"Unique identifier of the segment this broadcast will be sent to.","type":"string"},"send":{"description":"Whether to send the broadcast immediately or keep it as a draft.\n","type":"boolean"},"subject":{"description":"The subject line of the email.","type":"string"},"text":{"description":"The plain text version of the message.","type":"string"},"topic_id":{"description":"The topic ID that the broadcast will be scoped to.","type":"string"}},"required":["from","segment_id","subject"],"type":"object"},"CreateBroadcastResponseSuccess":{"properties":{"id":{"description":"The ID of the broadcast.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type of the response.","example":"broadcast","type":"string"}},"type":"object"},"CreateContactOptions":{"properties":{"audience_id":{"deprecated":true,"description":"Unique identifier of the audience to which the contact belongs.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"email":{"description":"Email address of the contact.","example":"steve.wozniak@gmail.com","type":"string"},"first_name":{"description":"First name of the contact.","example":"Steve","type":"string"},"last_name":{"description":"Last name of the contact.","example":"Wozniak","type":"string"},"properties":{"additionalProperties":true,"description":"A map of custom property keys and values to create.","type":"object"},"segments":{"description":"Array of segment IDs to add the contact to.","items":{"type":"string"},"type":"array"},"topics":{"description":"Array of topic subscriptions for the contact.","items":{"properties":{"id":{"description":"The topic ID.","type":"string"},"subscription":{"description":"The subscription status for this topic.","enum":["opt_in","opt_out"],"type":"string"}},"type":"object"},"type":"array"},"unsubscribed":{"description":"The Contact's global subscription status. If set to true, the contact will be unsubscribed from all Broadcasts.","example":false,"type":"boolean"}},"required":["email"],"type":"object"},"CreateContactPropertyOptions":{"properties":{"fallback_value":{"description":"The default value to use when the property is not set for a contact. Must match the type specified in the type field.","oneOf":[{"type":"string"},{"type":"number"}]},"key":{"description":"The property key. Max length is 50 characters. Only alphanumeric characters and underscores are allowed.","type":"string"},"type":{"description":"The property type.","enum":["string","number"],"type":"string"}},"required":["key","type"],"type":"object"},"CreateContactPropertyResponseSuccess":{"properties":{"id":{"description":"The ID of the contact property.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type of the response.","example":"contact_property","type":"string"}},"type":"object"},"CreateContactResponseSuccess":{"properties":{"id":{"description":"Unique identifier for the created contact.","example":"479e3145-dd38-476b-932c-529ceb705947","type":"string"},"object":{"description":"Type of the response object.","example":"contact","type":"string"}},"type":"object"},"CreateDomainRequest":{"properties":{"capabilities":{"$ref":"#/components/schemas/DomainCapabilities"},"click_tracking":{"description":"Track clicks within the body of each HTML email.","type":"boolean"},"custom_return_path":{"description":"For advanced use cases, choose a subdomain for the Return-Path address. Defaults to 'send' (i.e., send.yourdomain.tld).","type":"string"},"name":{"description":"The name of the domain you want to create.","type":"string"},"open_tracking":{"description":"Track the open rate of each email.","type":"boolean"},"region":{"default":"us-east-1","description":"The region where emails will be sent from. Possible values are us-east-1 | eu-west-1 | sa-east-1 | ap-northeast-1","enum":["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"],"type":"string"},"tls":{"default":"opportunistic","description":"TLS mode. Opportunistic attempts secure connection but falls back to unencrypted. Enforced requires TLS or email won't be sent.","enum":["opportunistic","enforced"],"type":"string"},"tracking_subdomain":{"description":"The subdomain to use for click and open tracking.","type":"string"}},"required":["name"],"type":"object"},"CreateDomainResponse":{"properties":{"capabilities":{"$ref":"#/components/schemas/DomainCapabilities"},"click_tracking":{"description":"Whether click tracking is enabled for this domain.","type":"boolean"},"created_at":{"description":"The date and time the domain was created.","format":"date-time","type":"string"},"id":{"description":"The ID of the domain.","type":"string"},"name":{"description":"The name of the domain.","type":"string"},"open_tracking":{"description":"Whether open tracking is enabled for this domain.","type":"boolean"},"records":{"items":{"$ref":"#/components/schemas/DomainRecord"},"type":"array"},"region":{"description":"The region where the domain is hosted.","type":"string"},"status":{"description":"The status of the domain.","type":"string"},"tracking_subdomain":{"description":"The subdomain used for click and open tracking.","type":"string"}},"type":"object"},"CreateEventRequest":{"properties":{"name":{"description":"The name of the event. Cannot start with the reserved `resend:` prefix.","type":"string"},"schema":{"description":"An optional flat key/type map defining the event payload schema. Supported types are `string`, `number`, `boolean`, and `date`.","type":["null","object"]}},"required":["name"],"type":"object"},"CreateEventResponse":{"properties":{"id":{"description":"The ID of the created event.","format":"uuid","type":"string"},"object":{"description":"Type of the response object.","example":"event","type":"string"}},"type":"object"},"CreateSegmentOptions":{"properties":{"audience_id":{"deprecated":true,"description":"The ID of the audience this segment belongs to.","type":"string"},"filter":{"description":"Filter conditions for the segment.","type":"object"},"name":{"description":"The name of the segment.","type":"string"}},"required":["name"],"type":"object"},"CreateSegmentResponseSuccess":{"properties":{"id":{"description":"The ID of the segment.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type of the response.","example":"segment","type":"string"}},"type":"object"},"CreateTemplateRequest":{"properties":{"alias":{"description":"The alias of the template.","type":"string"},"from":{"description":"Sender email address. To include a friendly name, use the format \"Your Name <sender@domain.com>\".","type":"string"},"html":{"description":"The HTML version of the template.","type":"string"},"name":{"description":"The name of the template.","type":"string"},"reply_to":{"description":"Reply-to email addresses.","items":{"type":"string"},"type":"array"},"subject":{"description":"Email subject.","type":"string"},"text":{"description":"The plain text version of the template.","type":"string"},"variables":{"items":{"$ref":"#/components/schemas/TemplateVariableInput"},"type":"array"}},"required":["html","name"],"type":"object"},"CreateTemplateResponseSuccess":{"properties":{"id":{"description":"The ID of the template.","type":"string"},"object":{"description":"The object type of the response.","example":"template","type":"string"}},"type":"object"},"CreateTopicOptions":{"properties":{"default_subscription":{"description":"The default subscription status for the topic. Cannot be changed after creation.","enum":["opt_in","opt_out"],"type":"string"},"description":{"description":"A description of the topic. Max 200 characters.","maxLength":200,"type":"string"},"name":{"description":"The name of the topic. Max 50 characters.","maxLength":50,"type":"string"},"visibility":{"default":"private","description":"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.","enum":["public","private"],"type":"string"}},"required":["default_subscription","name"],"type":"object"},"CreateTopicResponseSuccess":{"properties":{"id":{"description":"The ID of the topic.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type of the response.","example":"topic","type":"string"}},"type":"object"},"CreateWebhookRequest":{"properties":{"endpoint":{"description":"The URL where webhook events will be sent.","example":"https://webhook.example.com/handler","type":"string"},"events":{"description":"Array of event types to subscribe to.","example":["email.sent","email.delivered","email.bounced"],"items":{"type":"string"},"minItems":1,"type":"array"}},"required":["endpoint","events"],"type":"object"},"CreateWebhookResponse":{"properties":{"id":{"description":"The ID of the webhook.","example":"479e3145-dd38-476b-932c-529ceb705947","format":"uuid","type":"string"},"object":{"description":"The type of object.","example":"webhook","type":"string"},"signing_secret":{"description":"The secret key used to verify webhook payloads.","example":"whsec_...","type":"string"}},"type":"object"},"DeleteApiKeyResponse":{"properties":{"deleted":{"description":"Indicates whether the API key was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the API key.","type":"string"},"object":{"description":"The type of object.","example":"api_key","type":"string"}},"type":"object"},"DeleteAutomationResponse":{"properties":{"deleted":{"description":"Indicates whether the automation was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the deleted automation.","type":"string"},"object":{"description":"Type of the response object.","example":"automation","type":"string"}},"type":"object"},"DeleteDomainResponse":{"properties":{"deleted":{"description":"Indicates whether the domain was deleted successfully.","example":true,"type":"boolean"},"id":{"description":"The ID of the domain.","example":"d91cd9bd-1176-453e-8fc1-35364d380206","type":"string"},"object":{"description":"The type of object.","example":"domain","type":"string"}},"type":"object"},"DeleteWebhookResponse":{"properties":{"deleted":{"description":"Indicates whether the webhook was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the deleted webhook.","example":"479e3145-dd38-476b-932c-529ceb705947","format":"uuid","type":"string"},"object":{"description":"The type of object.","example":"webhook","type":"string"}},"type":"object"},"Domain":{"properties":{"capabilities":{"$ref":"#/components/schemas/DomainCapabilities"},"click_tracking":{"description":"Whether click tracking is enabled for this domain.","type":"boolean"},"created_at":{"description":"The date and time the domain was created.","example":"2023-04-26T20:21:26.347412+00:00","format":"date-time","type":"string"},"id":{"description":"The ID of the domain.","example":"d91cd9bd-1176-453e-8fc1-35364d380206","type":"string"},"name":{"description":"The name of the domain.","example":"example.com","type":"string"},"object":{"description":"The type of object.","example":"domain","type":"string"},"open_tracking":{"description":"Whether open tracking is enabled for this domain.","type":"boolean"},"records":{"items":{"$ref":"#/components/schemas/DomainRecord"},"type":"array"},"region":{"description":"The region where the domain is hosted.","example":"us-east-1","type":"string"},"status":{"description":"The status of the domain.","example":"not_started","type":"string"},"tracking_subdomain":{"description":"The subdomain used for click and open tracking.","type":"string"}},"type":"object"},"DomainCapabilities":{"description":"Configure the domain capabilities for sending and receiving emails. At least one capability must be enabled.","properties":{"receiving":{"description":"Enable or disable receiving emails to this domain.","enum":["enabled","disabled"],"type":"string"},"sending":{"description":"Enable or disable sending emails from this domain.","enum":["enabled","disabled"],"type":"string"}},"type":"object"},"DomainRecord":{"properties":{"name":{"description":"The name of the DNS record.","type":"string"},"priority":{"description":"The priority of the record (only applicable for MX records).","type":"integer"},"record":{"description":"The type of record (SPF for sending, DKIM for sending, Receiving for inbound emails, Tracking for click and open tracking).","enum":["SPF","DKIM","Receiving","Tracking"],"type":"string"},"status":{"description":"The status of the record.","enum":["pending","verified","failed","temporary_failure","not_started"],"type":"string"},"ttl":{"description":"The time to live for the record.","type":"string"},"type":{"description":"The DNS record type.","enum":["MX","TXT","CNAME"],"type":"string"},"value":{"description":"The value of the record.","type":"string"}},"type":"object"},"DuplicateTemplateResponseSuccess":{"properties":{"id":{"description":"The ID of the duplicated template.","type":"string"},"object":{"description":"The object type of the response.","example":"template","type":"string"}},"type":"object"},"Email":{"properties":{"bcc":{"description":"The email addresses of the blind carbon copy recipients.","items":{"type":"string"},"type":"array"},"cc":{"description":"The email addresses of the carbon copy recipients.","items":{"type":"string"},"type":"array"},"created_at":{"description":"The date and time the email was created.","example":"2023-04-03T22:13:42.674981+00:00","format":"date-time","type":"string"},"from":{"description":"The email address of the sender.","example":"Acme <onboarding@resend.dev>","type":"string"},"html":{"description":"The HTML body of the email.","example":"Congrats on sending your <strong>first email</strong>!","type":"string"},"id":{"description":"The ID of the email.","example":"4ef9a417-02e9-4d39-ad75-9611e0fcc33c","type":"string"},"last_event":{"description":"The status of the email.","example":"delivered","type":"string"},"object":{"description":"The type of object.","example":"email","type":"string"},"reply_to":{"description":"The email addresses to which replies should be sent.","items":{"type":"string"},"type":"array"},"subject":{"description":"The subject line of the email.","example":"Hello World","type":"string"},"text":{"description":"The plain text body of the email.","type":"string"},"to":{"example":["delivered@resend.dev"],"items":{"description":"The email addresses of the recipients.","type":"string"},"type":"array"}},"type":"object"},"EmailTemplateInput":{"properties":{"id":{"description":"The id of the published email template.","type":"string"},"variables":{"additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]},"description":"Template variables object with key/value pairs.","example":{"variableName":"Sign up now","variableName2":123},"type":"object"}},"required":["id"],"type":"object"},"Event":{"properties":{"created_at":{"description":"The date and time the event was created.","type":"string"},"id":{"description":"The event ID.","format":"uuid","type":"string"},"name":{"description":"The event name.","type":"string"},"object":{"description":"Type of the response object.","example":"event","type":"string"},"schema":{"description":"A flat key/type map defining the event payload schema. Supported types are `string`, `number`, `boolean`, and `date`.","type":["null","object"]},"updated_at":{"description":"The date and time the event was last updated.","type":["null","string"]}},"type":"object"},"EventSummary":{"properties":{"created_at":{"description":"The date and time the event was created.","type":"string"},"id":{"description":"The event ID.","format":"uuid","type":"string"},"name":{"description":"The event name.","type":"string"},"schema":{"description":"A flat key/type map defining the event payload schema. Supported types are `string`, `number`, `boolean`, and `date`.","type":["null","object"]},"updated_at":{"description":"The date and time the event was last updated.","type":["null","string"]}},"type":"object"},"GetAudienceResponseSuccess":{"deprecated":true,"properties":{"created_at":{"description":"The date that the object was created.","example":"2023-10-06T22:59:55.977Z","type":"string"},"id":{"description":"The ID of the audience.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"name":{"description":"The name of the audience.","example":"Registered Users","type":"string"},"object":{"description":"The object of the audience.","example":"audience","type":"string"}},"type":"object"},"GetBroadcastResponseSuccess":{"properties":{"audience_id":{"deprecated":true,"description":"Deprecated: use `segment_id` instead. Unique identifier of the segment this broadcast will be sent to.","type":["null","string"]},"created_at":{"description":"Timestamp indicating when the broadcast was created.","example":"2023-10-06T22:59:55.977Z","format":"date-time","type":"string"},"from":{"description":"The email address of the sender.","example":"Acme <onboarding@resend.dev>","type":"string"},"html":{"description":"The HTML version of the broadcast content.","example":"<p>Hello {{{FIRST_NAME|there}}}!</p>","type":["null","string"]},"id":{"description":"Unique identifier for the broadcast.","example":"e169aa45-1ecf-4183-9955-b1499d5701d3","type":"string"},"name":{"description":"Name of the broadcast.","example":"November announcements","type":"string"},"preview_text":{"description":"The preview text of the email.","example":"Here are our announcements","type":"string"},"reply_to":{"description":"The email addresses to which replies should be sent.","items":{"type":"string"},"type":"array"},"scheduled_at":{"description":"Timestamp indicating when the broadcast is scheduled to be sent.","example":"2023-10-06T22:59:55.977Z","format":"date-time","type":"string"},"segment_id":{"description":"Unique identifier of the segment this broadcast will be sent to.","type":["null","string"]},"sent_at":{"description":"Timestamp indicating when the broadcast was sent.","example":"2023-10-06T22:59:55.977Z","format":"date-time","type":"string"},"status":{"description":"The status of the broadcast.","example":"draft","type":"string"},"subject":{"description":"The subject line of the email.","example":"Hello World","type":"string"},"text":{"description":"The plain text version of the broadcast content.","example":"Hello {{{FIRST_NAME|there}}}!","type":["null","string"]},"topic_id":{"description":"The topic ID that the broadcast is scoped to.","example":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","type":["null","string"]}},"type":"object"},"GetContactPropertyResponseSuccess":{"properties":{"created_at":{"description":"Timestamp indicating when the contact property was created.","format":"date-time","type":"string"},"fallback_value":{"description":"The default value when the property is not set for a contact.","example":"Acme Corp","oneOf":[{"type":"string"},{"type":"number"}]},"id":{"description":"The ID of the contact property.","example":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","type":"string"},"key":{"description":"The property key.","example":"company_name","type":"string"},"object":{"description":"The object type.","example":"contact_property","type":"string"},"type":{"description":"The property type.","example":"string","type":"string"}},"type":"object"},"GetContactResponseSuccess":{"properties":{"created_at":{"description":"Timestamp indicating when the contact was created.","example":"2023-10-06T23:47:56.678Z","format":"date-time","type":"string"},"email":{"description":"Email address of the contact.","example":"steve.wozniak@gmail.com","type":"string"},"first_name":{"description":"First name of the contact.","example":"Steve","type":"string"},"id":{"description":"Unique identifier for the contact.","example":"e169aa45-1ecf-4183-9955-b1499d5701d3","type":"string"},"last_name":{"description":"Last name of the contact.","example":"Wozniak","type":"string"},"object":{"description":"Type of the response object.","example":"contact","type":"string"},"properties":{"additionalProperties":true,"description":"A map of custom property keys and values.","type":"object"},"unsubscribed":{"description":"Indicates if the contact is unsubscribed.","example":false,"type":"boolean"}},"type":"object"},"GetContactTopicsResponseSuccess":{"properties":{"data":{"description":"Array containing topic subscriptions for this contact.","items":{"properties":{"description":{"description":"Description of the topic.","type":"string"},"id":{"description":"Unique identifier for the topic.","type":"string"},"name":{"description":"Name of the topic.","type":"string"},"subscription":{"description":"The subscription status for this topic.","enum":["opt_in","opt_out"],"type":"string"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"GetReceivedEmailResponse":{"properties":{"attachments":{"description":"Array of attachments.","items":{"properties":{"content_disposition":{"description":"How the attachment should be displayed.","enum":["inline","attachment"],"type":"string"},"content_id":{"description":"The content ID for inline attachments.","type":"string"},"content_type":{"description":"The MIME type of the attachment.","type":"string"},"filename":{"description":"The filename of the attachment.","type":"string"},"id":{"description":"The ID of the attachment.","format":"uuid","type":"string"},"size":{"description":"Size of the attachment in bytes.","type":"integer"}},"type":"object"},"type":"array"},"bcc":{"description":"The BCC recipients.","example":[],"items":{"type":"string"},"type":["array","null"]},"cc":{"description":"The CC recipients.","example":[],"items":{"type":"string"},"type":["array","null"]},"created_at":{"description":"Timestamp when the email was received.","example":"2023-10-06:23:47:56.678Z","format":"date-time","type":"string"},"from":{"description":"The sender email address.","example":"sender@example.com","type":"string"},"headers":{"description":"The email headers.","example":{"X-Custom-Header":"value"},"type":["null","object"]},"html":{"description":"The HTML content of the email.","example":"<p>Email content</p>","type":["null","string"]},"id":{"description":"The ID of the received email.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string"},"message_id":{"description":"The unique message ID from the email headers.","example":"<message-id@example.com>","type":"string"},"object":{"description":"The type of object.","example":"email","type":"string"},"reply_to":{"description":"The reply-to addresses.","example":[],"items":{"type":"string"},"type":["array","null"]},"subject":{"description":"The email subject.","example":"Hello World","type":"string"},"text":{"description":"The plain text content of the email.","example":"Email content","type":["null","string"]},"to":{"description":"The recipient email addresses.","example":["delivered@resend.dev"],"items":{"type":"string"},"type":"array"}},"type":"object"},"GetSegmentResponseSuccess":{"properties":{"audience_id":{"deprecated":true,"description":"The ID of the audience this segment belongs to.","type":"string"},"created_at":{"description":"Timestamp indicating when the segment was created.","format":"date-time","type":"string"},"filter":{"description":"Filter conditions for the segment.","type":"object"},"id":{"description":"The ID of the segment.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"name":{"description":"The name of the segment.","example":"Active Users","type":"string"},"object":{"description":"The object type.","example":"segment","type":"string"}},"type":"object"},"GetTopicResponseSuccess":{"properties":{"created_at":{"description":"Timestamp indicating when the topic was created.","format":"date-time","type":"string"},"default_subscription":{"description":"The default subscription status for the topic.","enum":["opt_in","opt_out"],"type":"string"},"description":{"description":"A description of the topic.","type":"string"},"id":{"description":"The ID of the topic.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"name":{"description":"The name of the topic.","example":"Newsletter","type":"string"},"object":{"description":"The object type.","example":"topic","type":"string"},"visibility":{"description":"The visibility of the topic.","enum":["public","private"],"type":"string"}},"type":"object"},"GetWebhookResponse":{"properties":{"created_at":{"description":"Timestamp indicating when the webhook was created.","example":"2023-10-06T23:47:56.678Z","format":"date-time","type":"string"},"endpoint":{"description":"The URL where webhook events are sent.","example":"https://webhook.example.com/handler","type":"string"},"events":{"description":"Array of event types subscribed to.","example":["email.sent","email.delivered"],"items":{"type":"string"},"type":["array","null"]},"id":{"description":"The ID of the webhook.","example":"479e3145-dd38-476b-932c-529ceb705947","format":"uuid","type":"string"},"object":{"description":"The type of object.","example":"webhook","type":"string"},"signing_secret":{"description":"The secret key used to verify webhook payloads.","example":"whsec_...","type":"string"},"status":{"description":"The status of the webhook.","example":"enabled","type":"string"}},"type":"object"},"ListApiKeysResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ApiKey"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListAttachmentsResponse":{"properties":{"data":{"description":"Array containing attachment information.","items":{"properties":{"content_disposition":{"description":"How the attachment should be displayed.","enum":["inline","attachment"],"example":"attachment","type":"string"},"content_id":{"description":"The content ID for inline attachments.","example":"img001","type":"string"},"content_type":{"description":"The MIME type of the attachment.","example":"application/pdf","type":"string"},"download_url":{"description":"Signed URL to download the attachment content.","example":"https://cloudfront.example.com/path?Signature=...","type":"string"},"expires_at":{"description":"Timestamp when the download URL expires.","example":"2024-10-27T18:30:00.000Z","format":"date-time","type":"string"},"filename":{"description":"The filename of the attachment.","example":"document.pdf","type":"string"},"id":{"description":"The ID of the attachment.","example":"660e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string"},"size":{"description":"Size of the attachment in bytes.","example":2048,"type":"integer"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListAudiencesResponseSuccess":{"deprecated":true,"properties":{"data":{"description":"Array containing audience information.","items":{"properties":{"created_at":{"description":"Timestamp indicating when the audience was created.","example":"2023-10-06T22:59:55.977Z","format":"date-time","type":"string"},"id":{"description":"Unique identifier for the audience.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"name":{"description":"Name of the audience.","example":"Registered Users","type":"string"}},"type":"object"},"type":"array"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListAutomationRunsResponse":{"properties":{"data":{"description":"Array of automation runs.","items":{"$ref":"#/components/schemas/AutomationRunListItem"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListAutomationsResponse":{"properties":{"data":{"description":"Array of automations.","items":{"$ref":"#/components/schemas/AutomationListItem"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListBroadcastsResponseSuccess":{"properties":{"data":{"description":"Array containing broadcast information.","items":{"properties":{"audience_id":{"deprecated":true,"description":"Deprecated. Use segment_id instead.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"created_at":{"description":"Timestamp indicating when the broadcast was created.","example":"2023-10-06T22:59:55.977Z","format":"date-time","type":"string"},"id":{"description":"Unique identifier for the broadcast.","example":"e169aa45-1ecf-4183-9955-b1499d5701d3","type":"string"},"name":{"description":"Name of the broadcast.","example":"November announcements","type":"string"},"scheduled_at":{"description":"Timestamp indicating when the broadcast is scheduled to be sent.","example":"2023-10-06T22:59:55.977Z","format":"date-time","type":"string"},"segment_id":{"description":"Unique identifier of the segment this broadcast will be sent to.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"sent_at":{"description":"Timestamp indicating when the broadcast was sent.","example":"2023-10-06T22:59:55.977Z","format":"date-time","type":"string"},"status":{"description":"The status of the broadcast.","example":"draft","type":"string"},"topic_id":{"description":"The topic ID that the broadcast is scoped to.","example":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","type":"string"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListContactPropertiesResponseSuccess":{"properties":{"data":{"description":"Array containing contact property information.","items":{"properties":{"created_at":{"description":"Timestamp indicating when the contact property was created.","format":"date-time","type":"string"},"fallback_value":{"description":"The default value when the property is not set for a contact.","oneOf":[{"type":"string"},{"type":"number"}]},"id":{"description":"Unique identifier for the contact property.","type":"string"},"key":{"description":"The property key.","type":"string"},"type":{"description":"The property type.","type":"string"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListContactSegmentsResponseSuccess":{"properties":{"data":{"description":"Array containing segment information for this contact.","items":{"properties":{"created_at":{"description":"Timestamp indicating when the contact was added to the segment.","format":"date-time","type":"string"},"id":{"description":"Unique identifier for the segment.","type":"string"},"name":{"description":"Name of the segment.","type":"string"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListContactsResponseSuccess":{"properties":{"data":{"description":"Array containing contact information.","items":{"properties":{"created_at":{"description":"Timestamp indicating when the contact was created.","example":"2023-10-06T23:47:56.678Z","format":"date-time","type":"string"},"email":{"description":"Email address of the contact.","example":"steve.wozniak@gmail.com","type":"string"},"first_name":{"description":"First name of the contact.","example":"Steve","type":"string"},"id":{"description":"Unique identifier for the contact.","example":"e169aa45-1ecf-4183-9955-b1499d5701d3","type":"string"},"last_name":{"description":"Last name of the contact.","example":"Wozniak","type":"string"},"unsubscribed":{"description":"Indicates if the contact is unsubscribed.","example":false,"type":"boolean"}},"type":"object"},"type":"array"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListDomainsItem":{"properties":{"capabilities":{"$ref":"#/components/schemas/DomainCapabilities"},"created_at":{"description":"The date and time the domain was created.","example":"2023-04-26T20:21:26.347412+00:00","format":"date-time","type":"string"},"id":{"description":"The ID of the domain.","example":"d91cd9bd-1176-453e-8fc1-35364d380206","type":"string"},"name":{"description":"The name of the domain.","example":"example.com","type":"string"},"region":{"description":"The region where the domain is hosted.","example":"us-east-1","type":"string"},"status":{"description":"The status of the domain.","example":"not_started","type":"string"}},"type":"object"},"ListDomainsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ListDomainsItem"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListEmailsResponse":{"properties":{"data":{"description":"Array containing email information.","items":{"$ref":"#/components/schemas/Email"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListEventsResponse":{"properties":{"data":{"description":"Array containing event information.","items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListLogsResponse":{"properties":{"data":{"description":"Array containing log information.","items":{"$ref":"#/components/schemas/LogSummary"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListReceivedEmailsResponse":{"properties":{"data":{"description":"Array containing received email information.","items":{"properties":{"attachments":{"description":"Array of attachments for this email.","items":{"properties":{"content_disposition":{"description":"How the attachment should be displayed.","enum":["inline","attachment"],"type":"string"},"content_id":{"description":"The content ID for inline attachments.","type":"string"},"content_type":{"description":"The MIME type of the attachment.","type":"string"},"filename":{"description":"The filename of the attachment.","type":"string"},"id":{"description":"The ID of the attachment.","format":"uuid","type":"string"},"size":{"description":"Size of the attachment in bytes.","type":"integer"}},"type":"object"},"type":"array"},"bcc":{"description":"The BCC recipients.","items":{"type":"string"},"type":["array","null"]},"cc":{"description":"The CC recipients.","items":{"type":"string"},"type":["array","null"]},"created_at":{"description":"Timestamp when the email was received.","example":"2023-10-06T23:47:56.678Z","format":"date-time","type":"string"},"from":{"description":"The sender email address.","example":"sender@example.com","type":"string"},"id":{"description":"The ID of the received email.","example":"550e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string"},"message_id":{"description":"The unique message ID from the email headers.","example":"<message-id@example.com>","type":"string"},"reply_to":{"description":"The reply-to addresses.","items":{"type":"string"},"type":["array","null"]},"subject":{"description":"The email subject.","example":"Hello World","type":["null","string"]},"to":{"description":"The recipient email addresses.","example":["delivered@resend.dev"],"items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListSegmentsResponseSuccess":{"properties":{"data":{"description":"Array containing segment information.","items":{"properties":{"audience_id":{"deprecated":true,"description":"The ID of the audience this segment belongs to.","type":"string"},"created_at":{"description":"Timestamp indicating when the segment was created.","format":"date-time","type":"string"},"id":{"description":"Unique identifier for the segment.","type":"string"},"name":{"description":"Name of the segment.","type":"string"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListTemplatesResponseSuccess":{"properties":{"data":{"description":"Array containing templates information.","items":{"$ref":"#/components/schemas/TemplateListItem"},"type":"array"},"has_more":{"description":"Indicates if there are more templates to retrieve.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListTopicsResponseSuccess":{"properties":{"data":{"description":"Array containing topic information.","items":{"properties":{"created_at":{"description":"Timestamp indicating when the topic was created.","format":"date-time","type":"string"},"default_subscription":{"description":"The default subscription status for the topic.","enum":["opt_in","opt_out"],"type":"string"},"description":{"description":"A description of the topic.","type":"string"},"id":{"description":"Unique identifier for the topic.","type":"string"},"name":{"description":"Name of the topic.","type":"string"},"visibility":{"description":"The visibility of the topic.","enum":["public","private"],"type":"string"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"ListWebhooksResponse":{"properties":{"data":{"description":"Array containing webhook information.","items":{"properties":{"created_at":{"description":"Timestamp indicating when the webhook was created.","example":"2023-10-06T23:47:56.678Z","format":"date-time","type":"string"},"endpoint":{"description":"The URL where webhook events are sent.","example":"https://webhook.example.com/handler","type":"string"},"events":{"description":"Array of event types subscribed to.","example":["email.sent"],"items":{"type":"string"},"type":["array","null"]},"id":{"description":"The ID of the webhook.","example":"479e3145-dd38-476b-932c-529ceb705947","format":"uuid","type":"string"},"status":{"description":"The status of the webhook.","example":"enabled","type":"string"}},"type":"object"},"type":"array"},"has_more":{"description":"Indicates if there are more results available.","example":false,"type":"boolean"},"object":{"description":"Type of the response object.","example":"list","type":"string"}},"type":"object"},"Log":{"properties":{"created_at":{"description":"The date the log was created.","format":"date-time","type":"string"},"endpoint":{"description":"The API endpoint that was called.","type":"string"},"id":{"description":"The log ID.","format":"uuid","type":"string"},"method":{"description":"The HTTP method used.","enum":["GET","POST","PUT","DELETE","PATCH","OPTIONS"],"type":"string"},"object":{"description":"Type of the response object.","example":"log","type":"string"},"request_body":{"anyOf":[{"description":"The request body sent to the API."},{"type":"null"}]},"response_body":{"anyOf":[{"description":"The response body returned by the API."},{"type":"null"}]},"response_status":{"description":"The HTTP status code of the response.","type":"integer"},"user_agent":{"description":"The user agent of the request.","type":["null","string"]}},"type":"object"},"LogSummary":{"properties":{"created_at":{"description":"The date the log was created.","format":"date-time","type":"string"},"endpoint":{"description":"The API endpoint that was called.","type":"string"},"id":{"description":"The log ID.","format":"uuid","type":"string"},"method":{"description":"The HTTP method used.","enum":["GET","POST","PUT","DELETE","PATCH","OPTIONS"],"type":"string"},"response_status":{"description":"The HTTP status code of the response.","type":"integer"},"user_agent":{"description":"The user agent of the request.","type":["null","string"]}},"type":"object"},"PatchAutomationRequest":{"description":"At least one of `name`, `status`, or `steps` and `connections` must be provided. When updating the workflow graph, both `steps` and `connections` must be provided together.\n","properties":{"connections":{"description":"The connections between steps in the automation graph. Must be provided together with `steps`.","items":{"$ref":"#/components/schemas/AutomationConnection"},"type":"array"},"name":{"description":"The name of the automation.","minLength":1,"type":"string"},"status":{"description":"The status of the automation.","enum":["enabled","disabled"],"type":"string"},"steps":{"description":"The steps that compose the automation workflow. Must be provided together with `connections`.","items":{"$ref":"#/components/schemas/AutomationStep"},"maxItems":150,"minItems":1,"type":"array"}},"type":"object"},"PatchAutomationResponse":{"properties":{"id":{"description":"The ID of the updated automation.","type":"string"},"object":{"description":"Type of the response object.","example":"automation","type":"string"}},"type":"object"},"PublishTemplateResponseSuccess":{"properties":{"id":{"description":"The ID of the template.","type":"string"},"object":{"description":"The object type of the response.","example":"template","type":"string"}},"type":"object"},"RemoveAudienceResponseSuccess":{"deprecated":true,"properties":{"deleted":{"description":"The deleted attribute indicates that the corresponding audience has been deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the audience.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object of the audience.","example":"audience","type":"string"}},"type":"object"},"RemoveBroadcastResponseSuccess":{"properties":{"deleted":{"description":"The deleted attribute indicates that the corresponding broadcast has been deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the broadcast.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"Type of the response object.","example":"broadcast","type":"string"}},"type":"object"},"RemoveContactFromSegmentResponseSuccess":{"properties":{"contact_id":{"description":"The ID of the contact.","type":"string"},"deleted":{"description":"Indicates whether the contact was successfully removed from the segment.","example":true,"type":"boolean"},"object":{"description":"The object type.","example":"contact_segment","type":"string"},"segment_id":{"description":"The ID of the segment.","type":"string"}},"type":"object"},"RemoveContactPropertyResponseSuccess":{"properties":{"deleted":{"description":"Indicates whether the contact property was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the contact property.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type.","example":"contact_property","type":"string"}},"type":"object"},"RemoveContactResponseSuccess":{"properties":{"deleted":{"description":"Indicates whether the contact was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"Unique identifier for the removed contact.","example":"520784e2-887d-4c25-b53c-4ad46ad38100","type":"string"},"object":{"description":"Type of the response object.","example":"contact","type":"string"}},"type":"object"},"RemoveEventResponse":{"properties":{"deleted":{"description":"Indicates whether the event was deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the deleted event.","format":"uuid","type":"string"},"object":{"description":"Type of the response object.","example":"event","type":"string"}},"type":"object"},"RemoveSegmentResponseSuccess":{"properties":{"deleted":{"description":"Indicates whether the segment was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the segment.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type.","example":"segment","type":"string"}},"type":"object"},"RemoveTemplateResponseSuccess":{"properties":{"deleted":{"description":"Indicates whether the template was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the template.","type":"string"},"object":{"description":"Type of the response object.","example":"template","type":"string"}},"type":"object"},"RemoveTopicResponseSuccess":{"properties":{"deleted":{"description":"Indicates whether the topic was successfully deleted.","example":true,"type":"boolean"},"id":{"description":"The ID of the topic.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type.","example":"topic","type":"string"}},"type":"object"},"RetrievedAttachment":{"properties":{"content_disposition":{"description":"How the attachment should be displayed.","enum":["inline","attachment"],"example":"attachment","type":"string"},"content_id":{"description":"The content ID for inline attachments.","example":"img001","type":"string"},"content_type":{"description":"The MIME type of the attachment.","example":"application/pdf","type":"string"},"download_url":{"description":"Signed URL to download the attachment content.","example":"https://cloudfront.example.com/path?Signature=...","type":"string"},"expires_at":{"description":"Timestamp when the download URL expires.","example":"2024-10-27T18:30:00.000Z","format":"date-time","type":"string"},"filename":{"description":"The filename of the attachment.","example":"document.pdf","type":"string"},"id":{"description":"The ID of the attachment.","example":"660e8400-e29b-41d4-a716-446655440000","format":"uuid","type":"string"},"object":{"description":"The type of object.","example":"attachment","type":"string"},"size":{"description":"Size of the attachment in bytes.","example":2048,"type":"integer"}},"type":"object"},"SendBroadcastOptions":{"properties":{"scheduled_at":{"description":"Schedule email to be sent later. The date should be in ISO 8601 format.","type":"string"}},"type":"object"},"SendBroadcastResponseSuccess":{"properties":{"id":{"description":"The ID of the broadcast.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"}},"type":"object"},"SendEmailRequest":{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array"},"bcc":{"description":"Bcc recipient email address. For multiple addresses, send as an array of strings.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"cc":{"description":"Cc recipient email address. For multiple addresses, send as an array of strings.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"from":{"description":"Sender email address. To include a friendly name, use the format \"Your Name <sender@domain.com>\".","type":"string"},"headers":{"description":"Custom headers to add to the email.","type":"object"},"html":{"description":"The HTML version of the message.","type":"string"},"reply_to":{"description":"Reply-to email address. For multiple addresses, send as an array of strings.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"scheduled_at":{"description":"Schedule email to be sent later. The date should be in ISO 8601 format.","type":"string"},"subject":{"description":"Email subject.","type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"template":{"allOf":[{"$ref":"#/components/schemas/EmailTemplateInput"},{"description":"Use a published template to send the email. If provided, do not include html or text."}]},"text":{"description":"The plain text version of the message.","type":"string"},"to":{"description":"Recipient email address. For multiple addresses, send as an array of strings. Max 50.","oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"minItems":1,"type":"array"}]},"topic_id":{"description":"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.","type":"string"}},"required":["from","subject","to"],"type":"object"},"SendEmailResponse":{"properties":{"id":{"description":"The ID of the sent email.","type":"string"}},"type":"object"},"SendEventRequest":{"properties":{"contact_id":{"description":"The ID of the contact to associate with this event. Exactly one of `contact_id` or `email` must be provided.","format":"uuid","type":"string"},"email":{"description":"The email address to associate with this event. Exactly one of `contact_id` or `email` must be provided.","format":"email","type":"string"},"event":{"description":"The name of the event to send.","type":"string"},"payload":{"additionalProperties":true,"description":"An optional payload of key/value pairs to include with the event.","type":"object"}},"required":["event"],"type":"object"},"SendEventResponse":{"properties":{"event":{"description":"The name of the event that was sent.","type":"string"},"object":{"description":"Type of the response object.","example":"event","type":"string"}},"type":"object"},"StopAutomationResponse":{"properties":{"id":{"description":"The ID of the stopped automation.","type":"string"},"object":{"description":"Type of the response object.","example":"automation","type":"string"},"status":{"description":"The status of the automation after stopping.","example":"disabled","type":"string"}},"type":"object"},"Tag":{"properties":{"name":{"description":"The name of the email tag. It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.","type":"string"},"value":{"description":"The value of the email tag.It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-). It can contain no more than 256 characters.","type":"string"}},"type":"object"},"Template":{"properties":{"alias":{"description":"The alias of the template.","type":"string"},"created_at":{"description":"Timestamp indicating when the template was created.","format":"date-time","type":"string"},"current_version_id":{"description":"The ID of the current version of the template.","type":"string"},"from":{"description":"Sender email address. To include a friendly name, use the format \"Your Name <sender@domain.com>\".","type":"string"},"has_unpublished_versions":{"description":"Indicates whether the template has unpublished versions.","type":"boolean"},"html":{"description":"The HTML version of the template.","type":"string"},"id":{"description":"The ID of the template.","type":"string"},"name":{"description":"The name of the template.","type":"string"},"object":{"description":"The type of object.","example":"template","type":"string"},"published_at":{"description":"Timestamp indicating when the template was published.","format":"date-time","type":["null","string"]},"reply_to":{"description":"Reply-to email addresses.","items":{"type":"string"},"type":["array","null"]},"status":{"description":"The publication status of the template.","enum":["draft","published"],"type":"string"},"subject":{"description":"Email subject.","type":"string"},"text":{"description":"The plain text version of the template.","type":"string"},"updated_at":{"description":"Timestamp indicating when the template was last updated.","format":"date-time","type":"string"},"variables":{"items":{"$ref":"#/components/schemas/TemplateVariable"},"type":"array"}},"type":"object"},"TemplateListItem":{"properties":{"alias":{"description":"The alias of the template.","type":"string"},"created_at":{"description":"Timestamp indicating when the template was created.","format":"date-time","type":"string"},"id":{"description":"The ID of the template.","type":"string"},"name":{"description":"The name of the template.","type":"string"},"published_at":{"description":"Timestamp indicating when the template was published.","format":"date-time","type":["null","string"]},"status":{"description":"The publication status of the template.","enum":["draft","published"],"type":"string"},"updated_at":{"description":"Timestamp indicating when the template was last updated.","format":"date-time","type":"string"}},"type":"object"},"TemplateVariable":{"properties":{"created_at":{"description":"Timestamp indicating when the variable was created.","format":"date-time","type":"string"},"fallback_value":{"description":"The fallback value of the variable.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"items":{},"type":"array"}]},"id":{"description":"The ID of the template variable.","type":"string"},"key":{"description":"The key of the variable.","type":"string"},"type":{"description":"The type of the variable.","enum":["string","number","boolean","object","list"],"type":"string"},"updated_at":{"description":"Timestamp indicating when the variable was last updated.","format":"date-time","type":"string"}},"required":["key","type"],"type":"object"},"TemplateVariableInput":{"properties":{"fallback_value":{"description":"The fallback value of the variable.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"object"},{"items":{},"type":"array"}]},"key":{"description":"The key of the variable.","type":"string"},"type":{"description":"The type of the variable.","enum":["string","number","boolean","object","list"],"type":"string"}},"required":["key","type"],"type":"object"},"UpdateBroadcastOptions":{"properties":{"audience_id":{"deprecated":true,"description":"Use `segment_id` instead. Unique identifier of the audience this broadcast will be sent to.","type":"string"},"from":{"description":"The email address of the sender.","type":"string"},"html":{"description":"The HTML version of the message.","type":"string"},"name":{"description":"Name of the broadcast.","type":"string"},"preview_text":{"description":"The preview text of the email.","type":"string"},"reply_to":{"description":"The email addresses to which replies should be sent.","items":{"type":"string"},"type":"array"},"segment_id":{"description":"Unique identifier of the segment this broadcast will be sent to.","type":"string"},"subject":{"description":"The subject line of the email.","type":"string"},"text":{"description":"The plain text version of the message.","type":"string"},"topic_id":{"description":"The topic ID that the broadcast will be scoped to.","type":"string"}},"type":"object"},"UpdateBroadcastResponseSuccess":{"properties":{"id":{"description":"The ID of the broadcast.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type of the response.","example":"broadcast","type":"string"}},"type":"object"},"UpdateContactOptions":{"properties":{"email":{"description":"Email address of the contact.","example":"steve.wozniak@gmail.com","type":"string"},"first_name":{"description":"First name of the contact.","example":"Steve","type":"string"},"last_name":{"description":"Last name of the contact.","example":"Wozniak","type":"string"},"properties":{"additionalProperties":true,"description":"A map of custom property keys and values to update.","type":"object"},"unsubscribed":{"description":"The Contact's global subscription status. If set to true, the contact will be unsubscribed from all Broadcasts.","example":false,"type":"boolean"}},"type":"object"},"UpdateContactPropertyOptions":{"properties":{"fallback_value":{"description":"The default value to use when the property is not set for a contact. Must match the type of the property.","oneOf":[{"type":"string"},{"type":"number"}]}},"type":"object"},"UpdateContactPropertyResponseSuccess":{"properties":{"id":{"description":"The ID of the contact property.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type.","example":"contact_property","type":"string"}},"type":"object"},"UpdateContactResponseSuccess":{"properties":{"id":{"description":"Unique identifier for the updated contact.","example":"479e3145-dd38-476b-932c-529ceb705947","type":"string"},"object":{"description":"Type of the response object.","example":"contact","type":"string"}},"type":"object"},"UpdateContactTopicsOptions":{"properties":{"topics":{"items":{"properties":{"id":{"description":"The ID of the topic.","type":"string"},"subscription":{"description":"The subscription status (opt_in or opt_out).","enum":["opt_in","opt_out"],"type":"string"}},"type":"object"},"type":"array"}},"required":["topics"],"type":"object"},"UpdateContactTopicsResponseSuccess":{"properties":{"contact_id":{"description":"The ID of the contact.","type":"string"},"object":{"description":"The object type.","example":"contact_topics","type":"string"},"topics":{"description":"Array of updated topic subscriptions.","items":{"properties":{"id":{"description":"The ID of the topic.","type":"string"},"subscription":{"description":"The subscription status.","enum":["opt_in","opt_out"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"UpdateDomainOptions":{"properties":{"capabilities":{"$ref":"#/components/schemas/DomainCapabilities"},"click_tracking":{"description":"Track clicks within the body of each HTML email.","type":"boolean"},"open_tracking":{"description":"Track the open rate of each email.","type":"boolean"},"tls":{"default":"opportunistic","description":"enforced | opportunistic.","type":"string"},"tracking_subdomain":{"description":"The subdomain to use for click and open tracking.","type":"string"}},"type":"object"},"UpdateDomainResponseSuccess":{"properties":{"id":{"description":"The ID of the updated domain.","example":"d91cd9bd-1176-453e-8fc1-35364d380206","type":"string"},"object":{"description":"The object type representing the updated domain.","example":"domain","type":"string"}},"type":"object"},"UpdateEmailOptions":{"properties":{"scheduled_at":{"description":"Schedule email to be sent later. The date should be in ISO 8601 format.","type":"string"}},"type":"object"},"UpdateEventRequest":{"properties":{"schema":{"description":"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`.","type":["null","object"]}},"required":["schema"],"type":"object"},"UpdateEventResponse":{"properties":{"id":{"description":"The ID of the updated event.","format":"uuid","type":"string"},"object":{"description":"Type of the response object.","example":"event","type":"string"}},"type":"object"},"UpdateTemplateOptions":{"properties":{"alias":{"description":"The alias of the template.","type":"string"},"from":{"description":"Sender email address. To include a friendly name, use the format \"Your Name <sender@domain.com>\".","type":"string"},"html":{"description":"The HTML version of the template.","type":"string"},"name":{"description":"The name of the template.","type":"string"},"reply_to":{"description":"Reply-to email addresses.","items":{"type":"string"},"type":"array"},"subject":{"description":"Email subject.","type":"string"},"text":{"description":"The plain text version of the template.","type":"string"},"variables":{"items":{"$ref":"#/components/schemas/TemplateVariableInput"},"type":"array"}},"type":"object"},"UpdateTemplateResponseSuccess":{"properties":{"id":{"description":"The ID of the template.","type":"string"},"object":{"description":"The object type of the response.","example":"template","type":"string"}},"type":"object"},"UpdateTopicOptions":{"properties":{"description":{"description":"A description of the topic. Max 200 characters.","maxLength":200,"type":"string"},"name":{"description":"The name of the topic. Max 50 characters.","maxLength":50,"type":"string"},"visibility":{"description":"The visibility of the topic.","enum":["public","private"],"type":"string"}},"type":"object"},"UpdateTopicResponseSuccess":{"properties":{"id":{"description":"The ID of the topic.","example":"78261eea-8f8b-4381-83c6-79fa7120f1cf","type":"string"},"object":{"description":"The object type.","example":"topic","type":"string"}},"type":"object"},"UpdateWebhookRequest":{"properties":{"endpoint":{"description":"The URL where webhook events will be sent.","example":"https://webhook.example.com/new-handler","type":"string"},"events":{"description":"Array of event types to subscribe to.","example":["email.sent","email.delivered"],"items":{"type":"string"},"minItems":1,"type":"array"},"status":{"description":"The status of the webhook.","enum":["enabled","disabled"],"example":"enabled","type":"string"}},"type":"object"},"UpdateWebhookResponse":{"properties":{"id":{"description":"The ID of the updated webhook.","example":"479e3145-dd38-476b-932c-529ceb705947","format":"uuid","type":"string"},"object":{"description":"The type of object.","example":"webhook","type":"string"}},"type":"object"},"VerifyDomainResponse":{"properties":{"id":{"description":"The ID of the domain.","example":"d91cd9bd-1176-453e-8fc1-35364d380206","type":"string"},"object":{"description":"The type of object.","example":"domain","type":"string"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}}},"info":{"description":"Resend is the email platform for developers.","title":"Resend","version":"1.5.0"},"openapi":"3.0.3","paths":{"/api-keys":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}},"description":"OK"}},"summary":"Retrieve a list of API keys","tags":["API keys"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/api-keys?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/api-keys?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/api-keys?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/api-keys?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/api-keys?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/api-keys?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/api-keys?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/api-keys?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/api-keys?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}},"description":"OK"}},"summary":"Create a new API key","tags":["API keys"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/api-keys\");\nrequest.Content = new StringContent(\"{\\\"domain_id\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"permission\\\":\\\"full_access\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/api-keys' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"domain_id\":\"string\",\"name\":\"string\",\"permission\":\"full_access\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"domain_id\":\"string\",\"name\":\"string\",\"permission\":\"full_access\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/api-keys\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/api-keys\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"domain_id\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"permission\\\":\\\"full_access\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/api-keys', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"domain_id\":\"string\",\"name\":\"string\",\"permission\":\"full_access\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/api-keys', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"domain_id\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"permission\\\":\\\"full_access\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/api-keys\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"domain_id\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"permission\\\":\\\"full_access\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/api-keys\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"domain_id\":\"string\",\"name\":\"string\",\"permission\":\"full_access\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/api-keys\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"domain_id\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"permission\\\":\\\"full_access\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/api-keys/{api_key_id}":{"delete":{"parameters":[{"description":"The API key ID.","in":"path","name":"api_key_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteApiKeyResponse"}}},"description":"OK"}},"summary":"Remove an existing API key","tags":["API keys"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/api-keys/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/api-keys/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/api-keys/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/api-keys/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/api-keys/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/api-keys/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/api-keys/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/api-keys/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/api-keys/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/audiences":{"get":{"deprecated":true,"description":"Deprecated: Use Segments instead. These endpoints still work, but will be removed in the future.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAudiencesResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of audiences","tags":["Audiences"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/audiences\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/audiences'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/audiences\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/audiences\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/audiences', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/audiences', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/audiences\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/audiences\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/audiences\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"deprecated":true,"description":"Deprecated: Use Segments instead. These endpoints still work, but will be removed in the future.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAudienceOptions"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAudienceResponseSuccess"}}},"description":"OK"}},"summary":"Create a list of contacts","tags":["Audiences"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/audiences\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/audiences' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/audiences\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/audiences\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/audiences', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/audiences', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/audiences\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/audiences\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/audiences\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/audiences/{id}":{"delete":{"deprecated":true,"description":"Deprecated: Use Segments instead. These endpoints still work, but will be removed in the future.","parameters":[{"description":"The Audience ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveAudienceResponseSuccess"}}},"description":"OK"}},"summary":"Remove an existing audience","tags":["Audiences"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/audiences/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/audiences/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/audiences/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/audiences/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/audiences/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/audiences/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/audiences/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/audiences/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/audiences/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"deprecated":true,"description":"Deprecated: Use Segments instead. These endpoints still work, but will be removed in the future.","parameters":[{"description":"The Audience ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAudienceResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a single audience","tags":["Audiences"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/audiences/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/audiences/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/audiences/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/audiences/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/audiences/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/audiences/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/audiences/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/audiences/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/audiences/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/automations":{"get":{"parameters":[{"description":"Filter automations by status.","in":"query","name":"status","required":false,"schema":{"enum":["enabled","disabled"],"type":"string"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAutomationsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of automations","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations?after=string&before=string&limit=0&status=disabled\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationResponse"}}},"description":"OK"}},"summary":"Create an automation","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/automations\");\nrequest.Content = new StringContent(\"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/automations' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/automations\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/automations\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/automations/{automation_id}":{"delete":{"parameters":[{"description":"The ID of the automation.","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAutomationResponse"}}},"description":"OK"}},"summary":"Delete an automation","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/automations/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The ID of the automation.","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}},"description":"OK"}},"summary":"Retrieve a single automation","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/automations/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The ID of the automation.","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAutomationRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAutomationResponse"}}},"description":"OK"}},"summary":"Update an automation","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\");\nrequest.Content = new StringContent(\"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/automations/00000000-0000-0000-0000-000000000000' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"connections\":[{\"from\":\"string\",\"to\":\"string\",\"type\":\"default\"}],\"name\":\"string\",\"status\":\"disabled\",\"steps\":[{\"config\":{},\"key\":\"string\",\"type\":\"add_to_segment\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"connections\\\":[{\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"type\\\":\\\"default\\\"}],\\\"name\\\":\\\"string\\\",\\\"status\\\":\\\"disabled\\\",\\\"steps\\\":[{\\\"config\\\":{},\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"add_to_segment\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/automations/{automation_id}/runs":{"get":{"parameters":[{"description":"The ID of the automation.","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Filter runs by status. Comma-separated list of: running, completed, failed, cancelled.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAutomationRunsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of automation runs","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs?after=string&before=string&limit=0&status=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/automations/{automation_id}/runs/{run_id}":{"get":{"parameters":[{"description":"The ID of the automation.","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ID of the automation run.","in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRun"}}},"description":"OK"}},"summary":"Retrieve a single automation run","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/runs/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/automations/{automation_id}/stop":{"post":{"parameters":[{"description":"The ID of the automation.","in":"path","name":"automation_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopAutomationResponse"}}},"description":"OK"}},"summary":"Stop an automation","tags":["Automations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/automations/00000000-0000-0000-0000-000000000000/stop\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/broadcasts":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBroadcastsResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of broadcasts","tags":["Broadcasts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/broadcasts?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/broadcasts?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/broadcasts?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/broadcasts?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/broadcasts?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/broadcasts?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/broadcasts?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/broadcasts?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/broadcasts?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBroadcastOptions"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBroadcastResponseSuccess"}}},"description":"OK"}},"summary":"Create a broadcast","tags":["Broadcasts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/broadcasts\");\nrequest.Content = new StringContent(\"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"Here are our announcements\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"scheduled_at\\\":\\\"string\\\",\\\"segment_id\\\":\\\"string\\\",\\\"send\\\":true,\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/broadcasts' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"Here are our announcements\",\"reply_to\":[\"string\"],\"scheduled_at\":\"string\",\"segment_id\":\"string\",\"send\":true,\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"Here are our announcements\",\"reply_to\":[\"string\"],\"scheduled_at\":\"string\",\"segment_id\":\"string\",\"send\":true,\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/broadcasts\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/broadcasts\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"Here are our announcements\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"scheduled_at\\\":\\\"string\\\",\\\"segment_id\\\":\\\"string\\\",\\\"send\\\":true,\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/broadcasts', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"Here are our announcements\",\"reply_to\":[\"string\"],\"scheduled_at\":\"string\",\"segment_id\":\"string\",\"send\":true,\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/broadcasts', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"Here are our announcements\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"scheduled_at\\\":\\\"string\\\",\\\"segment_id\\\":\\\"string\\\",\\\"send\\\":true,\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/broadcasts\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"Here are our announcements\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"scheduled_at\\\":\\\"string\\\",\\\"segment_id\\\":\\\"string\\\",\\\"send\\\":true,\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/broadcasts\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"Here are our announcements\",\"reply_to\":[\"string\"],\"scheduled_at\":\"string\",\"segment_id\":\"string\",\"send\":true,\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/broadcasts\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"Here are our announcements\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"scheduled_at\\\":\\\"string\\\",\\\"segment_id\\\":\\\"string\\\",\\\"send\\\":true,\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/broadcasts/{id}":{"delete":{"parameters":[{"description":"The Broadcast ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveBroadcastResponseSuccess"}}},"description":"OK"}},"summary":"Remove an existing broadcast that is in the draft status","tags":["Broadcasts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/broadcasts/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/broadcasts/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/broadcasts/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/broadcasts/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/broadcasts/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/broadcasts/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/broadcasts/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/broadcasts/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/broadcasts/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The Broadcast ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBroadcastResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a single broadcast","tags":["Broadcasts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/broadcasts/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/broadcasts/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/broadcasts/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/broadcasts/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/broadcasts/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/broadcasts/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/broadcasts/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/broadcasts/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/broadcasts/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The Broadcast ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBroadcastResponseSuccess"}}},"description":"OK"}},"summary":"Update an existing broadcast","tags":["Broadcasts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/broadcasts/string\");\nrequest.Content = new StringContent(\"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"segment_id\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/broadcasts/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"string\",\"reply_to\":[\"string\"],\"segment_id\":\"string\",\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"string\",\"reply_to\":[\"string\"],\"segment_id\":\"string\",\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/broadcasts/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/broadcasts/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"segment_id\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/broadcasts/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"string\",\"reply_to\":[\"string\"],\"segment_id\":\"string\",\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/broadcasts/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"segment_id\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/broadcasts/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"segment_id\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/broadcasts/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"audience_id\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"preview_text\":\"string\",\"reply_to\":[\"string\"],\"segment_id\":\"string\",\"subject\":\"string\",\"text\":\"string\",\"topic_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/broadcasts/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"audience_id\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"preview_text\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"segment_id\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/broadcasts/{id}/send":{"post":{"parameters":[{"description":"The Broadcast ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBroadcastOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBroadcastResponseSuccess"}}},"description":"OK"}},"summary":"Send or schedule a broadcast","tags":["Broadcasts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/broadcasts/string/send\");\nrequest.Content = new StringContent(\"{\\\"scheduled_at\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/broadcasts/string/send' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scheduled_at\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"scheduled_at\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/broadcasts/string/send\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/broadcasts/string/send\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"scheduled_at\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/broadcasts/string/send', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"scheduled_at\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/broadcasts/string/send', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"scheduled_at\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/broadcasts/string/send\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"scheduled_at\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/broadcasts/string/send\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"scheduled_at\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/broadcasts/string/send\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"scheduled_at\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/contact-properties":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListContactPropertiesResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of contact properties","tags":["Contact Properties"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/contact-properties?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/contact-properties?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/contact-properties?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contact-properties?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contact-properties?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contact-properties?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contact-properties?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/contact-properties?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contact-properties?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactPropertyOptions"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactPropertyResponseSuccess"}}},"description":"OK"}},"summary":"Create a new contact property","tags":["Contact Properties"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/contact-properties\");\nrequest.Content = new StringContent(\"{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"number\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/contact-properties' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"number\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"number\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/contact-properties\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contact-properties\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"number\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contact-properties', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"number\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contact-properties', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"number\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contact-properties\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"number\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/contact-properties\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"number\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contact-properties\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"number\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/contact-properties/{id}":{"delete":{"parameters":[{"description":"The Contact Property ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveContactPropertyResponseSuccess"}}},"description":"OK"}},"summary":"Remove an existing contact property","tags":["Contact Properties"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/contact-properties/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/contact-properties/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/contact-properties/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contact-properties/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contact-properties/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contact-properties/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contact-properties/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/contact-properties/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contact-properties/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The Contact Property ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetContactPropertyResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a single contact property","tags":["Contact Properties"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/contact-properties/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/contact-properties/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/contact-properties/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contact-properties/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contact-properties/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contact-properties/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contact-properties/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/contact-properties/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contact-properties/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The Contact Property ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactPropertyOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactPropertyResponseSuccess"}}},"description":"OK"}},"summary":"Update an existing contact property","tags":["Contact Properties"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/contact-properties/string\");\nrequest.Content = new StringContent(\"{\\\"fallback_value\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/contact-properties/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"fallback_value\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"fallback_value\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/contact-properties/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contact-properties/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"fallback_value\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contact-properties/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"fallback_value\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contact-properties/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"fallback_value\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contact-properties/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"fallback_value\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/contact-properties/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"fallback_value\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contact-properties/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"fallback_value\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/contacts":{"get":{"parameters":[{"description":"Filter contacts by segment ID.","in":"query","name":"segment_id","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListContactsResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of contacts","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts?after=string&before=string&limit=0&segment_id=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactOptions"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactResponseSuccess"}}},"description":"OK"}},"summary":"Create a new contact","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/contacts\");\nrequest.Content = new StringContent(\"{\\\"audience_id\\\":\\\"78261eea-8f8b-4381-83c6-79fa7120f1cf\\\",\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"segments\\\":[\\\"string\\\"],\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}],\\\"unsubscribed\\\":false}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/contacts' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"audience_id\":\"78261eea-8f8b-4381-83c6-79fa7120f1cf\",\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"segments\":[\"string\"],\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}],\"unsubscribed\":false}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"audience_id\":\"78261eea-8f8b-4381-83c6-79fa7120f1cf\",\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"segments\":[\"string\"],\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}],\"unsubscribed\":false}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/contacts\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"audience_id\\\":\\\"78261eea-8f8b-4381-83c6-79fa7120f1cf\\\",\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"segments\\\":[\\\"string\\\"],\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}],\\\"unsubscribed\\\":false}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"audience_id\":\"78261eea-8f8b-4381-83c6-79fa7120f1cf\",\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"segments\":[\"string\"],\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}],\"unsubscribed\":false}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"audience_id\\\":\\\"78261eea-8f8b-4381-83c6-79fa7120f1cf\\\",\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"segments\\\":[\\\"string\\\"],\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}],\\\"unsubscribed\\\":false}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"audience_id\\\":\\\"78261eea-8f8b-4381-83c6-79fa7120f1cf\\\",\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"segments\\\":[\\\"string\\\"],\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}],\\\"unsubscribed\\\":false}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/contacts\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"audience_id\":\"78261eea-8f8b-4381-83c6-79fa7120f1cf\",\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"segments\":[\"string\"],\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}],\"unsubscribed\":false}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"audience_id\\\":\\\"78261eea-8f8b-4381-83c6-79fa7120f1cf\\\",\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"segments\\\":[\\\"string\\\"],\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}],\\\"unsubscribed\\\":false}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/contacts/{contact_id}/segments":{"get":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"contact_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListContactSegmentsResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of segments for a contact","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string/segments?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/contacts/{contact_id}/segments/{segment_id}":{"delete":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"contact_id","required":true,"schema":{"type":"string"}},{"description":"The Segment ID.","in":"path","name":"segment_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveContactFromSegmentResponseSuccess"}}},"description":"OK"}},"summary":"Remove a contact from a segment","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/contacts/string/segments/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/contacts/string/segments/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/contacts/string/segments/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string/segments/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string/segments/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string/segments/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string/segments/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/contacts/string/segments/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string/segments/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"contact_id","required":true,"schema":{"type":"string"}},{"description":"The Segment ID.","in":"path","name":"segment_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddContactToSegmentResponseSuccess"}}},"description":"OK"}},"summary":"Add a contact to a segment","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/contacts/string/segments/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/contacts/string/segments/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/contacts/string/segments/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string/segments/string\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string/segments/string', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string/segments/string', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string/segments/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.resend.com/contacts/string/segments/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string/segments/string\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/contacts/{contact_id}/topics":{"get":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"contact_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetContactTopicsResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve topics for a contact","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string/topics?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"contact_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactTopicsOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactTopicsResponseSuccess"}}},"description":"OK"}},"summary":"Update topics for a contact","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/contacts/string/topics\");\nrequest.Content = new StringContent(\"{\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/contacts/string/topics' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/contacts/string/topics\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string/topics\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string/topics', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string/topics', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string/topics\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/contacts/string/topics\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"topics\":[{\"id\":\"string\",\"subscription\":\"opt_in\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string/topics\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"topics\\\":[{\\\"id\\\":\\\"string\\\",\\\"subscription\\\":\\\"opt_in\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/contacts/{id}":{"delete":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveContactResponseSuccess"}}},"description":"OK"}},"summary":"Remove an existing contact by ID or email","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/contacts/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/contacts/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/contacts/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/contacts/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetContactResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a single contact by ID or email","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/contacts/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/contacts/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/contacts/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/contacts/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The Contact ID or email address.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactResponseSuccess"}}},"description":"OK"}},"summary":"Update a single contact by ID or email","tags":["Contacts"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/contacts/string\");\nrequest.Content = new StringContent(\"{\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"unsubscribed\\\":false}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/contacts/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"unsubscribed\":false}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"unsubscribed\":false}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/contacts/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/contacts/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"unsubscribed\\\":false}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/contacts/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"unsubscribed\":false}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/contacts/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"unsubscribed\\\":false}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/contacts/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"unsubscribed\\\":false}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/contacts/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"email\":\"steve.wozniak@gmail.com\",\"first_name\":\"Steve\",\"last_name\":\"Wozniak\",\"properties\":{\"additionalProp1\":null},\"unsubscribed\":false}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/contacts/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"email\\\":\\\"steve.wozniak@gmail.com\\\",\\\"first_name\\\":\\\"Steve\\\",\\\"last_name\\\":\\\"Wozniak\\\",\\\"properties\\\":{\\\"additionalProp1\\\":null},\\\"unsubscribed\\\":false}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/domains":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDomainsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of domains","tags":["Domains"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/domains?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/domains?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/domains?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/domains?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/domains?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/domains?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/domains?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/domains?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/domains?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainResponse"}}},"description":"OK"}},"summary":"Create a new domain","tags":["Domains"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/domains\");\nrequest.Content = new StringContent(\"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"custom_return_path\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"open_tracking\\\":true,\\\"region\\\":\\\"us-east-1\\\",\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"custom_return_path\":\"string\",\"name\":\"string\",\"open_tracking\":true,\"region\":\"us-east-1\",\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"custom_return_path\":\"string\",\"name\":\"string\",\"open_tracking\":true,\"region\":\"us-east-1\",\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/domains\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"custom_return_path\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"open_tracking\\\":true,\\\"region\\\":\\\"us-east-1\\\",\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/domains', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"custom_return_path\":\"string\",\"name\":\"string\",\"open_tracking\":true,\"region\":\"us-east-1\",\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/domains', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"custom_return_path\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"open_tracking\\\":true,\\\"region\\\":\\\"us-east-1\\\",\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"custom_return_path\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"open_tracking\\\":true,\\\"region\\\":\\\"us-east-1\\\",\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"custom_return_path\":\"string\",\"name\":\"string\",\"open_tracking\":true,\"region\":\"us-east-1\",\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/domains\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"custom_return_path\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"open_tracking\\\":true,\\\"region\\\":\\\"us-east-1\\\",\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/domains/{domain_id}":{"delete":{"parameters":[{"description":"The ID of the domain.","in":"path","name":"domain_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDomainResponse"}}},"description":"OK"}},"summary":"Remove an existing domain","tags":["Domains"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/domains/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/domains/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/domains/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/domains/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/domains/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/domains/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/domains/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/domains/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/domains/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The ID of the domain.","in":"path","name":"domain_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}},"description":"OK"}},"summary":"Retrieve a single domain","tags":["Domains"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/domains/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/domains/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/domains/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/domains/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/domains/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/domains/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/domains/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/domains/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/domains/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The ID of the domain.","in":"path","name":"domain_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDomainOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDomainResponseSuccess"}}},"description":"OK"}},"summary":"Update an existing domain","tags":["Domains"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/domains/string\");\nrequest.Content = new StringContent(\"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"open_tracking\\\":true,\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/domains/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"open_tracking\":true,\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"open_tracking\":true,\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/domains/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/domains/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"open_tracking\\\":true,\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/domains/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"open_tracking\":true,\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/domains/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"open_tracking\\\":true,\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/domains/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"open_tracking\\\":true,\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/domains/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"capabilities\":{\"receiving\":\"disabled\",\"sending\":\"disabled\"},\"click_tracking\":true,\"open_tracking\":true,\"tls\":\"opportunistic\",\"tracking_subdomain\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/domains/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"capabilities\\\":{\\\"receiving\\\":\\\"disabled\\\",\\\"sending\\\":\\\"disabled\\\"},\\\"click_tracking\\\":true,\\\"open_tracking\\\":true,\\\"tls\\\":\\\"opportunistic\\\",\\\"tracking_subdomain\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/domains/{domain_id}/verify":{"post":{"description":"Triggers verification of the domain's DNS records including DKIM, SPF, and the tracking CNAME (if a tracking subdomain is configured).","parameters":[{"description":"The ID of the domain.","in":"path","name":"domain_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyDomainResponse"}}},"description":"OK"}},"summary":"Verify an existing domain","tags":["Domains"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/domains/string/verify\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/domains/string/verify'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/domains/string/verify\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/domains/string/verify\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/domains/string/verify', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/domains/string/verify', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/domains/string/verify\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.resend.com/domains/string/verify\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/domains/string/verify\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmailsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of emails","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"parameters":[{"description":"A unique identifier for the request to ensure emails are only sent once. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys)","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":256,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}},"description":"OK"}},"summary":"Send an email","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/emails\");\nrequest.Content = new StringContent(\"{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/emails' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/emails\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/emails\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/batch":{"post":{"parameters":[{"description":"A unique identifier for the request to ensure emails are only sent once. [Learn more](https://resend.com/docs/dashboard/emails/idempotency-keys)","in":"header","name":"Idempotency-Key","required":false,"schema":{"maxLength":256,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SendEmailRequest"},"type":"array"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchEmailsResponse"}}},"description":"OK"}},"summary":"Trigger up to 100 batch emails at once.","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/emails/batch\");\nrequest.Content = new StringContent(\"[{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}]\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/emails/batch' \\\n  -H 'Content-Type: application/json' \\\n  -d '[{\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}]'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`[{\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}]`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/emails/batch\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/batch\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"[{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}]\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/batch', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify([{\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}]),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/batch', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"[{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}]\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/batch\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"[{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}]\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/emails/batch\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='[{\"attachments\":[{\"content\":\"binary\",\"content_id\":\"string\",\"content_type\":\"string\",\"filename\":\"string\",\"path\":\"string\"}],\"bcc\":\"string\",\"cc\":\"string\",\"from\":\"string\",\"headers\":{},\"html\":\"string\",\"reply_to\":\"string\",\"scheduled_at\":\"string\",\"subject\":\"string\",\"tags\":[{\"name\":\"string\",\"value\":\"string\"}],\"template\":{\"id\":\"string\",\"variables\":{\"variableName\":\"Sign up now\",\"variableName2\":123}},\"text\":\"string\",\"to\":\"string\",\"topic_id\":\"string\"}]',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/batch\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"[{\\\"attachments\\\":[{\\\"content\\\":\\\"binary\\\",\\\"content_id\\\":\\\"string\\\",\\\"content_type\\\":\\\"string\\\",\\\"filename\\\":\\\"string\\\",\\\"path\\\":\\\"string\\\"}],\\\"bcc\\\":\\\"string\\\",\\\"cc\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"headers\\\":{},\\\"html\\\":\\\"string\\\",\\\"reply_to\\\":\\\"string\\\",\\\"scheduled_at\\\":\\\"string\\\",\\\"subject\\\":\\\"string\\\",\\\"tags\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}],\\\"template\\\":{\\\"id\\\":\\\"string\\\",\\\"variables\\\":{\\\"variableName\\\":\\\"Sign up now\\\",\\\"variableName2\\\":123}},\\\"text\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"topic_id\\\":\\\"string\\\"}]\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/receiving":{"get":{"parameters":[{"description":"Maximum number of received emails to return.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Pagination cursor to fetch results after this email ID. Cannot be used with 'before'.","in":"query","name":"after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Pagination cursor to fetch results before this email ID. Cannot be used with 'after'.","in":"query","name":"before","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReceivedEmailsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of received emails","tags":["Receiving Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/receiving?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/receiving/{email_id}":{"get":{"parameters":[{"description":"The ID of the received email.","in":"path","name":"email_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReceivedEmailResponse"}}},"description":"OK"}},"summary":"Retrieve a single received email","tags":["Receiving Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/receiving/{email_id}/attachments":{"get":{"parameters":[{"description":"The ID of the received email.","in":"path","name":"email_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Maximum number of attachments to return.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Pagination cursor to fetch results after this attachment ID. Cannot be used with 'before'.","in":"query","name":"after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Pagination cursor to fetch results before this attachment ID. Cannot be used with 'after'.","in":"query","name":"before","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttachmentsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of attachments for a received email","tags":["Receiving Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/receiving/{email_id}/attachments/{attachment_id}":{"get":{"parameters":[{"description":"The ID of the received email.","in":"path","name":"email_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ID of the attachment.","in":"path","name":"attachment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievedAttachment"}}},"description":"OK"}},"summary":"Retrieve a single attachment for a received email","tags":["Receiving Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/receiving/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/{email_id}":{"get":{"parameters":[{"description":"The ID of the email.","in":"path","name":"email_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Email"}}},"description":"OK"}},"summary":"Retrieve a single email","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The ID of the email.","in":"path","name":"email_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailOptions"}}},"description":"OK"}},"summary":"Update a single email","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/emails/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/emails/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/emails/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/string', { method: 'PATCH' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/string', { method: 'PATCH' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"PATCH\", \"https://api.resend.com/emails/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/{email_id}/attachments":{"get":{"parameters":[{"description":"The ID of the email.","in":"path","name":"email_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Maximum number of attachments to return.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Pagination cursor to fetch results after this attachment ID. Cannot be used with 'before'.","in":"query","name":"after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Pagination cursor to fetch results before this attachment ID. Cannot be used with 'after'.","in":"query","name":"before","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAttachmentsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of attachments for a sent email","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/{email_id}/attachments/{attachment_id}":{"get":{"parameters":[{"description":"The ID of the email.","in":"path","name":"email_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ID of the attachment.","in":"path","name":"attachment_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievedAttachment"}}},"description":"OK"}},"summary":"Retrieve a single attachment for a sent email","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/00000000-0000-0000-0000-000000000000/attachments/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/emails/{email_id}/cancel":{"post":{"parameters":[{"description":"The ID of the email.","in":"path","name":"email_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Email"}}},"description":"OK"}},"summary":"Cancel the schedule of the e-mail.","tags":["Emails"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/emails/string/cancel\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/emails/string/cancel'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/emails/string/cancel\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/emails/string/cancel\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/emails/string/cancel', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/emails/string/cancel', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/emails/string/cancel\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.resend.com/emails/string/cancel\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/emails/string/cancel\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/events":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEventsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of events","tags":["Events"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/events?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/events?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/events?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/events?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/events?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/events?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/events?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/events?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/events?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventResponse"}}},"description":"OK"}},"summary":"Create an event","tags":["Events"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/events\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\",\\\"schema\\\":{}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/events' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\",\"schema\":{}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\",\"schema\":{}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/events\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/events\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\",\\\"schema\\\":{}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/events', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\",\"schema\":{}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/events', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\",\\\"schema\\\":{}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/events\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\",\\\"schema\\\":{}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/events\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\",\"schema\":{}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/events\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\",\\\"schema\\\":{}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/events/send":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEventRequest"}}}},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEventResponse"}}},"description":"Accepted"}},"summary":"Send an event","tags":["Events"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/events/send\");\nrequest.Content = new StringContent(\"{\\\"contact_id\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"event\\\":\\\"string\\\",\\\"payload\\\":{\\\"additionalProp1\\\":null}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/events/send' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"contact_id\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"user@example.com\",\"event\":\"string\",\"payload\":{\"additionalProp1\":null}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"contact_id\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"user@example.com\",\"event\":\"string\",\"payload\":{\"additionalProp1\":null}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/events/send\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/events/send\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"contact_id\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"event\\\":\\\"string\\\",\\\"payload\\\":{\\\"additionalProp1\\\":null}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/events/send', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"contact_id\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"user@example.com\",\"event\":\"string\",\"payload\":{\"additionalProp1\":null}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/events/send', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"contact_id\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"event\\\":\\\"string\\\",\\\"payload\\\":{\\\"additionalProp1\\\":null}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/events/send\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"contact_id\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"event\\\":\\\"string\\\",\\\"payload\\\":{\\\"additionalProp1\\\":null}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/events/send\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"contact_id\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"user@example.com\",\"event\":\"string\",\"payload\":{\"additionalProp1\":null}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/events/send\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"contact_id\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"user@example.com\\\",\\\"event\\\":\\\"string\\\",\\\"payload\\\":{\\\"additionalProp1\\\":null}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/events/{identifier}":{"delete":{"parameters":[{"description":"The event ID (UUID) or event name.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveEventResponse"}}},"description":"OK"}},"summary":"Delete an event","tags":["Events"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/events/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/events/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/events/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/events/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/events/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/events/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/events/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/events/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/events/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The event ID (UUID) or event name.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}},"description":"OK"}},"summary":"Retrieve a single event","tags":["Events"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/events/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/events/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/events/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/events/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/events/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/events/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/events/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/events/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/events/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The event ID (UUID) or event name.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventResponse"}}},"description":"OK"}},"summary":"Update an event","tags":["Events"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/events/string\");\nrequest.Content = new StringContent(\"{\\\"schema\\\":{}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/events/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"schema\":{}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"schema\":{}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/events/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/events/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"schema\\\":{}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/events/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"schema\":{}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/events/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"schema\\\":{}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/events/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"schema\\\":{}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/events/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"schema\":{}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/events/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"schema\\\":{}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/logs":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLogsResponse"}}},"description":"OK"}},"summary":"Retrieve a list of logs","tags":["Logs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/logs?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/logs?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/logs?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/logs?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/logs?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/logs?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/logs?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/logs?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/logs?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/logs/{log_id}":{"get":{"parameters":[{"description":"The ID of the log.","in":"path","name":"log_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}}},"description":"OK"}},"summary":"Retrieve a single log","tags":["Logs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/logs/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/logs/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/logs/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/logs/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/logs/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/logs/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/logs/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/logs/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/logs/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/segments":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSegmentsResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of segments","tags":["Segments"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/segments?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/segments?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/segments?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/segments?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/segments?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/segments?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/segments?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/segments?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/segments?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegmentOptions"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegmentResponseSuccess"}}},"description":"OK"}},"summary":"Create a new segment","tags":["Segments"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/segments\");\nrequest.Content = new StringContent(\"{\\\"audience_id\\\":\\\"string\\\",\\\"filter\\\":{},\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/segments' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"audience_id\":\"string\",\"filter\":{},\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"audience_id\":\"string\",\"filter\":{},\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/segments\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/segments\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"audience_id\\\":\\\"string\\\",\\\"filter\\\":{},\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/segments', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"audience_id\":\"string\",\"filter\":{},\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/segments', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"audience_id\\\":\\\"string\\\",\\\"filter\\\":{},\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/segments\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"audience_id\\\":\\\"string\\\",\\\"filter\\\":{},\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/segments\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"audience_id\":\"string\",\"filter\":{},\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/segments\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"audience_id\\\":\\\"string\\\",\\\"filter\\\":{},\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/segments/{id}":{"delete":{"parameters":[{"description":"The Segment ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveSegmentResponseSuccess"}}},"description":"OK"}},"summary":"Remove an existing segment","tags":["Segments"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/segments/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/segments/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/segments/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/segments/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/segments/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/segments/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/segments/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/segments/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/segments/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The Segment ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSegmentResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a single segment","tags":["Segments"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/segments/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/segments/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/segments/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/segments/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/segments/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/segments/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/segments/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/segments/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/segments/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/templates":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTemplatesResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of templates","tags":["Templates"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/templates?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/templates?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/templates?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/templates?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/templates?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/templates?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/templates?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/templates?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/templates?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateResponseSuccess"}}},"description":"OK"}},"summary":"Create a template","tags":["Templates"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/templates\");\nrequest.Content = new StringContent(\"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/templates' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/templates\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/templates\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/templates', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/templates', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/templates\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/templates\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/templates\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/templates/{id}":{"delete":{"parameters":[{"description":"The Template ID or alias.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveTemplateResponseSuccess"}}},"description":"OK"}},"summary":"Remove an existing template","tags":["Templates"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/templates/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/templates/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/templates/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/templates/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/templates/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/templates/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/templates/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/templates/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/templates/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The Template ID or alias.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}},"description":"OK"}},"summary":"Retrieve a single template","tags":["Templates"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/templates/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/templates/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/templates/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/templates/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/templates/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/templates/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/templates/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/templates/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/templates/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The Template ID or alias.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplateOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplateResponseSuccess"}}},"description":"OK"}},"summary":"Update an existing template","tags":["Templates"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/templates/string\");\nrequest.Content = new StringContent(\"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/templates/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/templates/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/templates/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/templates/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/templates/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/templates/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/templates/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"alias\":\"string\",\"from\":\"string\",\"html\":\"string\",\"name\":\"string\",\"reply_to\":[\"string\"],\"subject\":\"string\",\"text\":\"string\",\"variables\":[{\"fallback_value\":\"string\",\"key\":\"string\",\"type\":\"boolean\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/templates/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"alias\\\":\\\"string\\\",\\\"from\\\":\\\"string\\\",\\\"html\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"reply_to\\\":[\\\"string\\\"],\\\"subject\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\",\\\"variables\\\":[{\\\"fallback_value\\\":\\\"string\\\",\\\"key\\\":\\\"string\\\",\\\"type\\\":\\\"boolean\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/templates/{id}/duplicate":{"post":{"parameters":[{"description":"The Template ID or alias.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateTemplateResponseSuccess"}}},"description":"OK"}},"summary":"Duplicate a template","tags":["Templates"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/templates/string/duplicate\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/templates/string/duplicate'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/templates/string/duplicate\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/templates/string/duplicate\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/templates/string/duplicate', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/templates/string/duplicate', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/templates/string/duplicate\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.resend.com/templates/string/duplicate\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/templates/string/duplicate\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/templates/{id}/publish":{"post":{"parameters":[{"description":"The Template ID or alias.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishTemplateResponseSuccess"}}},"description":"OK"}},"summary":"Publish a template","tags":["Templates"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/templates/string/publish\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/templates/string/publish'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/templates/string/publish\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/templates/string/publish\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/templates/string/publish', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/templates/string/publish', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/templates/string/publish\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.resend.com/templates/string/publish\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/templates/string/publish\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/topics":{"get":{"parameters":[{"$ref":"#/components/parameters/PaginationLimit"},{"$ref":"#/components/parameters/PaginationAfter"},{"$ref":"#/components/parameters/PaginationBefore"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTopicsResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a list of topics","tags":["Topics"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/topics?after=string&before=string&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/topics?after=string&before=string&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/topics?after=string&before=string&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/topics?after=string&before=string&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/topics?after=string&before=string&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/topics?after=string&before=string&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/topics?after=string&before=string&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/topics?after=string&before=string&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/topics?after=string&before=string&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTopicOptions"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTopicResponseSuccess"}}},"description":"OK"}},"summary":"Create a new topic","tags":["Topics"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/topics\");\nrequest.Content = new StringContent(\"{\\\"default_subscription\\\":\\\"opt_in\\\",\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/topics' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"default_subscription\":\"opt_in\",\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"default_subscription\":\"opt_in\",\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/topics\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/topics\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"default_subscription\\\":\\\"opt_in\\\",\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/topics', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"default_subscription\":\"opt_in\",\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/topics', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"default_subscription\\\":\\\"opt_in\\\",\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/topics\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"default_subscription\\\":\\\"opt_in\\\",\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/topics\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"default_subscription\":\"opt_in\",\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/topics\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"default_subscription\\\":\\\"opt_in\\\",\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/topics/{id}":{"delete":{"parameters":[{"description":"The Topic ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveTopicResponseSuccess"}}},"description":"OK"}},"summary":"Remove an existing topic","tags":["Topics"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/topics/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/topics/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/topics/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/topics/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/topics/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/topics/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/topics/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/topics/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/topics/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The Topic ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTopicResponseSuccess"}}},"description":"OK"}},"summary":"Retrieve a single topic","tags":["Topics"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/topics/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/topics/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/topics/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/topics/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/topics/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/topics/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/topics/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/topics/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/topics/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The Topic ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTopicOptions"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTopicResponseSuccess"}}},"description":"OK"}},"summary":"Update an existing topic","tags":["Topics"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/topics/string\");\nrequest.Content = new StringContent(\"{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/topics/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/topics/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/topics/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/topics/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/topics/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/topics/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/topics/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"description\":\"string\",\"name\":\"string\",\"visibility\":\"private\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/topics/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"visibility\\\":\\\"private\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/webhooks":{"get":{"parameters":[{"description":"Maximum number of webhooks to return.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Pagination cursor to fetch results after this webhook ID. Cannot be used with 'before'.","in":"query","name":"after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Pagination cursor to fetch results before this webhook ID. Cannot be used with 'after'.","in":"query","name":"before","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWebhooksResponse"}}},"description":"OK"}},"summary":"Retrieve a list of webhooks","tags":["Webhooks"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/webhooks?after=00000000-0000-0000-0000-000000000000&before=00000000-0000-0000-0000-000000000000&limit=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookResponse"}}},"description":"Created"}},"summary":"Create a new webhook","tags":["Webhooks"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.resend.com/webhooks\");\nrequest.Content = new StringContent(\"{\\\"endpoint\\\":\\\"https://webhook.example.com/handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\",\\\"email.bounced\\\"]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.resend.com/webhooks' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":\"https://webhook.example.com/handler\",\"events\":[\"email.sent\",\"email.delivered\",\"email.bounced\"]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"endpoint\":\"https://webhook.example.com/handler\",\"events\":[\"email.sent\",\"email.delivered\",\"email.bounced\"]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.resend.com/webhooks\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/webhooks\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"endpoint\\\":\\\"https://webhook.example.com/handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\",\\\"email.bounced\\\"]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/webhooks', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"endpoint\":\"https://webhook.example.com/handler\",\"events\":[\"email.sent\",\"email.delivered\",\"email.bounced\"]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/webhooks', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"endpoint\\\":\\\"https://webhook.example.com/handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\",\\\"email.bounced\\\"]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/webhooks\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"endpoint\\\":\\\"https://webhook.example.com/handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\",\\\"email.bounced\\\"]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.resend.com/webhooks\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"endpoint\":\"https://webhook.example.com/handler\",\"events\":[\"email.sent\",\"email.delivered\",\"email.bounced\"]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/webhooks\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"endpoint\\\":\\\"https://webhook.example.com/handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\",\\\"email.bounced\\\"]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/webhooks/{webhook_id}":{"delete":{"parameters":[{"description":"The Webhook ID.","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWebhookResponse"}}},"description":"OK"}},"summary":"Remove an existing webhook","tags":["Webhooks"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"parameters":[{"description":"The Webhook ID.","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookResponse"}}},"description":"OK"}},"summary":"Retrieve a single webhook","tags":["Webhooks"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"parameters":[{"description":"The Webhook ID.","in":"path","name":"webhook_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookResponse"}}},"description":"OK"}},"summary":"Update an existing webhook","tags":["Webhooks"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\");\nrequest.Content = new StringContent(\"{\\\"endpoint\\\":\\\"https://webhook.example.com/new-handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\"],\\\"status\\\":\\\"enabled\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":\"https://webhook.example.com/new-handler\",\"events\":[\"email.sent\",\"email.delivered\"],\"status\":\"enabled\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"endpoint\":\"https://webhook.example.com/new-handler\",\"events\":[\"email.sent\",\"email.delivered\"],\"status\":\"enabled\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"endpoint\\\":\\\"https://webhook.example.com/new-handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\"],\\\"status\\\":\\\"enabled\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"endpoint\":\"https://webhook.example.com/new-handler\",\"events\":[\"email.sent\",\"email.delivered\"],\"status\":\"enabled\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"endpoint\\\":\\\"https://webhook.example.com/new-handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\"],\\\"status\\\":\\\"enabled\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"endpoint\\\":\\\"https://webhook.example.com/new-handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\"],\\\"status\\\":\\\"enabled\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"endpoint\":\"https://webhook.example.com/new-handler\",\"events\":[\"email.sent\",\"email.delivered\"],\"status\":\"enabled\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.resend.com/webhooks/00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"endpoint\\\":\\\"https://webhook.example.com/new-handler\\\",\\\"events\\\":[\\\"email.sent\\\",\\\"email.delivered\\\"],\\\"status\\\":\\\"enabled\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://api.resend.com"}],"tags":[{"description":"Start sending emails through the Resend API.","name":"Emails"},{"description":"Create and manage domains through the Resend API.","name":"Domains"},{"description":"Deprecated: Use Segments instead. Create and manage Audiences through the Resend API.","name":"Audiences"},{"description":"Create and manage Contacts through the Resend API.","name":"Contacts"},{"description":"Retrieve and manage received emails and attachments through the Resend API.","name":"Receiving Emails"},{"description":"Create and manage Webhooks through the Resend API.","name":"Webhooks"},{"description":"Create and manage Templates through the Resend API.","name":"Templates"},{"description":"Create and manage Broadcasts through the Resend API.","name":"Broadcasts"},{"description":"Create and manage Segments through the Resend API.","name":"Segments"},{"description":"Create and manage Topics through the Resend API.","name":"Topics"},{"description":"Create and manage Contact Properties through the Resend API.","name":"Contact Properties"},{"description":"Retrieve API request logs through the Resend API.","name":"Logs"},{"description":"Create and manage Automations through the Resend API.","name":"Automations"},{"description":"Create and manage Events through the Resend API.","name":"Events"}]}