# Inbox

The email inbox of an SVM, its webhook and its Telegram bot

Source: https://slashinfra.com/docs/api-reference/control/inbox
Last modified: 2026-11-30T16:36:19.000Z

The email inbox of an SVM, its webhook and its Telegram bot

Resource, request and plan limits are listed on [Limits](https://slashinfra.com/docs/reference/limits).

[Download OpenAPI specification](https://slashinfra.com/docs/control.openapi.json) · Version 0.1.0

[GETShow the inbox of an SVM](https://slashinfra.com/docs/api-reference/control/inbox#getSvmsByRefInbox)[PUTEnable or disable the inbox of an SVM, and set its webhook and sender rule](https://slashinfra.com/docs/api-reference/control/inbox#putSvmsByRefInbox)[DELETEDisconnect the Telegram bot of an SVM](https://slashinfra.com/docs/api-reference/control/inbox#deleteSvmsByRefInboxTelegram)[PUTConnect a Telegram bot to the inbox of an SVM](https://slashinfra.com/docs/api-reference/control/inbox#putSvmsByRefInboxTelegram)[POSTMake a new Telegram pairing code](https://slashinfra.com/docs/api-reference/control/inbox#postSvmsByRefInboxTelegramPair)[PUTSet the Telegram users who may send to the inbox](https://slashinfra.com/docs/api-reference/control/inbox#putSvmsByRefInboxTelegramUsers)[POSTRotate the webhook secret of an SVM inbox](https://slashinfra.com/docs/api-reference/control/inbox#postSvmsByRefInboxWebhookRotate)

### Show the inbox of an SVM

GET

/svms/{ref}/inbox

Returns whether the inbox accepts mail, its address, sender rule and webhook; the inbox is off by default and rejects mail at SMTP until it is on.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Response Body

The inbox of one SVM.

`application/json`

- response

- response
- …

The inbox of one SVM.

`address*`string

The address of the inbox: `<SVM id>@<SVM domain>`; a `+tag` after the id is accepted and stored with the message.

`allowed_senders*`array<>|

The sender rule: `null` accepts every sender, `[]` accepts none, and a list accepts exactly those SMTP envelope addresses, trimmed and lowercased, with no domain wildcards.

`enabled*`boolean

Whether the inbox accepts mail; an inbox that is off rejects mail at SMTP and wakes nothing.

`telegram*`

The Telegram bot of an SVM; its token lives in the vault and is never part of an answer.

`webhook_url*`|

The HTTPS URL that receives a signed POST per message.

Example Request

```
curl -X GET 'https://api.slashinfra.com/svms/build-1/inbox'
```

Example ResponseSchema

```
{  "address": "6f1c0f0e8a@slashinfra.dev",  "allowed_senders": [    "ada@example.com"  ],  "enabled": true,  "telegram": {    "allowed_users": [      "123456789"    ],    "bot_username": "build_1_bot",    "connected": true,    "pair_code": "k3m9q2x7",    "pair_expires_ms": 1767229200000  },  "webhook_url": "https://example.com/slashinfra"}
```

### Enable or disable the inbox of an SVM, and set its webhook and sender rule

PUT

/svms/{ref}/inbox

Turns the inbox on or off, sets or removes the webhook and sets the sender rule; a new or changed webhook URL returns a new secret once, and disabling keeps the webhook and rule. Turning it on needs a plan with `inbox_allowed`, and the sender rule applies to new mail only; see [email](https://slashinfra.com/docs/platform/email).

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Request Body

- body

- body
- …

`allowed_senders?`array<>|

The sender rule: `null` accepts every sender, `[]` accepts none, and a list accepts exactly those SMTP envelope addresses; omit it to keep the current rule.

`enabled*`boolean

Whether the inbox accepts mail; turning it on needs a plan with `inbox_allowed`.

`webhook_url?`|

The HTTPS URL of the webhook.

#### Response Body

The inbox of one SVM, with a webhook secret when one was set or rotated.

`application/json`

- response

- response
- …

The inbox of one SVM, with a webhook secret when one was set or rotated.

`address*`string

The address of the inbox: `<SVM id>@<SVM domain>`; a `+tag` after the id is accepted and stored with the message.

`allowed_senders*`array<>|

The sender rule: `null` accepts every sender, `[]` accepts none, and a list accepts exactly those SMTP envelope addresses, trimmed and lowercased, with no domain wildcards.

`enabled*`boolean

Whether the inbox accepts mail; an inbox that is off rejects mail at SMTP and wakes nothing.

`telegram*`

The Telegram bot of an SVM; its token lives in the vault and is never part of an answer.

`webhook_secret?`string

The new webhook secret, shown once; it signs `X-Slashinfra-Signature` on every webhook POST.

`webhook_url*`|

The HTTPS URL that receives a signed POST per message.

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/inbox' \  -H 'Content-Type: application/json' \  -d '{  "enabled": true}'
```

Example ResponseSchema

```
{  "address": "6f1c0f0e8a@slashinfra.dev",  "allowed_senders": [    "ada@example.com"  ],  "enabled": true,  "telegram": {    "allowed_users": [      "123456789"    ],    "bot_username": "build_1_bot",    "connected": true,    "pair_code": "k3m9q2x7",    "pair_expires_ms": 1767229200000  },  "webhook_secret": "whsec_4Qm8nT2vX7kL9pR1sW6yB3cF5hJ0aD8eG2iK4mN6oP",  "webhook_url": "https://example.com/slashinfra"}
```

### Disconnect the Telegram bot of an SVM

DELETE

/svms/{ref}/inbox/telegram

Removes the webhook, the bot token and its injection rule; the SVM keeps its other inbox settings and its messages.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Response Body

The bot is disconnected, with no body.

`response?`string`text/plain`

The bot is disconnected, with no body.

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/inbox/telegram'
```

Example ResponseSchema

```
"string"
```

### Connect a Telegram bot to the inbox of an SVM

PUT

/svms/{ref}/inbox/telegram

Checks the bot token with `getMe`, stores it in the vault as an internal secret that [secrets](https://slashinfra.com/docs/platform/secrets) does not list, and registers the webhook and the injection rule to `api.telegram.org`. The user then pairs with the returned code; the inbox must be enabled and the plan must allow inboxes.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Request Body

- body

- body
- …

`bot_token*`string

The bot token from BotFather, checked with `getMe` and then stored in the vault; answers never include it.

#### Response Body

The connected bot and the pairing code that a user sends to it.

`application/json`

- response

- response
- …

The connected bot and the pairing code that a user sends to it.

`bot_username*`string

The username of the bot.

`pair_code*`string

The single-use pairing code: the user sends `/start <pair_code>` to the bot within ten minutes.

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/inbox/telegram' \  -H 'Content-Type: application/json' \  -d '{  "bot_token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"}'
```

Example ResponseSchema

```
{  "bot_username": "build_1_bot",  "pair_code": "k3m9q2x7"}
```

### Make a new Telegram pairing code

POST

/svms/{ref}/inbox/telegram/pair

Replaces the live pairing code with a new single-use one, valid for ten minutes. A user sends `/start <pair_code>` to the bot, joins the allowed users and gets `paired` as the answer.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Response Body

A new pairing code and its expiry.

`application/json`

- response

- response
- …

A new pairing code and its expiry.

`expires_ms*`integer

When the code expires, in milliseconds since the Unix epoch.

`pair_code*`string

The new single-use code.

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/inbox/telegram/pair'
```

Example ResponseSchema

```
{  "expires_ms": 1767229200000,  "pair_code": "k3m9q2x7"}
```

### Set the Telegram users who may send to the inbox

PUT

/svms/{ref}/inbox/telegram/users

Replaces the list of numeric Telegram user ids whose messages reach the inbox. An empty list accepts none; a paired user is added by `/start <pair_code>`.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Request Body

- body

- body
- …

`allowed_users*`array<>

#### Response Body

The Telegram bot of an SVM; its token lives in the vault and is never part of an answer.

`application/json`

- response

- response
- …

The Telegram bot of an SVM; its token lives in the vault and is never part of an answer.

`allowed_users*`array<>

The numeric Telegram user ids whose messages reach the inbox; it is empty until the first pair.

`bot_username*`|

The username of the bot.

`connected*`boolean

Whether a Telegram bot is connected.

`pair_code*`|

The single-use pairing code, valid for ten minutes.

`pair_expires_ms*`|

When the pairing code expires, in milliseconds since the Unix epoch.

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/inbox/telegram/users' \  -H 'Content-Type: application/json' \  -d '{  "allowed_users": [    "123456789"  ]}'
```

Example ResponseSchema

```
{  "allowed_users": [    "123456789"  ],  "bot_username": "build_1_bot",  "connected": true,  "pair_code": "k3m9q2x7",  "pair_expires_ms": 1767229200000}
```

### Rotate the webhook secret of an SVM inbox

POST

/svms/{ref}/inbox/webhook/rotate

Makes a new secret, returned once, and the old secret stops verifying `X-Slashinfra-Signature` on every later POST; a webhook must be set first.

#### Authorization

`apiKey`

header`Authorization``Bearer <token>`

An API key (`si_` and 43 base64url characters), sent as `Authorization: Bearer si_...`; see [Using the API](https://slashinfra.com/docs/reference/api).

#### Path Parameters

`ref*`string

The SVM id, or its name in the organization of the key: ten symbols of `0123456789abcdefghjkmnpqrstvwxyz` is an id, any other reference is a name.

Length`1 <= length`

#### Query Parameters

`project?`string

The project id or name, `default` when omitted; an unknown project answers 404 `project_not_found`.

#### Response Body

The inbox of one SVM, with a webhook secret when one was set or rotated.

`application/json`

- response

- response
- …

The inbox of one SVM, with a webhook secret when one was set or rotated.

`address*`string

The address of the inbox: `<SVM id>@<SVM domain>`; a `+tag` after the id is accepted and stored with the message.

`allowed_senders*`array<>|

The sender rule: `null` accepts every sender, `[]` accepts none, and a list accepts exactly those SMTP envelope addresses, trimmed and lowercased, with no domain wildcards.

`enabled*`boolean

Whether the inbox accepts mail; an inbox that is off rejects mail at SMTP and wakes nothing.

`telegram*`

The Telegram bot of an SVM; its token lives in the vault and is never part of an answer.

`webhook_secret?`string

The new webhook secret, shown once; it signs `X-Slashinfra-Signature` on every webhook POST.

`webhook_url*`|

The HTTPS URL that receives a signed POST per message.

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/inbox/webhook/rotate'
```

Example ResponseSchema

```
{  "address": "6f1c0f0e8a@slashinfra.dev",  "allowed_senders": [    "ada@example.com"  ],  "enabled": true,  "telegram": {    "allowed_users": [      "123456789"    ],    "bot_username": "build_1_bot",    "connected": true,    "pair_code": "k3m9q2x7",    "pair_expires_ms": 1767229200000  },  "webhook_secret": "whsec_4Qm8nT2vX7kL9pR1sW6yB3cF5hJ0aD8eG2iK4mN6oP",  "webhook_url": "https://example.com/slashinfra"}
```

GET

/svms/{ref}/inbox

Example Request

```
curl -X GET 'https://api.slashinfra.com/svms/build-1/inbox'
```

```
{
"address": "6f1c0f0e8a@slashinfra.dev",
"allowed_senders": [
"ada@example.com"
],
"enabled": true,
"telegram": {
"allowed_users": [
"123456789"
],
"bot_username": "build_1_bot",
"connected": true,
"pair_code": "k3m9q2x7",
"pair_expires_ms": 1767229200000
},
"webhook_url": "https://example.com/slashinfra"
}
```

PUT

/svms/{ref}/inbox

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/inbox' \
-H 'Content-Type: application/json' \
-d '{
"enabled": true
}'
```

```
{
"address": "6f1c0f0e8a@slashinfra.dev",
"allowed_senders": [
"ada@example.com"
],
"enabled": true,
"telegram": {
"allowed_users": [
"123456789"
],
"bot_username": "build_1_bot",
"connected": true,
"pair_code": "k3m9q2x7",
"pair_expires_ms": 1767229200000
},
"webhook_secret": "whsec_4Qm8nT2vX7kL9pR1sW6yB3cF5hJ0aD8eG2iK4mN6oP",
"webhook_url": "https://example.com/slashinfra"
}
```

DELETE

/svms/{ref}/inbox/telegram

Example Request

```
curl -X DELETE 'https://api.slashinfra.com/svms/build-1/inbox/telegram'
```

```
"string"
```

PUT

/svms/{ref}/inbox/telegram

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/inbox/telegram' \
-H 'Content-Type: application/json' \
-d '{
"bot_token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
}'
```

```
{
"bot_username": "build_1_bot",
"pair_code": "k3m9q2x7"
}
```

POST

/svms/{ref}/inbox/telegram/pair

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/inbox/telegram/pair'
```

```
{
"expires_ms": 1767229200000,
"pair_code": "k3m9q2x7"
}
```

PUT

/svms/{ref}/inbox/telegram/users

Example Request

```
curl -X PUT 'https://api.slashinfra.com/svms/build-1/inbox/telegram/users' \
-H 'Content-Type: application/json' \
-d '{
"allowed_users": [
"123456789"
]
}'
```

```
{
"allowed_users": [
"123456789"
],
"bot_username": "build_1_bot",
"connected": true,
"pair_code": "k3m9q2x7",
"pair_expires_ms": 1767229200000
}
```

POST

/svms/{ref}/inbox/webhook/rotate

Example Request

```
curl -X POST 'https://api.slashinfra.com/svms/build-1/inbox/webhook/rotate'
```

```
{
"address": "6f1c0f0e8a@slashinfra.dev",
"allowed_senders": [
"ada@example.com"
],
"enabled": true,
"telegram": {
"allowed_users": [
"123456789"
],
"bot_username": "build_1_bot",
"connected": true,
"pair_code": "k3m9q2x7",
"pair_expires_ms": 1767229200000
},
"webhook_secret": "whsec_4Qm8nT2vX7kL9pR1sW6yB3cF5hJ0aD8eG2iK4mN6oP",
"webhook_url": "https://example.com/slashinfra"
}
```
