Create an agent profile
Create an agent profile with the Mailly email API for AI agents: POST /agents. Parameters, request body, responses and code samples.
mode is off / summarize / draft (auto opens after guardrail validation).
bearerAuthAuthorizationBearer <token>Mailly API key(Authorization: Bearer )
application/json- body
name?stringName, up to 100 characters
persona_prompt?stringPersona prompt, up to 8000 characters
mode?stringoff / summarize / draft
address_id?|Inbox address ID to bind; null leaves it unbound
allowed_senders?array<string>Sender allowlist, up to 100 entries
skills?array<>User-defined skills; an empty array deletes all skills
items <= 20summary_prompt?|Summary prompt for evaluations, up to 4000 characters; null, blank, or a built-in default follows the workspace language
[key: string]?unknownCreated
application/json- response
success*booleanid*string[key: string]?unknowncurl -X POST 'https://api.mailly.site/agents' \ -H 'Content-Type: application/json' \ -d '{ "property1": null, "property2": null}'{ "success": true, "id": "string", "property1": null, "property2": null}Approve and send a draft POST
Approve and send a draft with the Mailly email API for AI agents: POST /agents/runs/{id}/approve. Parameters, request body, responses and code samples.
Delete an agent (with its evaluation records) DELETE
Delete an agent (with its evaluation records) with the Mailly email API for AI agents: DELETE /agents/{id}. Parameters, request body, responses and code samples.