lists
View and manage lists. See also: /api/v1/timelines/list/id for loading a list timeline.
Show user's lists
GET
https://mastodon.example/api/v1/lists
Fetch all lists that the user owns.
Returns: Array of List
OAuth: User token + read:lists
Version history:
2.1.0 - added
Headers
Authorization
string
Bearer <user token>
Show a single list
GET
https://mastodon.example/api/v1/lists/:id
Fetch the list with the given ID. Used for verifying the title of a list.
Returns: List
OAuth: User token + read:lists
Version history:
2.1.0 - added
Path Parameters
:id
string
ID of the list in the database
Headers
Authorization
string
Bearer <user token>
Create a list
POST
https://mastodon.example/api/v1/lists
Create a new list.
Returns: List
OAuth: User token + write:lists
Version history:
2.1.0 - added
Headers
Authorization
string
Bearer <user token>
Request Body
title
string
The title of the list to be created.
Update a list
PUT
https://mastodon.example/api/v1/lists/:id
Change the title of a list.
Returns: List
OAuth: User token + write:lists
Version history:
2.1.0 - added
Path Parameters
:id
string
ID of the list in the database
Headers
Authorization
string
Bearer <user token>
Request Body
title
string
The title of the list to be updated.
Delete a list
DELETE
https://mastodon.example/api/v1/lists/:id
Returns: empty object
OAuth: User token + write:lists
Version history:
2.1.0 - added
Path Parameters
:id
string
ID of the list in the database
Headers
Authorization
string
Bearer <user token>
Accounts in a list
View accounts in list
GET
https://mastodon.example/api/v1/lists/:id/accounts
Returns: Array of Account
OAuth: User token + read:lists
Version history:
2.1.0 - added
Path Parameters
:id
string
ID of the list in the database
Query Parameters
max_id
string
Internal parameter. Use HTTP Link header for pagination.
since_id
string
Internal parameter. Use HTTP Link header for pagination.
limit
number
Maximum number of results. Defaults to 40. Max 40. Set to 0 in order to get all accounts without pagination. Pagination is done with the HTTP Link header.
Headers
Authorization
string
Bearer <user token>
Add accounts to list
POST
https://mastodon.example/api/v1/lists/:id/accounts
Add accounts to the given list. Note that the user must be following these accounts.
Returns: empty object
OAuth: User token + write:lists
Version history:
2.1.0 - added
Path Parameters
:id
string
ID of the list in the database
Headers
Authorization
string
Bearer <user token>
Request Body
account_ids
array
Array of account IDs to add to the list.
Remove accounts from list
DELETE
https://mastodon.example/api/v1/lists/:id/accounts
Remove accounts from the given list.
Returns: empty object
OAuth: User token + write:lists
Version history:
2.1.0 - added
Path Parameters
:id
string
ID of the list in the database
Headers
Authorization
string
Bearer <user token>
Request Body
account_ids
array
Array of account IDs to remove from the list.
Last updated
Was this helpful?