Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Deletes a message from a conversation. Users can only delete their own messages, and only if it’s the last message in the conversation.

URL Parameters

community_id
string
required
The unique identifier of the community
id
string
required
The unique identifier of the message to delete

Returns

Returns a success message if the message was deleted successfully.
curl -X DELETE https://api.onlydrams.app/api/v1/communities/abc123-def456/messages/msg-uuid \
     -H "Authorization: Bearer $ACCESS_TOKEN"
{
  "message": "Message deleted successfully"
}

Error Responses

403 Forbidden
object
Returned when:
  • The user is not the sender of the message
  • The message is not the last message in the conversation
  • The user doesn’t have permission to access the message
ERROR
{
  "message": "You can only delete the last message in a conversation"
}

Notes

  • Authorization: User must be the sender of the message
  • Deletion Rules:
    • Users can only delete their own messages
    • Only the last message in a conversation can be deleted
    • When the last message is deleted, the entire conversation disappears from both users’ conversation lists
  • Conversation Cleanup: If deleting the last message leaves the conversation empty, the conversation is effectively removed
  • Historical Messages: Older messages cannot be deleted unless they become the last message