Resend

Email API for developers

resend.com/docs ↗
Version
1.1.0
OpenAPI
3.0.3
Endpoints
22
Schemas
33
Updated
3 days ago
Email email transactional
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.resend.com

Authentication

bearer

Endpoints

Clear filters

Api keys 1 endpoints

GET /api-keys
operationId: ApiKeys_getList

Responses

200 OK
GET /api-keys

Audiences 2 endpoints

GET /audiences
operationId: Audiences_getList

Responses

200 OK
GET /audiences
GET /audiences/{id}
operationId: Audiences_getSingleAudience

Parameters

Name In Required Type Description
id path required string

Responses

200 OK
GET /audiences/{id}

Contacts 2 endpoints

GET /audiences/{audience_id}/contacts
operationId: Contacts_getList

Parameters

Name In Required Type Description
audience_id path required string

Responses

200 OK
GET /audiences/{audience_id}/contacts
GET /audiences/{audience_id}/contacts/{id}
operationId: Contacts_getSingle

Parameters

Name In Required Type Description
id path required string
audience_id path required string

Responses

200 OK
GET /audiences/{audience_id}/contacts/{id}

Domains 2 endpoints

GET /domains
operationId: Domains_getList

Responses

200 OK
GET /domains
GET /domains/{domain_id}
operationId: Domains_getSingleDomain

Parameters

Name In Required Type Description
domain_id path required string

Responses

200 OK
GET /domains/{domain_id}

Emails 1 endpoints

GET /emails/{email_id}
operationId: Emails_getSingleEmail

Parameters

Name In Required Type Description
email_id path required string

Responses

200 OK
GET /emails/{email_id}

Schemas

