Skip to main content

addresses

Creates, updates, deletes, gets or lists an addresses resource.

Overview

Nameaddresses
TypeResource
Idcloudflare.email_routing.addresses

Fields

The following fields are returned by SELECT queries:

Get a destination address response

NameDatatypeDescription
errorsarray
messagesarray
resultobject
successbooleanWhether the API call was successful. (true)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdestination_address_identifier, account_idGets information for a specific destination email already created.
listselectaccount_idpage, per_page, direction, verifiedLists existing destination addresses.
createinsertaccount_id, emailCreate a destination address to forward your emails to. Destination addresses need to be verified before they can be used.
deletedeletedestination_address_identifier, account_idDeletes a specific destination address.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
destination_address_identifierstring
directionstring
pagenumber
per_pagenumber
verifiedboolean

SELECT examples

Gets information for a specific destination email already created.

SELECT
errors,
messages,
result,
success
FROM cloudflare.email_routing.addresses
WHERE destination_address_identifier = '{{ destination_address_identifier }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.

INSERT INTO cloudflare.email_routing.addresses (
email,
account_id
)
SELECT
'{{ email }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

DELETE examples

Deletes a specific destination address.

DELETE FROM cloudflare.email_routing.addresses
WHERE destination_address_identifier = '{{ destination_address_identifier }}' --required
AND account_id = '{{ account_id }}' --required
;