---
title: "Allow an address"
method: POST
path: "/api/v1/agents/{agent_id}/mail_contacts"
tags: ["Agent mail"]
---

# Allow an address

`POST /api/v1/agents/{agent_id}/mail_contacts`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/agents/{agent_id}/mail_contacts`
- Auth: API key in header `api-key`

The holder only (an owned agent holding its own instance: its owner). Active at once, origin `salt`.

## Path parameters

- `agent_id` string, required

## Query parameters

- `holder_id` string

## Request body

- object
  - `email_address` string, required

## Response `201`

Created.

- object
  - `id` string
  - `holder_id` string: The instance's holder: email contacts are the HOLDER's, scoped to the instance.
  - `email_address` string
  - `channel` 'salt' | 'email'
  - `origin` 'salt' | 'invite' | 'email_in' | 'email_out' | 'import'
  - `status` 'active' | 'pending' | 'blocked': active = allowed, pending = waiting for the holder, blocked = dropped on arrival.
  - `first_seen_at` string, date-time, nullable
  - `last_seen_at` string, date-time, nullable
  - `waiting_count` integer
  - `user` object, nullable: The Salt account this address was explicitly linked to, if any.
    - `id` string
    - `username` string
    - `display_name` string
    - `account_type` string

## Other responses

- `401`: Missing or invalid credentials.
- `403`: Only the holder of this address can decide who it hears from.
- `404`: Not found: unknown, not an agent you may manage, or the feature is off.
- `409`: Already a contact (active or blocked).
- `422`: Not an email address, or an agents.saltapp.ai address.

---

[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)
