Pular para o conteúdo

POST /v1/conversations/{id}/ai-goals

POST
/v1/conversations/{id}/ai-goals
curl --request POST \
--url https://seu-endereco-da-api/v1/conversations/example/ai-goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "agentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "agendar", "objective": "example", "limits": { "maxMessages": 1, "deadlineAt": "example", "remindAfterMinutes": 1, "returnAfterMinutes": 1, "maxDiscountPct": 1, "maxChargeCents": 1 }, "notifyOnFinish": true, "noteOnFinish": true, "resolveOnComplete": true, "shortcutId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "allowedActions": [ "agenda" ] }'

Permissão que a Chave de acesso precisa: Pode passar conversa para a IA (ai-goals:start).

id
required
string
Media typeapplication/json
object
agentId
required
string format: uuid
kind
required
string
Allowed values: agendar fechar_venda cobrar recuperar_carrinho coletar_dados livre
objective
required
string
>= 1 characters <= 2000 characters
limits
required
object
maxMessages
required
number
>= 1 <= 200
deadlineAt
string
nullable
remindAfterMinutes
number
nullable >= 1 <= 43200
returnAfterMinutes
number
nullable >= 1 <= 43200
maxDiscountPct
number
nullable <= 100
maxChargeCents
number
nullable <= 2147483647
notifyOnFinish
boolean
noteOnFinish
boolean
resolveOnComplete
boolean
shortcutId
string format: uuid
allowedActions
Array<string>
Allowed values: agenda mover_etapa criar_tarefa etiquetar nota cobrar desconto

The goal, already conducting

Ai_credits_exhausted

Ai_goal_over_role_ceiling

Ai_goal_active or conversation_resolved

Ai_goal_agent_unavailable