---
title: "Add an address"
method: POST
path: "/agents/{id}/addresses"
tags: ["Addresses"]
---

# Add an address

`POST /agents/{id}/addresses`

## Request

- Base URL: `https://app.artil.ai/api`
- URL: `https://app.artil.ai/api/agents/{id}/addresses`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://mcp.artil.ai/oauth/authorize`
    - Token URL: `https://mcp.artil.ai/oauth/token` scopes: `agent`

Leave out value to get a free address on the channel, or give an email address on the workspace's own domain. A phone number needs a plan that includes one. Give token to connect a Telegram bot, which then sends its messages to Artil.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `channel` 'email' | 'sms' | 'telegram', required
  - `value` string, email
  - `country` string: The ISO country of the phone number; the first one the server sells by default
  - `token` string: The token @BotFather gave a Telegram bot the workspace already has

## Response `201`

The new address

- Address
  - `id` string, uuid, required
  - `channel` 'email' | 'sms' | 'telegram', required
  - `value` string, required: The email address, phone number or Telegram bot's @username
  - `domainId` string, uuid, nullable, required: The workspace's own domain the address is on
  - `primary` boolean, required: Whether new messages on its channel go out from it
  - `registering` boolean: Whether US carriers are still registering the phone number, which sends nothing until they have
  - `createdAt` string, date-time, required

## Other responses

- `202`: The new phone number, which US carriers are still registering. Read it at Location until registering is false; it sends nothing until then.
- `4XX`: The request failed; the error says why
- `5XX`: The request failed; the error says why

---

[API](https://skmtc.dev/artil/apis/artil-api.md) - [All operations](https://skmtc.dev/artil/apis/artil-api/llms.txt) - [OpenAPI document](https://skmtc.dev/artil/apis/artil-api/revisions/55db0efa0cb8?raw)
