Skip to content

Blocks, mutes & filters

GET/api/v1/blocks

List blocked accounts

Mastodon compatible User token Scope read

Query parameters

limitinteger

pageinteger

Returns

curl "https://pixelfed.social/api/v1/blocks?limit=40" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
[{
  "id": "412760184563377",
  "username": "jonas",
  "acct": "jonas",
  "display_name": "Jonas",
  "discoverable": true,
  "locked": false,
  "followers_count": 88,
  "following_count": 140,
  "statuses_count": 37,
  "note": "",
  "note_text": null,
  "url": "https://pixelfed.social/jonas",
  "avatar": "https://pixelfed.social/storage/avatars/412/760/377/avatar.jpg",
  "website": null,
  "local": true,
  "is_admin": false,
  "created_at": "2025-01-19T10:12:40.000000Z",
  "header_bg": null,
  "last_fetched_at": null,
  "pronouns": [],
  "location": null,
  "has_story": false
}]
GET/api/v1/mutes

List muted accounts

Mastodon compatible User token Scope read

Query parameters

limitinteger

pageinteger

Returns

curl "https://pixelfed.social/api/v1/mutes?limit=40" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
[{
  "id": "412760184563377",
  "username": "jonas",
  "acct": "jonas",
  "display_name": "Jonas",
  "locked": false,
  "followers_count": 88,
  "following_count": 140,
  "statuses_count": 37,
  "url": "https://pixelfed.social/jonas",
  "avatar": "https://pixelfed.social/storage/avatars/412/760/377/avatar.jpg",
  "local": true,
  "created_at": "2025-01-19T10:12:40.000000Z"
}]
GET/api/v1/domain_blocks

List blocked domains

Mastodon compatible User token

Query parameters

limitinteger

cursorstring

Returns

curl "https://pixelfed.social/api/v1/domain_blocks?limit=100" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
["spam.example", "ads.example"]
POST/api/v1/domain_blocks

Block a domain

Mastodon compatible User token

Body parameters

domainstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1/domain_blocks" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "https://spam.example"
  }'
Response
[]
DELETE/api/v1/domain_blocks

Unblock a domain

Mastodon compatible User token

Body parameters

domainstringrequired

Returns

curl -X DELETE "https://pixelfed.social/api/v1/domain_blocks" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "spam.example"
  }'
Response
[]
GET/api/v1/filters

List filters (v1)

Mastodon compatible User token Scope read

Returns

curl "https://pixelfed.social/api/v1/filters" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
[]
GET/api/v2/filters

List filters

Mastodon compatible User token Scope read

Returns

curl "https://pixelfed.social/api/v2/filters" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
[{
  "id": "29",
  "title": "Spoilers",
  "context": ["home", "public"],
  "expires_at": null,
  "filter_action": "warn",
  "keywords": [{
    "id": 71,
    "keyword": "season finale",
    "whole_word": true
  }],
  "statuses": []
}]
GET/api/v2/filters/{id}

Get a filter

Mastodon compatible User token Scope read

Path parameters

idstringrequired

Returns

curl "https://pixelfed.social/api/v2/filters/29" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "id": "29",
  "title": "Spoilers",
  "context": ["home", "public"],
  "expires_at": null,
  "filter_action": "warn",
  "keywords": [{
    "id": 71,
    "keyword": "season finale",
    "whole_word": true
  }],
  "statuses": []
}
POST/api/v2/filters

Create a filter

Mastodon compatible User token Scope write

Body parameters

titlestringrequired

context[]array of stringsrequired

filter_actionstring

expires_ininteger

keywords_attributes[][keyword]stringrequired

keywords_attributes[][whole_word]boolean

Returns

curl -X POST "https://pixelfed.social/api/v2/filters" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Spoilers",
    "context": ["home", "public"],
    "filter_action": "warn",
    "keywords_attributes": [{
      "keyword": "season finale",
      "whole_word": true
    }]
  }'
Response
{
  "id": "29",
  "title": "Spoilers",
  "context": ["home", "public"],
  "expires_at": null,
  "filter_action": "warn",
  "keywords": [{
    "id": 71,
    "keyword": "season finale",
    "whole_word": true
  }],
  "statuses": []
}
PUT/api/v2/filters/{id}

Update a filter

Mastodon compatible User token Scope write

Path parameters

idstringrequired

Body parameters

titlestring

context[]array of strings

filter_actionstring

expires_ininteger

keywords_attributes[][id]integer

keywords_attributes[][keyword]stringrequired

keywords_attributes[][whole_word]boolean

keywords_attributes[][_destroy]boolean

Returns

curl -X PUT "https://pixelfed.social/api/v2/filters/29" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "filter_action": "hide",
    "keywords_attributes": [{
      "id": 71,
      "_destroy": true
    }, {
      "keyword": "finale"
    }]
  }'
Response
{
  "id": "29",
  "title": "Spoilers",
  "context": ["home", "public"],
  "expires_at": null,
  "filter_action": "hide",
  "keywords": [{
    "id": 74,
    "keyword": "finale",
    "whole_word": true
  }],
  "statuses": []
}
DELETE/api/v2/filters/{id}

Delete a filter

Mastodon compatible User token Scope write

Path parameters

idstringrequired

Returns

curl -X DELETE "https://pixelfed.social/api/v2/filters/29" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{}
POST/api/v1.1/report

Report content

Pixelfed only User token Scope write

Body parameters

object_typestringrequired

object_idstringrequired

report_typestringrequired

messagestring

Returns

curl -X POST "https://pixelfed.social/api/v1.1/report" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "object_type": "post",
    "object_id": "728355012774117376",
    "report_type": "spam",
    "message": "Same link posted under every hashtag"
  }'
Response
{
  "msg": "Successfully sent report",
  "code": 200
}
Pixelfed is free and open source software. Edit this page Report a docs issue