Update AI agent
/api/v1/ext/ai-agents/{id}
Change its prompt or configuration, or activate / pause it.
Send only what changes. config_metadata is merged into what the agent has: the keys you send replace those keys, the others are kept, and the nested config object is merged the same way. So { "config_metadata": { "tone": "Casual" } } changes the tone and nothing else. To clear a key, send it empty ("" or []).
status: "active" switches the agent on after the activation check (400 with what is missing); paused stops it answering. An active agent uses the new wording from its next message, in conversations already running too.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Agent id. |
| workspace_id | body | number | yes | A workspace of the installer. |
| name | body | string | no | Agent name, up to 255 characters. |
| role | body | string | no | What the agent is for. |
| persona | body | string | no | Who it speaks as, and how. |
| status | body | enum | no | active runs the activation check (an opening message, a goal, and what that goal needs). |
| config_metadata | body | object | no | The configuration — see the description above. |
Responses
| Status | When |
|---|---|
200 | OK |
400 | The activation check failed (the AI service's message says what is missing), or a bad value |
401 | Missing or invalid token |
403 | Missing scope |
404 | workspace_id does not exist or is not the installer's (same response for both) |
404 | The agent does not exist or is in another workspace |
Response schema
ai_agentobjectidstringAgent id.
a3f1c2d4-5b6e-4f70-8a91-b2c3d4e5f607namestringAgent name.
ReviverolestringWhat the agent is for — its job, in a sentence or two.
personastringWho it speaks as, and how.
statusstring`draft`, `active` (answering) or `paused`.
draftworkspace_idstringThe workspace it works in.
7config_metadataobjectThe whole configuration: model, tone, opening messages, follow-ups, qualifying questions, FAQs, goal and calendar. See Create AI agent.
created_atstring (ISO 8601)Created.
updated_atstring (ISO 8601)Last saved.
curl -X PATCH "https://backend.mysmsgateway.app/api/v1/ext/ai-agents/{id}" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 7,
"status": "active",
"config_metadata": {
"tone": "Casual"
}
}'{
"success": true,
"message": "AI agent updated",
"data": {
"id": "a3f1c2d4-5b6e-4f70-8a91-b2c3d4e5f607",
"name": "Revive",
"role": "Reactivate old leads for Harbour Dental and book them in for a check-up.",
"persona": "Sam, a friendly front-desk assistant at Harbour Dental. Short, warm messages.",
"status": "active",
"workspace_id": "7",
"config_metadata": {
"model": "gpt-4.1-mini",
"tone": "Casual",
"ghl_tag": "revive-2026",
"company_info": "Harbour Dental, Sydney. Check-ups, cleaning, whitening.",
"initial_messages": [
"Hi {{contact.first_name}}, it's Sam from Harbour Dental. It's been a while — would you like to book a check-up?"
],
"followUps": [
{
"text": "Just checking in, {{contact.first_name}} — any time suit you this week?",
"delay": {
"days": 2,
"hours": 0,
"minutes": 0
}
}
],
"qualification_enabled": true,
"questions": [
{
"id": "q1",
"text": "Is it a check-up or something hurting?"
}
],
"faqs": [
{
"question": "Do you take insurance?",
"answer": "Yes, all major funds."
}
],
"config": {
"end_goal": "Book Appointment",
"calendar_provider": "native",
"calendar_id": "12",
"calendar_ids": [
"12"
],
"disqualify_trigger": "Not interested or moved away"
}
},
"created_at": "2026-10-28T09:00:00.000Z",
"updated_at": "2026-10-28T09:00:00.000Z"
}
}Agent id.
« Create AI agent
Duplicate AI agent »
