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/775/messages
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNTA0Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzUzMjY2MjE0LCJleHAiOjE3NTU4NTgyMTQsImp0aSI6IjdhZGZhYzY4LTYyMGMtNDM4Ny04Y2FlLWRiNjA5MDc4ZDhjMiJ9.JZn3gNBEjaatp29quP9104Jrk54TzsDIE0kVycdQThs
Host: example.org
Cookie:
Body
{
"chat_id": 775,
"message": {
"text": "Optio ut consectetur beatae.",
"files": [
"eyJfcmFpbHMiOnsiZGF0YSI6MjUsInB1ciI6ImJsb2JfaWQifX0=--214988579d670eb95abd4fc4946986c564d6a79a"
]
}
}
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: 69a3c6b7-6a4a-443e-bac6-7d24afc167b1
x-runtime: 0.021515
content-length: 94
Body
{
"status": "Forbidden",
"message": "not allowed to message? this Chat",
"code": 403,
"backtrace": ""
}