---
title: "Create an agent profile"
method: POST
path: "/agents"
tags: ["agents"]
---

# Create an agent profile

`POST /agents`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/agents`
- Auth: HTTP bearer

mode is off / summarize / draft (auto opens after guardrail validation).

## Request body

- object
  - `name` string: Name, up to 100 characters
  - `persona_prompt` string: Persona prompt, up to 8000 characters
  - `mode` string: off / summarize / draft
  - `address_id` string, nullable: Inbox address ID to bind; null leaves it unbound
  - `allowed_senders` string[]: Sender allowlist, up to 100 entries
  - `skills` object[]: User-defined skills; an empty array deletes all skills
    - `id` string, required
    - `name` string, required
    - `description` string, required
    - `instructions` string, required
    - `enabled` boolean, required
  - `summary_prompt` string, nullable: Summary prompt for evaluations, up to 4000 characters; null, blank, or a built-in default follows the workspace language

## Response `201`

Created

- object
  - `success` boolean, required
  - `id` string, required

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API key
- `404`: Agent not found

---

[API](https://skmtc.dev/mailly/apis/mailly-api.md) · [All operations](https://skmtc.dev/mailly/apis/mailly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailly/apis/mailly-api/revisions/1ceb29637301?raw)
