Projekty
APIChat

Send chat message

Sends a message to a conversation the user participates in and notifies the recipient.

POST
/api/chat/{id}/messages

Sends a message to a conversation the user participates in and notifies the recipient.

Authorization

sessionAuth
cookiebetter-auth.session_token<token>

Better Auth session cookie (on HTTPS: __Secure-better-auth.session_token), forwarded to the login server's /api/auth/get-session

Path Parameters

id*string

Request Body

application/json
  1. body
content*string
Length1 <= length <= 2000

Response Body

OK

application/json
  1. response
success*boolean
id*string
Example Request
curl -X POST 'https://example.com/api/chat/string/messages' \  -H 'Content-Type: application/json' \  -d '{  "content": "string"}'
Example Response
{  "success": true,  "id": "string"}