Skip to content

My DM inbox — one entry per peer

GET
/account/messages

Lists every peer the caller has exchanged DMs with, paired with the most recent message in that thread + the count of unread messages from that peer. Newest-first. Wires the envelope-icon dropdown + the /account/messages full inbox.

limit
integer
default: 50 >= 1 <= 200

List of threads.

object
threads
required
Array<object>

Inbox row — one per peer the caller has DM’d. Denormalized peer identity + the most recent message excerpt + this peer’s unread count so the inbox renders without N+1 round-trips.

object
peer_user_ref
required
integer format: int64
peer_username
required
string
peer_display_name
string
nullable
peer_avatar_url
string
nullable
last_message_id
required
string format: uuid
last_sender_user_ref
required

Which side authored the most recent message in this thread. Lets the inbox card render “You: …” vs “PeerName: …” prefixes.

integer format: int64
last_body
required
string
last_sent_at
required
string format: date-time
last_read_at
string format: date-time
nullable
unread_count
required

Count of unread messages from this peer in this thread. Sum across all threads matches the envelope-pill total.

integer format: int64

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}