Skip to main content
POST
Create inbound email address

Authorizations

Authorization
string
header
required

API key or access token

Body

application/json
purpose
enum<string>
required

What the address is for. briefs receives briefs and requests; reports receives reports. The purpose is part of the readable address prefix and selects the handler.

Available options:
briefs,
reports
Example:

"reports"

advertiserId

Optional advertiser the address belongs to. It must be one of your account’s advertisers; its name becomes the readable prefix.

Required range: 0 < x <= 9007199254740991

Response

Create inbound email address

id
string<uuid>
required

Stable address ID. It stays the same when the address is rotated.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
address
string<email>
required

The email address to send to: a readable prefix, an unguessable suffix and the dedicated inbound domain.

Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Example:

"coke-reports-k7m2qz4xhd9a@in.staging.apostra.com"

purpose
enum<string>
required

What the address is for. briefs receives briefs and requests; reports receives reports. The purpose is part of the readable address prefix and selects the handler.

Available options:
briefs,
reports
Example:

"reports"

handler
enum<string>
required

Where received mail is delivered. session_intake records each message privately in the account’s shared Session.

Available options:
session_intake
customerId
integer
required

Customer account that owns this address

Required range: 0 < x <= 9007199254740991
advertiserId
integer | null
required

The advertiser this address belongs to, or null for an account-wide address

Required range: 0 < x <= 9007199254740991
revision
integer
required

Increases by one each time the address is rotated

Required range: 0 < x <= 9007199254740991
status
enum<string>
required

active addresses receive mail. Mail to a revoked or rotated-away address is refused.

Available options:
active,
revoked
createdAt
string<date-time>
required

When this revision of the address was created

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
revokedAt
string<date-time> | null
required

When the address stopped receiving, or null while active

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$