Mailboxes

Create a mailbox

Creates a mailbox with one endpoint and returns it with status 201; the caller gets an admin grant on it.

POST
/v1/mailboxes

Creates a mailbox with one endpoint and returns it with status 201; the caller gets an admin grant on it. Email is the channel a mailbox endpoint uses today; another channel is refused (422). An email endpoint's address must be under the organization's Samva-hosted mail domain or a verified domain with receiving enabled, and the mailbox sends from it. The slug defaults to the address's local part. Pass slug when that is taken or not a valid slug. The mailbox receives mail from now on; mail that arrived earlier is not added to it. Conflicts if the address or slug is already in use. Returns 402 when the organization is at its plan's mailbox allowance or at its mailbox storage allowance; incoming mail is still received past the storage allowance.

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

namespaceId?|null
endpoint*
name*string
slug?string|null
metadata?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/mailboxes" \  -H "Content-Type: application/json" \  -d '{    "endpoint": {      "channel": "email",      "address": "string"    },    "name": "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