POST
/
v2
/
agent
/
{agentId}
/
add-message
curl --request POST \
  --url https://api.gptmaker.ai/v2/agent/{agentId}/add-message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contextId": "12345",
  "prompt": "oi você tem interesse no produto x?",
  "role": "<string>"
}'
{
  "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 mensagem a ser adicionada
contextId
string
required

ID externo para identificar o cliente

Example:

"12345"

prompt
string
required

Texto a ser salvo no contexto

Example:

"oi você tem interesse no produto x?"

role
string

define se é uma mensagem do usuário ou do agente, 'user' ou 'assistant' default: 'assistant'

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