object ApiKey
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the API key."
    },
    "name": {
      "type": "string",
      "description": "The name of the API key."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the API key was created."
    }
  }
}
object Attachment
{
  "type": "object",
  "properties": {
    "path": {
      "type": "string",
      "description": "Path where the attachment file is hosted"
    },
    "content": {
      "type": "string",
      "format": "binary",
      "description": "Content of an attached file."
    },
    "filename": {
      "type": "string",
      "description": "Name of attached file."
    }
  }
}
object CreateApiKeyRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The API key name."
    },
    "domain_id": {
      "type": "string",
      "description": "Restrict an API key to send emails only from a specific domain. Only used when the permission is sending_acces."
    },
    "permission": {
      "enum": [
        "full_access",
        "sending_access"
      ],
      "type": "string",
      "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."
    }
  }
}
object CreateApiKeyResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the API key."
    },
    "token": {
      "type": "string",
      "description": "The token of the API key."
    }
  }
}
object CreateAudienceOptions
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the audience you want to create."
    }
  }
}
object CreateAudienceResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
      "description": "The ID of the audience."
    },
    "name": {
      "type": "string",
      "example": "Registered Users",
      "description": "The name of the audience."
    },
    "object": {
      "type": "string",
      "example": "audience",
      "description": "The object of the audience."
    }
  }
}
object CreateBatchEmailsResponse
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the sent email."
          }
        }
      }
    }
  }
}
object CreateContactOptions
{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "example": "steve.wozniak@gmail.com",
      "description": "Email address of the contact."
    },
    "last_name": {
      "type": "string",
      "example": "Wozniak",
      "description": "Last name of the contact."
    },
    "first_name": {
      "type": "string",
      "example": "Steve",
      "description": "First name of the contact."
    },
    "audience_id": {
      "type": "string",
      "example": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
      "description": "Unique identifier of the audience to which the contact belongs."
    },
    "unsubscribed": {
      "type": "boolean",
      "example": false,
      "description": "Indicates if the contact is unsubscribed."
    }
  }
}
object CreateContactResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "479e3145-dd38-476b-932c-529ceb705947",
      "description": "Unique identifier for the created contact."
    },
    "object": {
      "type": "string",
      "example": "contact",
      "description": "Type of the response object."
    }
  }
}
object CreateDomainRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the domain you want to create."
    },
    "region": {
      "enum": [
        "us-east-1",
        "eu-west-1",
        "sa-east-1"
      ],
      "type": "string",
      "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"
    }
  }
}
object CreateDomainResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the domain."
    },
    "name": {
      "type": "string",
      "description": "The name of the domain."
    },
    "region": {
      "type": "string",
      "description": "The region where the domain is hosted."
    },
    "status": {
      "type": "string",
      "description": "The status of the domain."
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DomainRecord"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the domain was created."
    }
  }
}
object DeleteDomainResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "d91cd9bd-1176-453e-8fc1-35364d380206",
      "description": "The ID of the domain."
    },
    "object": {
      "type": "string",
      "example": "domain",
      "description": "The type of object."
    },
    "deleted": {
      "type": "boolean",
      "example": true,
      "description": "Indicates whether the domain was deleted successfully."
    }
  }
}
object Domain
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "d91cd9bd-1176-453e-8fc1-35364d380206",
      "description": "The ID of the domain."
    },
    "name": {
      "type": "string",
      "example": "example.com",
      "description": "The name of the domain."
    },
    "object": {
      "type": "string",
      "example": "domain",
      "description": "The type of object."
    },
    "region": {
      "type": "string",
      "example": "us-east-1",
      "description": "The region where the domain is hosted."
    },
    "status": {
      "type": "string",
      "example": "not_started",
      "description": "The status of the domain."
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DomainRecord"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2023-04-26T20:21:26.347412+00:00",
      "description": "The date and time the domain was created."
    }
  }
}
object DomainRecord
{
  "type": "object",
  "properties": {
    "ttl": {
      "type": "string",
      "description": "The time to live for the record."
    },
    "name": {
      "type": "string",
      "description": "The name of the record."
    },
    "type": {
      "type": "string",
      "description": "The type of record."
    },
    "value": {
      "type": "string",
      "description": "The value of the record."
    },
    "record": {
      "type": "string",
      "description": "The type of record."
    },
    "status": {
      "type": "string",
      "description": "The status of the record."
    },
    "priority": {
      "type": "integer",
      "description": "The priority of the record."
    }
  }
}
object Email
{
  "type": "object",
  "properties": {
    "cc": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The email addresses of the carbon copy recipients."
    },
    "id": {
      "type": "string",
      "example": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
      "description": "The ID of the email."
    },
    "to": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "The email addresses of the recipients."
      },
      "example": [
        "delivered@resend.dev"
      ]
    },
    "bcc": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The email addresses of the blind carbon copy recipients."
    },
    "from": {
      "type": "string",
      "example": "Acme <onboarding@resend.dev>",
      "description": "The email address of the sender."
    },
    "html": {
      "type": "string",
      "example": "Congrats on sending your <strong>first email</strong>!",
      "description": "The HTML body of the email."
    },
    "text": {
      "type": "string",
      "description": "The plain text body of the email."
    },
    "object": {
      "type": "string",
      "example": "email",
      "description": "The type of object."
    },
    "subject": {
      "type": "string",
      "example": "Hello World",
      "description": "The subject line of the email."
    },
    "reply_to": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The email addresses to which replies should be sent."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2023-04-03T22:13:42.674981+00:00",
      "description": "The date and time the email was created."
    },
    "last_event": {
      "type": "string",
      "example": "delivered",
      "description": "The status of the email."
    }
  }
}
array EmailsTriggerBatchEmailsRequest
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/SendEmailRequest"
  }
}
object GetAudienceResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
      "description": "The ID of the audience."
    },
    "name": {
      "type": "string",
      "example": "Registered Users",
      "description": "The name of the audience."
    },
    "object": {
      "type": "string",
      "example": "audience",
      "description": "The object of the audience."
    },
    "created_at": {
      "type": "string",
      "example": "2023-10-06T22:59:55.977Z",
      "description": "The date that the object was created."
    }
  }
}
object GetContactResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "e169aa45-1ecf-4183-9955-b1499d5701d3",
      "description": "Unique identifier for the contact."
    },
    "email": {
      "type": "string",
      "example": "steve.wozniak@gmail.com",
      "description": "Email address of the contact."
    },
    "object": {
      "type": "string",
      "example": "contact",
      "description": "Type of the response object."
    },
    "last_name": {
      "type": "string",
      "example": "Wozniak",
      "description": "Last name of the contact."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2023-10-06T23:47:56.678Z",
      "description": "Timestamp indicating when the contact was created."
    },
    "first_name": {
      "type": "string",
      "example": "Steve",
      "description": "First name of the contact."
    },
    "unsubscribed": {
      "type": "boolean",
      "example": false,
      "description": "Indicates if the contact is unsubscribed."
    }
  }
}
object ListApiKeysResponse
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ApiKey"
      }
    }
  }
}
object ListAudiencesResponseSuccess
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
            "description": "Unique identifier for the audience."
          },
          "name": {
            "type": "string",
            "example": "Registered Users",
            "description": "Name of the audience."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2023-10-06T22:59:55.977Z",
            "description": "Timestamp indicating when the audience was created."
          }
        }
      },
      "description": "Array containing audience information."
    },
    "object": {
      "type": "string",
      "example": "list",
      "description": "Type of the response object."
    }
  }
}
object ListContactsResponseSuccess
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "e169aa45-1ecf-4183-9955-b1499d5701d3",
            "description": "Unique identifier for the contact."
          },
          "email": {
            "type": "string",
            "example": "steve.wozniak@gmail.com",
            "description": "Email address of the contact."
          },
          "last_name": {
            "type": "string",
            "example": "Wozniak",
            "description": "Last name of the contact."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2023-10-06T23:47:56.678Z",
            "description": "Timestamp indicating when the contact was created."
          },
          "first_name": {
            "type": "string",
            "example": "Steve",
            "description": "First name of the contact."
          },
          "unsubscribed": {
            "type": "boolean",
            "example": false,
            "description": "Indicates if the contact is unsubscribed."
          }
        }
      },
      "description": "Array containing contact information."
    },
    "object": {
      "type": "string",
      "example": "list",
      "description": "Type of the response object."
    }
  }
}
object ListDomainsItem
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "d91cd9bd-1176-453e-8fc1-35364d380206",
      "description": "The ID of the domain."
    },
    "name": {
      "type": "string",
      "example": "example.com",
      "description": "The name of the domain."
    },
    "region": {
      "type": "string",
      "example": "us-east-1",
      "description": "The region where the domain is hosted."
    },
    "status": {
      "type": "string",
      "example": "not_started",
      "description": "The status of the domain."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2023-04-26T20:21:26.347412+00:00",
      "description": "The date and time the domain was created."
    }
  }
}
object ListDomainsResponse
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ListDomainsItem"
      }
    }
  }
}
object RemoveAudienceResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
      "description": "The ID of the audience."
    },
    "object": {
      "type": "string",
      "example": "audience",
      "description": "The object of the audience."
    },
    "deleted": {
      "type": "boolean",
      "example": true,
      "description": "The deleted attribute indicates that the corresponding audience has been deleted."
    }
  }
}
object RemoveContactResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "520784e2-887d-4c25-b53c-4ad46ad38100",
      "description": "Unique identifier for the removed contact."
    },
    "object": {
      "type": "string",
      "example": "contact",
      "description": "Type of the response object."
    },
    "deleted": {
      "type": "boolean",
      "example": true,
      "description": "Indicates whether the contact was successfully deleted."
    }
  }
}
object SendEmailRequest
{
  "type": "object",
  "required": [
    "from",
    "to",
    "subject"
  ],
  "properties": {
    "cc": {
      "type": "string",
      "description": "Cc recipient email address. For multiple addresses, send as an array of strings."
    },
    "to": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Recipient email address. For multiple addresses, send as an array of strings. Max 50."
      }
    },
    "bcc": {
      "type": "string",
      "description": "Bcc recipient email address. For multiple addresses, send as an array of strings."
    },
    "from": {
      "type": "string",
      "description": "Sender email address. To include a friendly name, use the format \"Your Name <sender@domain.com>\"."
    },
    "html": {
      "type": "string",
      "description": "The HTML version of the message."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Tag"
      }
    },
    "text": {
      "type": "string",
      "description": "The plain text version of the message."
    },
    "headers": {
      "type": "object",
      "description": "Custom headers to add to the email."
    },
    "subject": {
      "type": "string",
      "description": "Email subject."
    },
    "reply_to": {
      "type": "string",
      "description": "Reply-to email address. For multiple addresses, send as an array of strings."
    },
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Attachment"
      }
    }
  }
}
object SendEmailResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the sent email."
    }
  }
}
object Tag
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "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."
    },
    "value": {
      "type": "string",
      "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."
    }
  }
}
object UpdateContactOptions
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "example": "steve.wozniak@gmail.com",
      "description": "Email address of the contact."
    },
    "last_name": {
      "type": "string",
      "example": "Wozniak",
      "description": "Last name of the contact."
    },
    "first_name": {
      "type": "string",
      "example": "Steve",
      "description": "First name of the contact."
    },
    "unsubscribed": {
      "type": "boolean",
      "example": false,
      "description": "Indicates the subscription status of the contact."
    }
  }
}
object UpdateContactResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "479e3145-dd38-476b-932c-529ceb705947",
      "description": "Unique identifier for the updated contact."
    },
    "object": {
      "type": "string",
      "example": "contact",
      "description": "Type of the response object."
    }
  }
}
object UpdateDomainOptions
{
  "type": "object",
  "properties": {
    "open_tracking": {
      "type": "boolean",
      "example": true,
      "description": "Enable or disable open tracking for the domain."
    },
    "click_tracking": {
      "type": "boolean",
      "example": true,
      "description": "Enable or disable click tracking for the domain."
    }
  }
}
object UpdateDomainResponseSuccess
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "d91cd9bd-1176-453e-8fc1-35364d380206",
      "description": "The ID of the updated domain."
    },
    "object": {
      "type": "string",
      "example": "domain",
      "description": "The object type representing the updated domain."
    }
  }
}
object VerifyDomainResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "d91cd9bd-1176-453e-8fc1-35364d380206",
      "description": "The ID of the domain."
    },
    "object": {
      "type": "string",
      "example": "domain",
      "description": "The type of object."
    }
  }
}