Overview
The Messaging API enables direct and group conversations between BeatPass users. It supports real-time features including typing indicators and read receipts.Base URL:
https://open.beatpass.ca/api/v1/messagingAuthentication: All messaging endpoints require a valid Bearer token.Conversations
List Conversations
Retrieve the authenticated user’s conversations, ordered by most recent activity.Number of conversations to return. Default:
20.Start Conversation
Start a new direct or group conversation with an initial message.Direct Message
Recipient user ID for a direct message.
Initial message text. Max 2,000 characters.
Group Conversation
Array of user IDs for a group conversation. At least 2 recipients required (3 participants total including the sender).
Optional group conversation title. Max 255 characters.
Initial message text. Max 2,000 characters.
Provide either
user_id (direct) or user_ids (group), not both. You cannot start a conversation with yourself.Delete Conversation
Remove a conversation from the authenticated user’s view. This does not delete it for other participants.Messages
Get Messages
Retrieve messages for a specific conversation. Only accessible to conversation participants.Conversation ID.
Number of messages. Default:
50.Offset for pagination. Default:
0.Get Messages with Read Receipts
Same as above but includes per-message read receipt data.Send Message
Send a message to an existing conversation.Target conversation ID.
Message content. Max 2,000 characters.
Read Status
Mark Conversation as Read
Mark all messages in a conversation as read for the authenticated user.Mark Single Message as Read
Mark an individual message as read. Used for granular read receipts.Mark Conversation as Unread
Mark a conversation as unread (useful for reminders).Get Unread Count
Get the total unread message count across all conversations.Typing Indicators
Set Typing Status
Notify participants that the authenticated user is typing.Get Typing Status
Check who is currently typing in a conversation.Typing indicators are delivered in real-time. The REST endpoints provide fallback support.
User Discovery
Search Users
Search for users to start a conversation with.Get Followed Users
Get the authenticated user’s followed users for quick messaging.Integration Example
Validation Rules
| Field | Rule |
|---|---|
message_text | Required, string, max 2,000 characters |
user_id | Must exist in users table |
user_ids | Array, min 2 participants for groups |
title | Optional, max 255 characters |