---
title: "Give a session its own email address"
method: POST
path: "/api/v1/chats/{id}/mail_address"
tags: ["Agent mail"]
---

# Give a session its own email address

`POST /api/v1/chats/{id}/mail_address`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/chats/{id}/mail_address`
- Auth: API key in header `api-key`

The session's holder only (a non-observer member of a plain 1:1 with an agent). Idempotent: a live address is returned again. Mail to it lands in a mail lane under this session; the sender list stays the instance's. Same random 26-character alias as any tag; stopped addresses do not count toward the tag cap, and an instance can make at most 20 addresses a day. Anyone else, an unknown id or the flag off: the same 404.

## Path parameters

- `agent_id` string, required
- `id` string, required

## Query parameters

- `holder_id` string

## Response `200`

Already had one.

- object
  - `address` string
  - `tag_id` string

## Other responses

- `201`: Created.
- `401`: Missing or invalid credentials.
- `404`: Not found: unknown, not an agent you may manage, or the feature is off.
- `422`: The mailbox holds the most live tags it can, or made its daily limit of addresses.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
