POST /v1/agent-templates/{slug}/instantiate
const url = 'https://seu-endereco-da-api/v1/agent-templates/example/instantiate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"answers":{"additionalProperty":"example"},"profile":{"company":"example","niche":"example","valueProp":"example","serviceAreas":"example","tone":"example","products":"example","faqs":"example","reviewUrl":"https://example.com","address":"example"},"channelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","businessHoursConfigId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://seu-endereco-da-api/v1/agent-templates/example/instantiate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "answers": { "additionalProperty": "example" }, "profile": { "company": "example", "niche": "example", "valueProp": "example", "serviceAreas": "example", "tone": "example", "products": "example", "faqs": "example", "reviewUrl": "https://example.com", "address": "example" }, "channelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "businessHoursConfigId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Permissão que a Chave de acesso precisa: Gerenciar agentes de IA (agents:manage).
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”Request Bodyrequired
Seção intitulada “Request Bodyrequired”object
object
object
Example generated
{ "answers": { "additionalProperty": "example" }, "profile": { "company": "example", "niche": "example", "valueProp": "example", "serviceAreas": "example", "tone": "example", "products": "example", "faqs": "example", "reviewUrl": "https://example.com", "address": "example" }, "channelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "businessHoursConfigId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Seção intitulada “Responses”object
object
Active answers its channels; flows answers only when a flow block or another AI passes it the conversation, and never holds a channel; paused and draft answer no one (draft still answers its test phone)
Business hours the agent follows; null keeps the agent answering at any time
What the agent does outside the business hours: tell the customer the right hours, or stay silent
Subjects the owner forbids the agent to talk about, added on top of the fixed rules; empty keeps the agent as it always was
Consecutive turns without understanding before the agent hands off to a person; null never hands off for this reason
Seconds the agent waits after the customer’s last message before answering, so a burst of short messages gets one reply; null answers each message at once
True turns the customer’s audio into text before the agent answers, charged to the AI credit; false makes the agent ask the customer to write.
When the agent answers with a voice note generated from its reply, charged to the AI credit: never, only when the customer’s last message was audio, or always; replies with buttons or a list stay as text
Voice of the agent’s voice notes
object
Ready-made AI the agent was created from; null for an agent written by hand
object
Template version the agent follows
object
Key of the flow in the template, the flowKey of a flow_template_pending warning
Companion flows are created as drafts
object
Transfer_target_pending: the intent passes to another AI that is not created yet and turns on by itself when it is; flow_template_pending: the companion flow has no approved template for a closed 24-hour window yet; companion_draft: a companion the update created stayed in draft because its graph is invalid
object
Placeholder of the template, e.g. @pipeline:vendas, @stage:vendas/qualificado, @department:financeiro, @tag:quente, @sequence:reativar
Id the placeholder became in this account (the tag name for tags)
The template test questions played against the new agent with the agent test
object
Unanswered questions also went to the unanswered questions list
Example
{ "agent": { "status": "active", "outOfHours": "avisar", "voiceReply": "never", "voice": "alloy" }, "warnings": [ { "code": "charge_template_required" } ], "bindings": [ { "kind": "pipeline" } ], "tests": [ { "status": "answered" } ]}