Skip to content
Start here

Email Sending

Send an email
client.emailSending.send(EmailSendingSendParams { account_id, from, subject, 8 more } params, RequestOptionsoptions?): EmailSendingSendResponse { delivered, message_id, permanent_bounces, 2 more }
POST/accounts/{account_id}/email/sending/send
Send a raw MIME email
client.emailSending.sendRaw(EmailSendingSendRawParams { account_id, from, mime_message, recipients } params, RequestOptionsoptions?): EmailSendingSendRawResponse { delivered, message_id, permanent_bounces, 2 more }
POST/accounts/{account_id}/email/sending/send_raw
ModelsExpand Collapse
EmailSendingSendResponse { delivered, message_id, permanent_bounces, 2 more }
delivered: Array<string>

Email addresses to which the message was delivered immediately.

message_id: string

Message ID of the sent email.

permanent_bounces: Array<string>

Email addresses that permanently bounced.

queued: Array<string>

Email addresses for which delivery was queued for later.

suppressed_recipients: Array<string>

Email addresses dropped because they are on the suppression list. Returned when suppressed-recipient dropping is enabled for the sending subdomain; otherwise the request fails instead.

EmailSendingSendRawResponse { delivered, message_id, permanent_bounces, 2 more }
delivered: Array<string>

Email addresses to which the message was delivered immediately.

message_id: string

Message ID of the sent email.

permanent_bounces: Array<string>

Email addresses that permanently bounced.

queued: Array<string>

Email addresses for which delivery was queued for later.

suppressed_recipients: Array<string>

Email addresses dropped because they are on the suppression list. Returned when suppressed-recipient dropping is enabled for the sending subdomain; otherwise the request fails instead.

Email SendingSuppressions

List account Email Sending suppressions
client.emailSending.suppressions.list(SuppressionListParams { account_id, cursor, email, 3 more } params, RequestOptionsoptions?): CursorPagination<SuppressionListResponse { id, created_at, email, 4 more } >
GET/accounts/{account_id}/email/sending/suppressions
Get account Email Sending suppression
client.emailSending.suppressions.get(stringsuppressionID, SuppressionGetParams { account_id } params, RequestOptionsoptions?): SuppressionGetResponse { id, created_at, email, 4 more }
GET/accounts/{account_id}/email/sending/suppressions/{suppression_id}
Create account Email Sending suppression
client.emailSending.suppressions.create(SuppressionCreateParams { account_id, email, expires_at, note } params, RequestOptionsoptions?): SuppressionCreateResponse { id }
POST/accounts/{account_id}/email/sending/suppressions
Update account Email Sending suppression
client.emailSending.suppressions.edit(stringsuppressionID, SuppressionEditParams { account_id, expires_at, note } params, RequestOptionsoptions?): SuppressionEditResponse { id, created_at, email, 4 more }
PATCH/accounts/{account_id}/email/sending/suppressions/{suppression_id}
Delete account Email Sending suppression
client.emailSending.suppressions.delete(stringsuppressionID, SuppressionDeleteParams { account_id } params, RequestOptionsoptions?): SuppressionDeleteResponse { id }
DELETE/accounts/{account_id}/email/sending/suppressions/{suppression_id}
Bulk import account Email Sending suppressions
client.emailSending.suppressions.import(SuppressionImportParams { account_id, items } params, RequestOptionsoptions?): SuppressionImportResponse { deduplicated, errors, invalid, 4 more }
POST/accounts/{account_id}/email/sending/suppressions/bulk
ModelsExpand Collapse
SuppressionListResponse { id, created_at, email, 4 more }
id: string
formatuuid
created_at: string
formatdate-time
email: string
formatemail
expires_at: string | null
formatdate-time
read_only: boolean

Whether clients may mutate this suppression. This is determined by the server and must not be inferred from reason.

reason: string
note?: string | null
SuppressionGetResponse { id, created_at, email, 4 more }
id: string
formatuuid
created_at: string
formatdate-time
email: string
formatemail
expires_at: string | null
formatdate-time
read_only: boolean

Whether clients may mutate this suppression. This is determined by the server and must not be inferred from reason.

reason: string
note?: string | null
SuppressionCreateResponse { id }
id: string
formatuuid
SuppressionEditResponse { id, created_at, email, 4 more }
id: string
formatuuid
created_at: string
formatdate-time
email: string
formatemail
expires_at: string | null
formatdate-time
read_only: boolean

Whether clients may mutate this suppression. This is determined by the server and must not be inferred from reason.

reason: string
note?: string | null
SuppressionDeleteResponse { id }
id: string
formatuuid
SuppressionImportResponse { deduplicated, errors, invalid, 4 more }
deduplicated: number
errors: number
invalid: number
items: Array<Item>
index: number
status: "processed" | "invalid" | "error" | "skipped"
One of the following:
"processed"
"invalid"
"error"
"skipped"
id?: string
formatuuid
email?: string
formatemail
error?: string
processed: number
skipped: number
total: number

