# Create inbox

Create a team inbox with its forwarding email address and web chat channel. Returns the inbox ID, URL slug and forwarding address.

POST https://api.brigg.app/v1/operations/support.CreateInbox

## Access & visibility

Allow `support.CreateInbox` on your API key. Resource write permissions: `core:Inbox`.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | Team inbox name, for example Customer support or Billing. Brigg derives its slug and forwarding address from this name. At least 1 character. At most 80 characters. |

## Response

Returns **200 OK** with a JSON body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Unique identifier. Use the value returned by a create or list operation. |
| `slug` | string | Yes | Stable URL segment identifying this item. |
| `name` | string | Yes | Display name. |
| `forward_address` | string or null | Yes | The inbox's inbound address; null until the org holds a chat token. |

## Errors & retries

Set `BRIGG_REQUEST_ID` once for each logical action. The samples send it as `Idempotency-Key`. Reuse the same value and body on retries, including after a timeout; a missing response does not prove the action failed.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. Supply a stable Idempotency-Key containing 1–200 characters. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. Reuse the original Idempotency-Key. |

## Next steps

- [List inboxes](https://developer.brigg.app/reference/support/ListInboxes)
- [List inbox channels](https://developer.brigg.app/reference/support/ListInboxChannels)
- [Update inbox](https://developer.brigg.app/reference/support/UpdateInbox)

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Example request

Fictional values. Replace IDs and business details with values from your workspace.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/support.CreateInbox' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $BRIGG_REQUEST_ID" \
  --data-raw '{
  "name": "Customer support"
}'
```

#### TypeScript


```typescript
const requestId = process.env.BRIGG_REQUEST_ID;
if (!requestId) throw new Error("Set BRIGG_REQUEST_ID once per action and reuse it on retries.");

const response = await fetch("https://api.brigg.app/v1/operations/support.CreateInbox", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId, // Create once per action; reuse on retries.
  },
  body: JSON.stringify({
    "name": "Customer support"
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

request_id = os.environ["BRIGG_REQUEST_ID"]  # Reuse for retries of this action.
payload = {
  "name": "Customer support"
}
request = Request(
    "https://api.brigg.app/v1/operations/support.CreateInbox",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": request_id,  # Create once per action; reuse on retries.
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "id": "e_example",
  "slug": "support",
  "name": "Customer support",
  "forward_address": "support@example.com"
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "Team inbox name, for example Customer support or Billing. Brigg derives its slug and forwarding address from this name."
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "name": "Customer support"
    }
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier. Use the value returned by a create or list operation."
    },
    "slug": {
      "type": "string",
      "description": "Stable URL segment identifying this item."
    },
    "name": {
      "type": "string",
      "description": "Display name."
    },
    "forward_address": {
      "type": [
        "string",
        "null"
      ],
      "description": "The inbox's inbound address; null until the org holds a chat token."
    }
  },
  "required": [
    "id",
    "slug",
    "name",
    "forward_address"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "id": "e_example",
      "slug": "support",
      "name": "Customer support",
      "forward_address": "support@example.com"
    }
  ]
}
```

