Skip to content

Direct messages

GET/api/v1.1/direct/unread_count

Get unread counts

Pixelfed only User token Scope read

Returns

curl "https://pixelfed.social/api/v1.1/direct/unread_count" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "primary": 2,
  "requests": 1
}
GET/api/v1.1/direct/conversations

List conversations

Pixelfed only User token Scope read

Query parameters

filterstring

limitinteger

cursorstring

Returns

curl "https://pixelfed.social/api/v1.1/direct/conversations?filter=primary&limit=20" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "data": [{
    "id": "731902455120183296",
    "type": "dm",
    "name": null,
    "participants": [{
      "id": "412760184563377",
      "username": "jonas",
      "acct": "jonas",
      "display_name": "Jonas Berg",
      "locked": false,
      "url": "https://pixelfed.social/jonas",
      "avatar": "https://pixelfed.social/storage/avatars/412/760/jonas.jpg",
      "local": true
    }],
    "participant_count": 2,
    "state": "active",
    "unread_count": 1,
    "muted": false,
    "hidden": false,
    "last_read_message_id": "731902611844546560",
    "last_message": {
      "id": "731907388210487296",
      "conversation_id": "731902455120183296",
      "sender_id": "412760184563377",
      "is_author": false,
      "type": "text",
      "text": "Are you shooting the harbour again on Saturday?",
      "media": [],
      "meta": null,
      "sensitive": false,
      "in_reply_to_id": null,
      "edited_at": null,
      "created_at": "2026-10-16T19:04:22.000Z"
    },
    "created_at": "2026-10-14T08:12:09.000Z",
    "updated_at": "2026-10-16T19:04:22.000Z"
  }],
  "meta": {
    "filter": "primary",
    "next_cursor": "eyJsYXN0X2FjdGl2aXR5X2F0IjoiMjAyNi0xMC0xNCAwODoxMjowOSIsImlkIjo4ODIxLCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9",
    "prev_cursor": null
  }
}
POST/api/v1.1/direct/conversations

Start a conversation

Pixelfed only User token Scope write

Body parameters

recipient_idsarray of stringsrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "recipient_ids": ["412760184563377", "412760184563412"]
  }'
Response
{
  "id": "731911020536471552",
  "type": "group",
  "name": null,
  "participants": [{
    "id": "412760184563377",
    "username": "jonas",
    "acct": "jonas",
    "display_name": "Jonas Berg",
    "avatar": "https://pixelfed.social/storage/avatars/412/760/jonas.jpg",
    "local": true
  }, {
    "id": "412760184563412",
    "username": "ines",
    "acct": "ines",
    "display_name": "Ines Kask",
    "avatar": "https://pixelfed.social/storage/avatars/412/760/ines.jpg",
    "local": true
  }],
  "participant_count": 3,
  "state": "active",
  "unread_count": 0,
  "muted": false,
  "hidden": false,
  "last_read_message_id": null,
  "last_message": null,
  "created_at": "2026-10-17T09:30:51.000Z",
  "updated_at": "2026-10-17T09:30:51.000Z"
}
GET/api/v1.1/direct/conversations/{id}

Get a conversation

Pixelfed only User token Scope read

Path parameters

idstringrequired

Returns

curl "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "731902455120183296",
  "type": "dm",
  "name": null,
  "participants": [{
    "id": "412760184563377",
    "username": "jonas",
    "acct": "jonas",
    "display_name": "Jonas Berg",
    "avatar": "https://pixelfed.social/storage/avatars/412/760/jonas.jpg",
    "local": true
  }],
  "participant_count": 2,
  "state": "active",
  "unread_count": 1,
  "muted": false,
  "hidden": false,
  "last_read_message_id": "731902611844546560",
  "last_message": {
    "id": "731907388210487296",
    "sender_id": "412760184563377",
    "is_author": false,
    "type": "text",
    "text": "Are you shooting the harbour again on Saturday?",
    "created_at": "2026-10-16T19:04:22.000Z"
  },
  "created_at": "2026-10-14T08:12:09.000Z",
  "updated_at": "2026-10-16T19:04:22.000Z"
}
GET/api/v1.1/direct/conversations/{id}/messages

List messages

Pixelfed only User token Scope read

Path parameters

idstringrequired

Query parameters

limitinteger

max_idstring

min_idstring

Returns

curl "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/messages?limit=20" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "data": [{
    "id": "731907388210487296",
    "conversation_id": "731902455120183296",
    "sender_id": "412760184563377",
    "is_author": false,
    "type": "text",
    "text": "Are you shooting the harbour again on Saturday?",
    "media": [],
    "meta": null,
    "sensitive": false,
    "in_reply_to_id": null,
    "edited_at": null,
    "created_at": "2026-10-16T19:04:22.000Z"
  }, {
    "id": "731902611844546560",
    "conversation_id": "731902455120183296",
    "sender_id": "2",
    "is_author": true,
    "type": "photo",
    "text": "Fog came in right after this one",
    "media": [{
      "id": "731902598120783872",
      "type": "image",
      "url": "https://pixelfed.social/storage/m/_v2/2/fog.jpg",
      "preview_url": "https://pixelfed.social/storage/m/_v2/2/fog_thumb.jpg",
      "description": null,
      "mime": "image/jpeg",
      "blurhash": "U9C%8]of00WB~qj[M{ay4nof%Mj["
    }],
    "meta": null,
    "sensitive": false,
    "in_reply_to_id": null,
    "edited_at": null,
    "created_at": "2026-10-14T08:12:09.000Z"
  }],
  "meta": {
    "has_more": false,
    "newest_id": "731907388210487296",
    "oldest_id": "731902611844546560"
  }
}
POST/api/v1.1/direct/conversations/{id}/messages

Send a message

Pixelfed only User token Scope write

Path parameters

idstringrequired

Body parameters

messagestring

media_idsarray of strings

in_reply_to_idstring

sensitiveboolean

typestring

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/messages" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Yes, meet at the pier at 7?"
  }'
Response
{
  "id": "731911388741324800",
  "conversation_id": "731902455120183296",
  "sender_id": "2",
  "is_author": true,
  "type": "text",
  "text": "Yes, meet at the pier at 7?",
  "media": [],
  "meta": null,
  "sensitive": false,
  "in_reply_to_id": null,
  "edited_at": null,
  "created_at": "2026-10-17T09:32:18.000Z"
}
DELETE/api/v1.1/direct/conversations/{id}/messages/{messageId}

Delete a message

Pixelfed only User token Scope write

Path parameters

idstringrequired

messageIdstringrequired

Returns

curl -X DELETE "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/messages/731911388741324800" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "deleted": true
}
POST/api/v1.1/direct/conversations/{id}/read

Mark a conversation read

Pixelfed only User token Scope write

Path parameters

idstringrequired

Body parameters

message_idstring

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/read" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message_id": "731907388210487296"
  }'
Response
{
  "id": "731902455120183296",
  "state": "active",
  "unread_count": 0,
  "muted": false,
  "hidden": false,
  "last_read_message_id": "731907388210487296"
}
POST/api/v1.1/direct/conversations/{id}/accept

Accept a message request

Pixelfed only User token Scope write

Path parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/accept" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "731902455120183296",
  "state": "active",
  "unread_count": 1,
  "muted": false,
  "hidden": false,
  "last_read_message_id": null
}
POST/api/v1.1/direct/conversations/{id}/mute

Mute a conversation

Pixelfed only User token Scope write

Path parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/mute" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "731902455120183296",
  "state": "active",
  "unread_count": 0,
  "muted": true,
  "hidden": false,
  "last_read_message_id": "731907388210487296"
}
POST/api/v1.1/direct/conversations/{id}/unmute

Unmute a conversation

Pixelfed only User token Scope write

Path parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/unmute" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "731902455120183296",
  "state": "active",
  "unread_count": 0,
  "muted": false,
  "hidden": false,
  "last_read_message_id": "731907388210487296"
}
POST/api/v1.1/direct/conversations/{id}/hide

Hide a conversation

Pixelfed only User token Scope write

Path parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/hide" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "731902455120183296",
  "state": "active",
  "unread_count": 0,
  "muted": false,
  "hidden": true,
  "last_read_message_id": "731907388210487296"
}
POST/api/v1.1/direct/conversations/{id}/unhide

Unhide a conversation

Pixelfed only User token Scope write

Path parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731902455120183296/unhide" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "731902455120183296",
  "state": "active",
  "unread_count": 0,
  "muted": false,
  "hidden": false,
  "last_read_message_id": "731907388210487296"
}
POST/api/v1.1/direct/conversations/{id}/leave

Leave a group

Pixelfed only User token Scope write

Path parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/conversations/731911020536471552/leave" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "731911020536471552",
  "state": "left",
  "unread_count": 0,
  "muted": false,
  "hidden": false,
  "last_read_message_id": "731911388741324800"
}
GET/api/v1.1/direct/compose/mutuals

List mutuals to message

Pixelfed only User token

Query parameters

cursorinteger

Returns

