Skip to content

Send a DM to a peer

POST
/account/messages/{peer_ref}

Send a DM to the user at {peer_ref}. Self-DM rejected with 400. A block edge in either direction rejects with 403 — the same gate the FollowUser path enforces.

On success, a direct_message_received notification fires to the recipient via the notifications writer (which independently re-runs the block + channel-pref gates, so a user who muted the verb still gets the DM in their inbox but no bell ping).

peer_ref
required
integer format: int64
object
body
required
string
>= 1 characters <= 5000 characters

Message sent.

One DM between two users.

object
id
required
string format: uuid
sender_user_ref
required
integer format: int64
recipient_user_ref
required
integer format: int64
body
required
string
sent_at
required
string format: date-time
read_at

NULL = unread by recipient.

string format: date-time
nullable

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

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"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed