Mailboxes

Create a mailbox policy

Adds a send policy to a mailbox and returns it with status 201.

POST
/v1/mailboxes/{id}/policies

Adds a send policy to a mailbox and returns it with status 201. It applies to every send proposed after it is created, whoever proposes it. A mailbox that already holds 20 policies conflicts.

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.

name*string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length <= 128
outcome*MailboxPolicyOutcomeKind

Value in

  • "requireApproval"
  • "deny"
reason?|null
enabled?boolean|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/policies" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "outcome": "requireApproval"  }'
{  "id": "string",  "name": "string",  "outcome": "requireApproval",  "reason": "string",  "enabled": true,  "createdAt": "string",  "updatedAt": "string"}

Related documentation