openapi: 3.0.3 info: title: Resend Audience API version: 1.1.0 description: ' Resend is transforming email for developers. Simple interface, easy integrations, handy templates. ' servers: - url: https://api.resend.com security: - bearerAuth: [] tags: - name: Audience paths: /audiences/{audience_id}/contacts: post: tags: - Audience summary: Create a new contact parameters: - name: audience_id in: path required: true schema: type: string description: The Audience ID. requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateContactOptions' responses: '201': description: OK content: application/json: schema: $ref: '#/components/schemas/CreateContactResponseSuccess' get: tags: - Audience summary: Retrieve a list of contacts parameters: - name: audience_id in: path required: true schema: type: string description: The Audience ID. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListContactsResponseSuccess' /audiences/{audience_id}/contacts/{email}: delete: tags: - Audience summary: Remove an existing contact by email parameters: - name: email in: path required: true schema: type: string description: The Contact ID. - name: audience_id in: path required: true schema: type: string description: The Audience ID. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RemoveContactResponseSuccess' /audiences/{audience_id}/contacts/{id}: delete: tags: - Audience summary: Remove an existing contact by id parameters: - name: id in: path required: true schema: type: string description: The Contact ID. - name: audience_id in: path required: true schema: type: string description: The Audience ID. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RemoveContactResponseSuccess' get: tags: - Audience summary: Retrieve a single contact parameters: - name: id in: path required: true schema: type: string description: The Contact ID. - name: audience_id in: path required: true schema: type: string description: The Audience ID. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetContactResponseSuccess' patch: tags: - Audience summary: Update a single contact parameters: - name: id in: path required: true schema: type: string description: The Contact ID. - name: audience_id in: path required: true schema: type: string description: The Audience ID. requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateContactOptions' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UpdateContactResponseSuccess' components: schemas: ListContactsResponseSuccess: type: object properties: object: type: string description: Type of the response object. example: list data: type: array description: Array containing contact information. items: type: object properties: id: type: string description: Unique identifier for the contact. example: e169aa45-1ecf-4183-9955-b1499d5701d3 email: type: string description: Email address of the contact. example: steve.wozniak@gmail.com first_name: type: string description: First name of the contact. example: Steve last_name: type: string description: Last name of the contact. example: Wozniak created_at: type: string format: date-time description: Timestamp indicating when the contact was created. example: '2023-10-06T23:47:56.678Z' unsubscribed: type: boolean description: Indicates if the contact is unsubscribed. example: false UpdateContactOptions: type: object properties: email: type: string description: Email address of the contact. example: steve.wozniak@gmail.com first_name: type: string description: First name of the contact. example: Steve last_name: type: string description: Last name of the contact. example: Wozniak unsubscribed: type: boolean description: Indicates the subscription status of the contact. example: false RemoveContactResponseSuccess: type: object properties: object: type: string description: Type of the response object. example: contact id: type: string description: Unique identifier for the removed contact. example: 520784e2-887d-4c25-b53c-4ad46ad38100 deleted: type: boolean description: Indicates whether the contact was successfully deleted. example: true CreateContactOptions: type: object required: - email properties: email: type: string description: Email address of the contact. example: steve.wozniak@gmail.com first_name: type: string description: First name of the contact. example: Steve last_name: type: string description: Last name of the contact. example: Wozniak unsubscribed: type: boolean description: Indicates if the contact is unsubscribed. example: false audience_id: type: string description: Unique identifier of the audience to which the contact belongs. example: 78261eea-8f8b-4381-83c6-79fa7120f1cf CreateContactResponseSuccess: type: object properties: object: type: string description: Type of the response object. example: contact id: type: string description: Unique identifier for the created contact. example: 479e3145-dd38-476b-932c-529ceb705947 GetContactResponseSuccess: type: object properties: object: type: string description: Type of the response object. example: contact id: type: string description: Unique identifier for the contact. example: e169aa45-1ecf-4183-9955-b1499d5701d3 email: type: string description: Email address of the contact. example: steve.wozniak@gmail.com first_name: type: string description: First name of the contact. example: Steve last_name: type: string description: Last name of the contact. example: Wozniak created_at: type: string format: date-time description: Timestamp indicating when the contact was created. example: '2023-10-06T23:47:56.678Z' unsubscribed: type: boolean description: Indicates if the contact is unsubscribed. example: false UpdateContactResponseSuccess: type: object properties: object: type: string description: Type of the response object. example: contact id: type: string description: Unique identifier for the updated contact. example: 479e3145-dd38-476b-932c-529ceb705947 securitySchemes: bearerAuth: type: http scheme: bearer