curl "https://pixelfed.social/api/v1.1/direct/compose/mutuals" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "data": [{
    "id": "412760184563377",
    "username": "jonas",
    "acct": "jonas",
    "display_name": "Jonas Berg",
    "locked": false,
    "followers_count": 208,
    "following_count": 190,
    "url": "https://pixelfed.social/jonas",
    "avatar": "https://pixelfed.social/storage/avatars/412/760/jonas.jpg",
    "local": true
  }],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
POST/api/v1.1/direct/lookup

Look up a recipient

Pixelfed only Supports _pe User token

Query parameters

_peboolean

Body parameters

qstringrequired

remoteboolean

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/lookup" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "q": "jon"
  }'
Response
[{
  "local": true,
  "id": "412760184563377",
  "name": "jonas",
  "privacy": true,
  "avatar": "https://pixelfed.social/storage/avatars/412/760/jonas.jpg",
  "account": {
    "id": "412760184563377",
    "username": "jonas",
    "acct": "jonas",
    "display_name": "Jonas Berg",
    "url": "https://pixelfed.social/jonas",
    "avatar": "https://pixelfed.social/storage/avatars/412/760/jonas.jpg",
    "local": true
  }
}]
GET/api/v1.1/direct/thread

Get a 1:1 thread (legacy)

Pixelfed only User token

Query parameters

pidstringrequired

max_idstring

min_idstring

Returns

curl "https://pixelfed.social/api/v1.1/direct/thread?pid=412760184563377" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "412760184563377",
  "name": "Jonas Berg",
  "username": "jonas",
  "avatar": "https://pixelfed.social/storage/avatars/412/760/jonas.jpg",
  "url": "https://pixelfed.social/jonas",
  "muted": false,
  "isLocal": true,
  "domain": null,
  "created_at": "2020-05-19T11:02:44+00:00",
  "updated_at": "2026-10-01T16:20:05+00:00",
  "timeAgo": "6y",
  "lastMessage": "",
  "messages": [{
    "id": "731907388210487296",
    "hidden": false,
    "isAuthor": false,
    "type": "text",
    "text": "Are you shooting the harbour again on Saturday?",
    "media": null,
    "carousel": [],
    "created_at": "2026-10-16T19:04:22+00:00",
    "timeAgo": "14h ago",
    "seen": true,
    "reportId": "731907388210487296",
    "meta": null
  }],
  "conversation_id": "731902455120183296"
}
POST/api/v1.1/direct/thread/send

Send a 1:1 message (legacy)

Pixelfed only User token

Body parameters

to_idstringrequired

messagestringrequired

typestringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/thread/send" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to_id": "412760184563377",
    "message": "Yes, meet at the pier at 7?",
    "type": "text"
  }'
Response
{
  "id": "731911388741324800",
  "hidden": false,
  "isAuthor": true,
  "type": "text",
  "text": "Yes, meet at the pier at 7?",
  "media": null,
  "carousel": [],
  "created_at": "2026-10-17T09:32:18+00:00",
  "timeAgo": "1s ago",
  "seen": false,
  "reportId": "731911388741324800",
  "meta": null
}
POST/api/v1.1/direct/thread/media

Send a photo or video (legacy)

Pixelfed only User token

Body parameters

filefilerequired

to_idstringrequired

messagestring

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/thread/media" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@fog.jpg" \
  -F "to_id=412760184563377"
Response
{
  "id": "731902611844546560",
  "reportId": "731902611844546560",
  "type": "photo",
  "url": "https://pixelfed.social/storage/m/_v2/2/fog.jpg"
}
POST/api/v1.1/direct/thread/read

Mark a 1:1 thread read (legacy)

Pixelfed only User token

Body parameters

pidstringrequired

sidstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/thread/read" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "pid": "412760184563377",
    "sid": "731907388210487296"
  }'
Response
["731907388210487296"]
DELETE/api/v1.1/direct/thread/message

Delete a message (legacy)

Pixelfed only User token

Body parameters

idstringrequired

Returns

curl -X DELETE "https://pixelfed.social/api/v1.1/direct/thread/message" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "731911388741324800"
  }'
Response
[200]
POST/api/v1.1/direct/thread/mute

Mute a 1:1 thread (legacy)

Pixelfed only User token

Body parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/thread/mute" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "412760184563377"
  }'
Response
[200]
POST/api/v1.1/direct/thread/unmute

Unmute a 1:1 thread (legacy)

Pixelfed only User token

Body parameters

idstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/direct/thread/unmute" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "412760184563377"
  }'
Response
[200]
Pixelfed is free and open source software. Edit this page Report a docs issue