domain_blocks

View and update domain blocks.

Fetch domain blocks

GET https://mastodon.example/api/v1/domain_blocks

View domains the user has blocked. Returns: Array of strings OAuth: User token + read:blocks or follow Version: 1.4.0 - added

Query Parameters

Name
Type
Description

max_id

string

Internal parameter. Use HTTP Link header from response for pagination.

since_id

string

Internal parameter. Use HTTP Link header from response for pagination.

limit

string

Maximum number of results to return per page. Defaults to 40. NOTE: Pagination is done with the Link header from the response.

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

Block a domain

POST https://mastodon.example/api/v1/domain_blocks

Block a domain to: - hide all public posts from it - hide all notifications from it - remove all followers from it - prevent following new users from it (but does not remove existing follows) Returns: n/a OAuth: User token + write:blocks or follow Version: 1.4.0 - added

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

Request Body

Name
Type
Description

domain

string

Domain to block.

{}

Unblock a domain

DELETE https://mastodon.example/api/v1/domain_blocks

Remove a domain block, if it exists in the user's array of blocked domains. Returns: n/a OAuth: User token + write:blocks or follow Version history: 1.4.0 - added

Headers

Name
Type
Description

Authorization

string

Bearer <user token>

Request Body

Name
Type
Description

domain

string

Domain to unblock.

{}

Last updated

Was this helpful?