Geek Social — Documentação
API ReferenceChat

POST /chat/conversations/{id}/messages

Enviar mensagem

POST/chat/conversations/{id}/messagesAuth: accessToken

INSERT message + emit socket message:new. Suporta texto, attachments (já uploadados), reply, e callMetadata.

Request

CampoTipoRequeridoDescrição
contentstringnão
attachmentIdsArray of string (uuid)não
replyToIdstring (uuid)não
callMetadataobjectnão

Response

200

Sem corpo na resposta.

Erros

Sem respostas de erro documentadas.

Exemplos

curl -X POST 'http://localhost:3003/chat/conversations/{id}/messages' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer SEU_ACCESS_TOKEN' \
  -d '{}'
await fetch('http://localhost:3003/chat/conversations/{id}/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer ' + accessToken,
  },
  body: JSON.stringify({}),
})

Side effects

Relacionados

On this page