Pular para o conteúdo

GET /v1/agent-templates/{slug}/setup

GET
/v1/agent-templates/{slug}/setup
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).

slug
required
string
Media typeapplication/json
object
template
required
object
slug
required
string
name
required
string
version
required
number
businessType
required
string
Allowed values: loja agendamento restaurante imobiliaria educacao b2b generico
readAccountNow
required

The account has no profile and the reading of the site and of the WhatsApp Business profile filled the items

boolean
reading
required

Reading of the site and of the WhatsApp Business profile for an account without profile; null when the account has a profile

object
status
required

Pending: keep polling GET /agent-templates/:slug/setup; failed also after 90 seconds without an answer

string
Allowed values: pending ready failed
startedAt
required
string format: date-time
finishedAt
required
string format: date-time
nullable
known
required

Step 1, Confira o que já sabemos

Array<object>
object
key
required
string
label
required
string
value
required
string
origin
required

Where the value came from; default is the template’s answer used because the question did not fit in the three of step 2

string
Allowed values: account_profile site whatsapp_profile business_hours template_default catalog calendar history only_option name_match answer created_on_demand template_definition default
target
required

Where a correction goes on instantiate: accountProfile. (profile), channelId, businessHoursConfigId, a placeholder token or a question key (answers); null is informative

string
nullable
id
required

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

string format: uuid
nullable
kind
required
string
Allowed values: text choice pipeline stage department tag sequence template loss_reason service payment_template business_hours channel info
options
required

What the owner can switch the item to; the chosen value goes in answers under key (businessHoursConfigId for business hours)

Array<object>
object
value
required
string
label
required
string
suggestions
required

Suggested answers of a template question shown here because it did not fit in step 2

Array<string>
servedBy

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
agentId
required
string format: uuid
agentName
required
string
attention

Only on the company item: the name is empty or looks like a person’s name, so the owner is asked to confirm it

string
Allowed values: empty looks_like_person
questions
required

Step 2, Só falta isso: at most 3

Array<object>
object
key
required

Send the answer under this key in instantiate.answers

string
label
required
string
source
required

Template: a question of the template; account: something of the account a template action needs (funnel, stage, department)

string
Allowed values: template account
kind
required
string
Allowed values: text choice pipeline stage department template loss_reason service tag payment_template
target
required
string
nullable
suggestions
required

Suggested answers for the account business type

Array<string>
options
required

Choices for account and choice questions; @create creates the department or the loss reason, @later leaves the template for later, @all keeps every service

Array<object>
object
value
required
string
label
required
string
default
required

Used when the owner skips (Pular e usar o padrão)

string
allowOther
required

Free text (Outro) is accepted

boolean
connections
required
Array<object>
object
key
required
string
label
required
string
optional
required
boolean
connectTarget
required

Stable key of the screen where the owner connects it

string
readyToTest
required

Nothing to ask and no required connection missing: the wizard can go straight to the test

boolean

Example

{
"businessType": "loja",
"reading": {
"status": "pending"
},
"known": [
{
"origin": "account_profile",
"kind": "text",
"attention": "empty"
}
],
"questions": [
{
"source": "template",
"kind": "text"
}
]
}