POST
/
v2
/
agent
/
{agentId}
/
conversation
curl --request POST \
  --url https://api.gptmaker.ai/v2/agent/{agentId}/conversation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contextId": "12345",
  "prompt": "oi qual seu nome?",
  "callbackUrl": "https://webhook.site",
  "chatName": "Fulano",
  "chatPicture": "https://foto.jpeg",
  "phone": "55xxxxxxxx"
}'
{
  "message": "<string>",
  "images": [
    "<string>"
  ],
  "audios": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

ID do agente

Body

application/json
Dados para conversar com o agente
contextId
string
required

ID externo para identificar o cliente

Example:

"12345"

prompt
string
required

Texto para o agente responder

Example:

"oi qual seu nome?"

callbackUrl
string

Caso seja informado, a chamada será assíncrona, quando o agente responder, ele vai chamar esse webhook com a resposta.

Example:

"https://webhook.site"

chatName
string

Você pode informar o nome do cliente caso já possua.

Example:

"Fulano"

chatPicture
string

Uma foto do cliente que será mostrada no chat de atendimento.

Example:

"https://foto.jpeg"

phone
string

Número de whatsapp do cliente.

Example:

"55xxxxxxxx"

Response

200
application/json
Resposta do agente
message
string

Resposta do agente

images
string[]

URLs das imagens respondidas pelo agente

audios
string[]

URLs dos áudios respondidos pelo agente