Easymailing
A I agents

Archive an AI agent

POST /ai_agents/{uuid}/actions/archive

POST/ai_agents/{uuid}/actions/archive

Retires an agent: it disappears from the selector of the automation step, it cannot change and it cannot be asked. Its versions and what it spent stay. Archiving an agent that is already archived changes nothing.

When to use: When an agent is no longer wanted. Check used_in in get_ai_agent first.

When not to use: To stop using an agent for a while, change access or just leave it. To replace it, create or improve another one and move the automations in Easymailing before archiving. There is no way to undo it through the API.

Side effects: THE AUTOMATIONS THAT USE THE AGENT STOP: every execution that reaches an «AI agent» step with this agent is blocked with the cause agent_unavailable until someone changes the step or the agent is restored in Easymailing. Runs started with run_ai_agent that are still going are not interrupted. Nothing is deleted and nothing is charged.

Permissions: Requires the automations.manage capability. It also needs AI in the plan (maia.access). The account must also have CRM Pro. When Maia asks, the person confirms it first in the chat.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

uuid*string

UUID of the agent.

Formatuuid

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/ai_agents/6e2f0a97-4b1c-4d35-9a8e-2c7d5f1b3e40/actions/archive" \  -H "X-Auth-Token: YOUR_API_KEY"
{  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "name": "string",  "description": "string",  "icon": "string",  "status": "draft",  "published_version": 1,  "unpublished_changes": true,  "access": "team",  "period_cap": {},  "tool_types": [    "string"  ],  "draft": {},  "published": {},  "used_in": 0,  "spent_last_30_days": {},  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",  "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "archived_at": "2019-08-24T14:15:22Z"}