Skip to Content
Pouch
Addresses

Create an address

POST
/v1/addresses

Auth: Bearer live key scoped to the domain.

The domain needs inbound enabled. Mail to the address emits address.received to the creating key's endpoints. After expiry or revocation, mail is dropped silently and counted; nothing is refused or bounced.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Request Body

application/json
  1. body
domain_id*string

The domain the address lives on. Mail reaches it at <local_part>@<the domain's inbound host>, so inbound has to be enabled.

Length1 <= length
local_part?string

The part before the @. Lowercased. Random when omitted. postmaster and abuse stay with the domain.

Match^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$
label?string

A note for your own use, such as what the address is for.

Length1 <= length <= 200
expires_at?string

When the address stops delivering, as an ISO 8601 timestamp. Give this or expires_in.

Match^(?:(?:\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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
expires_in?integer

Seconds from now until the address stops delivering, 60 to 31536000. Give this or expires_at.

Range60 <= value <= 31536000
message_cap?integer

Most messages the address delivers over its life. Mail past it is dropped and counted.

Range1 <= value <= 1000000

Response Body

The created address.

application/json
  1. response
id?string

Opaque id, prefixed adr_.

address?string

The full address: <local_part>@<the domain's inbound host>.

domain_id?string

The domain it lives on.

local_part?string

The part before the @, lowercased.

label?|

Your note, or null.

status?string

active delivers. expired and revoked drop mail silently and count it. Only revoked is final.

Value in"active""expired""revoked"
expires_at?string

ISO 8601 timestamp the address stops delivering.

message_cap?|

Most messages it delivers over its life, or null for no cap.

key_id?|

The key that created it. That key's endpoints subscribed to address.received hear its mail.

counts?

Messages delivered, over its life and on the current UTC day, and messages dropped after expiry or revocation, past the cap or the daily limit, or for failing a virus scan. forwarded counts copies sent on to forward targets.

last_received_at?|

ISO 8601 timestamp of the last delivered message, or null.

revoked_at?|

ISO 8601 timestamp, or null.

created_at?string

ISO 8601 timestamp.

updated_at?string

ISO 8601 timestamp.

Example Request
curl -X POST 'https://pouch.example.com/v1/addresses' \  -H 'Content-Type: application/json' \  -d '{  "domain_id": "string"}'
Example Response
{  "id": "string",  "address": "string",  "domain_id": "string",  "local_part": "string",  "label": "string",  "status": "active",  "expires_at": "string",  "message_cap": 0,  "key_id": "string",  "counts": {    "received": 0,    "received_today": 0,    "dropped_expired": 0,    "dropped_over_limit": 0,    "dropped_virus": 0,    "forwarded": 0  },  "last_received_at": "string",  "revoked_at": "string",  "created_at": "string",  "updated_at": "string"}