Skip to main content
POST
/
api
/
delete_inbox_message
Delete Message
curl --request POST \
  --url https://api.example.com/api/delete_inbox_message \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message_id": 123
}
'
{
  "200": {},
  "400": {},
  "401": {},
  "404": {},
  "message": "<string>"
}
Deletes a direct message. Users can only delete messages where they are either the sender or recipient.

Request

Headers

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

Body

message_id
integer
required
ID of the message to delete

Response

message
string
Success message confirming the message was deleted

Success Response

{
  "message": "message deleted successfully"
}

Status Codes

200
Success
Message deleted successfully
400
Bad Request
Missing message ID in request body
{
  "error": "missing message ID"
}
401
Unauthorized
Invalid or missing authentication token
{
  "error": "invalid token, please re-login"
}
or
{
  "error": "unauthorized"
}
404
Not Found
Message not found or user is not authorized to delete it
{
  "error": "message not found or unauthorized access"
}

Example

curl -X POST https://api.example.com/api/delete_inbox_message \
  -H "Authorization: your-auth-token" \
  -H "Content-Type: application/json" \
  -d '{
    "message_id": 123
  }'

Build docs developers (and LLMs) love