filters
Create and manage filters.
View all filters
GET
https://mastodon.example/api/v1/filters
Returns: Filter
OAuth: User token + read:filters
Version history:
2.4.3 - added
Headers
Authorization
string
Bearer <user token>
View a single filter
GET
https://mastodon.example/api/v1/filters/:id
Returns: Filter
OAuth: User token + read:filters
Version history:
2.4.3 - added
Path Parameters
:id
string
Headers
Authorization
string
Bearer <user token>
Create a filter
POST
https://mastodon.example/api/v1/filters
Returns: Filter
OAuth: User token + write:filters
Version history:
2.4.3 - added
Headers
Authorization
string
Bearer <user token>
Request Body
phrase
string
Text to be filtered
context
array
Array of enumerable strings home
, notifications
, public
, thread
. At least one context must be specified.
irreversible
boolean
Should the server irreversibly drop matching entities from home and notifications?
whole_word
boolean
Consider word boundaries?
expires_in
string
ISO 8601 Datetime for when the filter expires. Otherwise, null for a filter that doesn't expire.
Update a filter
PUT
https://mastodon.example/api/v1/filters/:id
Returns: Filter
OAuth: User token + write:filters
Version history:
2.4.3 - added
Path Parameters
id
string
ID of the filter in the database
Headers
Authorization
string
Bearer <user token>
Request Body
phrase
string
Text to be filtered
context
array
Array of enumerable strings home
, notifications
, public
, thread
. At least one context must be specified.
irreversible
boolean
Should the server irreversibly drop matching entities from home and notifications?
whole_word
boolean
Consider word boundaries?
expires_in
string
ISO 8601 Datetime for when the filter expires. Otherwise, null for a filter that doesn't expire.
Remove a filter
DELETE
https://mastodon.example/api/v1/filters/:id
Returns: Filter
OAuth: User token + write:filters
Version history:
2.4.3 - added
Path Parameters
id
string
ID of the filter in the database
Headers
Authorization
string
Bearer <user token>
Last updated
Was this helpful?