Skip to main content
POST
/
api
/
send_inbox_message
Send Message
curl --request POST \
  --url https://api.example.com/api/send_inbox_message \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "recipient": "<string>",
  "message": "<string>"
}
'
{
  "200": {},
  "400": {},
  "401": {},
  "404": {},
  "message": "<string>"
}
Sends a direct message from the authenticated user to a specified recipient.

Request

Headers

Authorization
string
required
User authentication token
Content-Type
string
default:"application/json"
Must be application/json

Body

recipient
string
required
Username of the message recipient
message
string
required
Message content to send

Response

message
string
Success message confirming the message was sent

Success Response

{
  "message": "message sent"
}

Status Codes

200
Success
Message sent successfully
400
Bad Request
Missing recipient or message in request body
{
  "error": "missing recipient or message"
}
401
Unauthorized
Invalid or missing authentication token
{
  "error": "invalid token , please re-login"
}
or
{
  "error": "unauthorized"
}
404
Not Found
Recipient user not found
{
  "erorr": "recipient not found"
}

Example

curl -X POST https://api.example.com/api/send_inbox_message \
  -H "Authorization: your-auth-token" \
  -H "Content-Type: application/json" \
  -d '{
    "recipient": "john_doe",
    "message": "Hello, how are you?"
  }'

Build docs developers (and LLMs) love