Mailboxes

Add an endpoint to a mailbox

Adds an endpoint to a mailbox and returns the mailbox with status 201.

POST
/v1/mailboxes/{id}/endpoints

Adds an endpoint to a mailbox and returns the mailbox with status 201. It follows the same rules as the endpoint of a new mailbox: an email address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, a phone number must be one the organization connected on that channel, and no mailbox may already hold it (409). Messages sent to it reach the mailbox from now on. It becomes the default on its channel only when the mailbox has no endpoint there yet.

x-api-key<token>

In: header

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

channel*"email"

The channel an endpoint, thread, or message belongs to.

Value in

  • "email"
address*string
displayName?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/mailboxes/string/endpoints" \  -H "Content-Type: application/json" \  -d '{    "channel": "email",    "address": "string"  }'
{  "id": "string",  "namespaceId": "string",  "slug": "string",  "name": "string",  "status": "active",  "primaryAddress": "string",  "createdAt": "string",  "description": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "endpoints": [    {      "id": "string",      "address": "string",      "displayName": "string",      "default": true,      "channel": "email",      "source": "samvaHosted",      "domainId": "string"    }  ],  "updatedAt": "string"}

Related documentation