Create message
Messages
POST message
Endpoint
POST /api/v1/chats/:chat_id/messages
Parameters
| Name | Description |
|---|---|
| message[text] | Message text |
| message[files] | Array of files signed ids |
Request
Route
POST /api/v1/chats/811/messages
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNTI0Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2NDAxLCJleHAiOjE3NjYyMTg0MDEsImp0aSI6ImI2ZDE3YWI3LTA0YTgtNGY4OS1iYzljLWFmOGJiY2JkYTNiYyJ9.Lx_vXGZG0VTRvKJ6U1nNXNp0F_jc8rtwjMlFSxVV0no
Host: example.org
Cookie:
Body
{
"chat_id": 811,
"message": {
"text": "Sunt molestias dolore et.",
"files": [
"eyJfcmFpbHMiOnsiZGF0YSI6MjUsInB1ciI6ImJsb2JfaWQifX0=--701f03b91322c932fe58855a3e15e5ecbc2b1c88"
]
}
}
Response
Simulated Response
Status
403
Headers
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
cache-control: no-cache
x-request-id: cfbdefa7-6de4-4255-91e8-f4f5e719ac3e
x-runtime: 0.030331
content-length: 94
Body
{
"status": "Forbidden",
"message": "not allowed to message? this Chat",
"code": 403,
"backtrace": ""
}