Email SendingSubdomains

List sending subdomains
client.emailSending.subdomains.list(SubdomainListParams { zone_id } params, RequestOptionsoptions?): SinglePage<SubdomainListResponse { enabled, name, tag, 6 more } >
GET/zones/{zone_id}/email/sending/subdomains
Get a sending subdomain
client.emailSending.subdomains.get(stringsubdomainID, SubdomainGetParams { zone_id } params, RequestOptionsoptions?): SubdomainGetResponse { enabled, name, tag, 6 more }
GET/zones/{zone_id}/email/sending/subdomains/{subdomain_id}
Create a sending subdomain
client.emailSending.subdomains.create(SubdomainCreateParams { zone_id, name } params, RequestOptionsoptions?): SubdomainCreateResponse { enabled, name, tag, 6 more }
POST/zones/{zone_id}/email/sending/subdomains
Update a sending subdomain
client.emailSending.subdomains.edit(stringsubdomainID, SubdomainEditParams { zone_id, drop_suppressed_recipients, preview_enabled } params, RequestOptionsoptions?): SubdomainEditResponse { enabled, name, tag, 6 more }
PATCH/zones/{zone_id}/email/sending/subdomains/{subdomain_id}
Delete a sending subdomain
client.emailSending.subdomains.delete(stringsubdomainID, SubdomainDeleteParams { zone_id } params, RequestOptionsoptions?): SubdomainDeleteResponse { errors, messages, success }
DELETE/zones/{zone_id}/email/sending/subdomains/{subdomain_id}
ModelsExpand Collapse
SubdomainListResponse { enabled, name, tag, 6 more }
enabled: boolean

Whether Email Sending is enabled on this subdomain.

name: string

The exact domain name or a leftmost wildcard such as *.example.com.

tag: string

Sending subdomain identifier.

maxLength32
created?: string

The date and time the destination address has been created.

formatdate-time
dkim_selector?: string

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with d=<base>.

drop_suppressed_recipients?: boolean

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

modified?: string

The date and time the destination address was last modified.

formatdate-time
preview_enabled?: boolean

Whether sent messages from this subdomain can be previewed in the activity log.

return_path_domain?: string

The return-path domain used for bounce handling. Wildcard rows use cf-bounce.<base>.

SubdomainGetResponse { enabled, name, tag, 6 more }
enabled: boolean

Whether Email Sending is enabled on this subdomain.

name: string

The exact domain name or a leftmost wildcard such as *.example.com.

tag: string

Sending subdomain identifier.

maxLength32
created?: string

The date and time the destination address has been created.

formatdate-time
dkim_selector?: string

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with d=<base>.

drop_suppressed_recipients?: boolean

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

modified?: string

The date and time the destination address was last modified.

formatdate-time
preview_enabled?: boolean

Whether sent messages from this subdomain can be previewed in the activity log.

return_path_domain?: string

The return-path domain used for bounce handling. Wildcard rows use cf-bounce.<base>.

SubdomainCreateResponse { enabled, name, tag, 6 more }
enabled: boolean

Whether Email Sending is enabled on this subdomain.

name: string

The exact domain name or a leftmost wildcard such as *.example.com.

tag: string

Sending subdomain identifier.

maxLength32
created?: string

The date and time the destination address has been created.

formatdate-time
dkim_selector?: string

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with d=<base>.

drop_suppressed_recipients?: boolean

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

modified?: string

The date and time the destination address was last modified.

formatdate-time
preview_enabled?: boolean

Whether sent messages from this subdomain can be previewed in the activity log.

return_path_domain?: string

The return-path domain used for bounce handling. Wildcard rows use cf-bounce.<base>.

SubdomainEditResponse { enabled, name, tag, 6 more }
enabled: boolean

Whether Email Sending is enabled on this subdomain.

name: string

The exact domain name or a leftmost wildcard such as *.example.com.

tag: string

Sending subdomain identifier.

maxLength32
created?: string

The date and time the destination address has been created.

formatdate-time
dkim_selector?: string

The DKIM selector used for email signing. Wildcard rows publish the selector and sign with d=<base>.

drop_suppressed_recipients?: boolean

Whether a send request that includes a recipient suppressed on this subdomain drops that recipient and still delivers to the rest, instead of failing the entire request.

modified?: string

The date and time the destination address was last modified.

formatdate-time
preview_enabled?: boolean

Whether sent messages from this subdomain can be previewed in the activity log.

return_path_domain?: string

The return-path domain used for bounce handling. Wildcard rows use cf-bounce.<base>.

SubdomainDeleteResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

Email SendingSubdomainsDNS

Get sending subdomain DNS records
client.emailSending.subdomains.dns.get(stringsubdomainID, DNSGetParams { zone_id } params, RequestOptionsoptions?): SinglePage<DNSRecord { content, name, priority, 2 more } >
GET/zones/{zone_id}/email/sending/subdomains/{subdomain_id}/dns