GET /v1/agent-templates/{slug}/setup
const url = 'https://seu-endereco-da-api/v1/agent-templates/example/setup';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://seu-endereco-da-api/v1/agent-templates/example/setup \ --header 'Authorization: Bearer <token>'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”Responses
Seção intitulada “Responses”object
object
The account has no profile and the reading of the site and of the WhatsApp Business profile filled the items
Reading of the site and of the WhatsApp Business profile for an account without profile; null when the account has a profile
object
Pending: keep polling GET /agent-templates/:slug/setup; failed also after 90 seconds without an answer
Step 1, Confira o que já sabemos
object
Where the value came from; default is the template’s answer used because the question did not fit in the three of step 2
Where a correction goes on instantiate: accountProfile.
Id of what the value names (channel, business hours, pipeline, stage, department, service or template), so the screen never matches by name; null for text
What the owner can switch the item to; the chosen value goes in answers under key (businessHoursConfigId for business hours)
object
Suggested answers of a template question shown here because it did not fit in step 2
Only on the channel item: the active agent of AI that already serves the channel; turning the new agent on with replaceOnChannels pauses it
object
Only on the company item: the name is empty or looks like a person’s name, so the owner is asked to confirm it
Step 2, Só falta isso: at most 3
object
Send the answer under this key in instantiate.answers
Template: a question of the template; account: something of the account a template action needs (funnel, stage, department)
Suggested answers for the account business type
Choices for account and choice questions; @create creates the department or the loss reason, @later leaves the template for later, @all keeps every service
object
Used when the owner skips (Pular e usar o padrão)
Free text (Outro) is accepted
object
Stable key of the screen where the owner connects it
Nothing to ask and no required connection missing: the wizard can go straight to the test
Example
{ "businessType": "loja", "reading": { "status": "pending" }, "known": [ { "origin": "account_profile", "kind": "text", "attention": "empty" } ], "questions": [ { "source": "template", "kind": "text" } ]}