# Make a mailbox inside the plan

`POST /workspace/mailboxes` · Rivier · inbox

Make a mailbox inside the plan: shared, a team member’s, an agent’s or send-only.

- Scope: inbox:write
- Mcp: rivier_mailbox_allocate
- Graphql: Mutation.inboxMailboxCreate
- Sdk: inbox.mailbox.create
- Cli: inbox mailbox create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "shared",
        "human",
        "agent",
        "machine"
      ]
    },
    "localpart": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "handle": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "template": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "memberId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "memberName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "agentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "members": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 120
      },
      "maxItems": 50
    },
    "routeTo": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ]
    },
    "domain": {
      "type": "string",
      "minLength": 3,
      "maxLength": 253
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/workspace/mailboxes' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "kind": "shared"
}'
```
