Twitter/X Lists API
Endpoints related to retrieving, managing Lists
Endpoints related to retrieving, managing Lists
openapi: 3.0.0
info:
description: X API v2 available endpoints
version: '2.166'
title: X API v2 Account Activity Lists API
termsOfService: https://developer.x.com/en/developer-terms/agreement-and-policy.html
contact:
name: X Developers
url: https://developer.x.com/
license:
name: X Developer Agreement and Policy
url: https://developer.x.com/en/developer-terms/agreement-and-policy.html
servers:
- description: X API
url: https://api.x.com
tags:
- name: Lists
description: Endpoints related to retrieving, managing Lists
externalDocs:
description: Find out more
url: https://developer.twitter.com/en/docs/twitter-api/lists
paths:
/2/lists:
post:
security:
- OAuth2UserToken:
- list.read
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Create List
description: Creates a new List for the authenticated user.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/post-lists
operationId: createLists
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListCreateRequest'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListCreateResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/lists/{id}:
delete:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Delete List
description: Deletes a specific List owned by the authenticated user by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/delete-lists-id
operationId: deleteLists
parameters:
- name: id
in: path
description: The ID of the List to delete.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListDeleteResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
get:
security:
- BearerToken: []
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get List by ID
description: Retrieves details of a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-lookup/api-reference/get-lists-id
operationId: getListsById
parameters:
- name: id
in: path
description: The ID of the List.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
- $ref: '#/components/parameters/ListFieldsParameter'
- $ref: '#/components/parameters/ListExpansionsParameter'
- $ref: '#/components/parameters/UserFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2ListsIdResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
put:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Update List
description: Updates the details of a specific List owned by the authenticated user by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/put-lists-id
operationId: updateLists
parameters:
- name: id
in: path
description: The ID of the List to modify.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListUpdateRequest'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListUpdateResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/lists/{id}/followers:
get:
security:
- BearerToken: []
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get List followers
description: Retrieves a list of Users who follow a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-followers
operationId: getListsFollowers
parameters:
- name: id
in: path
description: The ID of the List.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
- name: max_results
in: query
description: The maximum number of results.
required: false
schema:
type: integer
minimum: 1
maximum: 100
format: int32
default: 100
style: form
- name: pagination_token
in: query
description: This parameter is used to get a specified 'page' of results.
required: false
schema:
$ref: '#/components/schemas/PaginationTokenLong'
style: form
- $ref: '#/components/parameters/UserFieldsParameter'
- $ref: '#/components/parameters/UserExpansionsParameter'
- $ref: '#/components/parameters/TweetFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2ListsIdFollowersResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/lists/{id}/members:
get:
security:
- BearerToken: []
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get List members
description: Retrieves a list of Users who are members of a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/get-users-id-list_memberships
operationId: getListsMembers
parameters:
- name: id
in: path
description: The ID of the List.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
- name: max_results
in: query
description: The maximum number of results.
required: false
schema:
type: integer
minimum: 1
maximum: 100
format: int32
default: 100
style: form
- name: pagination_token
in: query
description: This parameter is used to get a specified 'page' of results.
required: false
schema:
$ref: '#/components/schemas/PaginationTokenLong'
style: form
- $ref: '#/components/parameters/UserFieldsParameter'
- $ref: '#/components/parameters/UserExpansionsParameter'
- $ref: '#/components/parameters/TweetFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2ListsIdMembersResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
post:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Add List member
description: Adds a User to a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/post-lists-id-members
operationId: addListsMember
parameters:
- name: id
in: path
description: The ID of the List for which to add a member.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListAddUserRequest'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListMutateResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/lists/{id}/members/{user_id}:
delete:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Remove List member
description: Removes a User from a specific List by its ID and the User’s ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/delete-lists-id-members-user_id
operationId: removeListsMemberByUserId
parameters:
- name: id
in: path
description: The ID of the List to remove a member.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
- name: user_id
in: path
description: The ID of User that will be removed from the List.
required: true
schema:
$ref: '#/components/schemas/UserId'
style: simple
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListMutateResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/lists/{id}/tweets:
get:
security:
- BearerToken: []
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get List Posts
description: Retrieves a list of Posts associated with a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-tweets/api-reference/get-lists-id-tweets
operationId: getListsPosts
parameters:
- name: id
in: path
description: The ID of the List.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
- name: max_results
in: query
description: The maximum number of results.
required: false
schema:
type: integer
minimum: 1
maximum: 100
format: int32
default: 100
style: form
- name: pagination_token
in: query
description: This parameter is used to get the next 'page' of results.
required: false
schema:
$ref: '#/components/schemas/PaginationToken36'
style: form
- $ref: '#/components/parameters/TweetFieldsParameter'
- $ref: '#/components/parameters/TweetExpansionsParameter'
- $ref: '#/components/parameters/MediaFieldsParameter'
- $ref: '#/components/parameters/PollFieldsParameter'
- $ref: '#/components/parameters/UserFieldsParameter'
- $ref: '#/components/parameters/PlaceFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2ListsIdTweetsResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/users/{id}/followed_lists:
get:
security:
- BearerToken: []
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get followed Lists
description: Retrieves a list of Lists followed by a specific User by their ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/get-users-id-followed_lists
operationId: getUsersFollowedLists
parameters:
- name: id
in: path
description: The ID of the User to lookup.
required: true
example: '2244994945'
schema:
$ref: '#/components/schemas/UserId'
style: simple
- name: max_results
in: query
description: The maximum number of results.
required: false
schema:
type: integer
minimum: 1
maximum: 100
format: int32
default: 100
style: form
- name: pagination_token
in: query
description: This parameter is used to get a specified 'page' of results.
required: false
schema:
$ref: '#/components/schemas/PaginationTokenLong'
style: form
- $ref: '#/components/parameters/ListFieldsParameter'
- $ref: '#/components/parameters/ListExpansionsParameter'
- $ref: '#/components/parameters/UserFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2UsersIdFollowedListsResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
post:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Follow List
description: Causes the authenticated user to follow a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/post-users-id-followed-lists
operationId: followList
parameters:
- name: id
in: path
description: The ID of the authenticated source User that will follow the List.
required: true
schema:
$ref: '#/components/schemas/UserIdMatchesAuthenticatedUser'
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListFollowedRequest'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListFollowedResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/users/{id}/followed_lists/{list_id}:
delete:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Unfollow List
description: Causes the authenticated user to unfollow a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/delete-users-id-followed-lists-list_id
operationId: unfollowList
parameters:
- name: id
in: path
description: The ID of the authenticated source User that will unfollow the List.
required: true
schema:
$ref: '#/components/schemas/UserIdMatchesAuthenticatedUser'
style: simple
- name: list_id
in: path
description: The ID of the List to unfollow.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListFollowedResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/users/{id}/list_memberships:
get:
security:
- BearerToken: []
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get List memberships
description: Retrieves a list of Lists that a specific User is a member of by their ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/get-users-id-list_memberships
operationId: getUsersListMemberships
parameters:
- name: id
in: path
description: The ID of the User to lookup.
required: true
example: '2244994945'
schema:
$ref: '#/components/schemas/UserId'
style: simple
- name: max_results
in: query
description: The maximum number of results.
required: false
schema:
type: integer
minimum: 1
maximum: 100
format: int32
default: 100
style: form
- name: pagination_token
in: query
description: This parameter is used to get a specified 'page' of results.
required: false
schema:
$ref: '#/components/schemas/PaginationTokenLong'
style: form
- $ref: '#/components/parameters/ListFieldsParameter'
- $ref: '#/components/parameters/ListExpansionsParameter'
- $ref: '#/components/parameters/UserFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2UsersIdListMembershipsResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/users/{id}/owned_lists:
get:
security:
- BearerToken: []
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get owned Lists
description: Retrieves a list of Lists owned by a specific User by their ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/list-lookup/api-reference/get-users-id-owned_lists
operationId: getUsersOwnedLists
parameters:
- name: id
in: path
description: The ID of the User to lookup.
required: true
example: '2244994945'
schema:
$ref: '#/components/schemas/UserId'
style: simple
- name: max_results
in: query
description: The maximum number of results.
required: false
schema:
type: integer
minimum: 1
maximum: 100
format: int32
default: 100
style: form
- name: pagination_token
in: query
description: This parameter is used to get a specified 'page' of results.
required: false
schema:
$ref: '#/components/schemas/PaginationTokenLong'
style: form
- $ref: '#/components/parameters/ListFieldsParameter'
- $ref: '#/components/parameters/ListExpansionsParameter'
- $ref: '#/components/parameters/UserFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2UsersIdOwnedListsResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/users/{id}/pinned_lists:
get:
security:
- OAuth2UserToken:
- list.read
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Get pinned Lists
description: Retrieves a list of Lists pinned by the authenticated user.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/get-users-id-pinned_lists
operationId: getUsersPinnedLists
parameters:
- name: id
in: path
description: The ID of the authenticated source User for whom to return results.
required: true
schema:
$ref: '#/components/schemas/UserIdMatchesAuthenticatedUser'
style: simple
- $ref: '#/components/parameters/ListFieldsParameter'
- $ref: '#/components/parameters/ListExpansionsParameter'
- $ref: '#/components/parameters/UserFieldsParameter'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Get2UsersIdPinnedListsResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
post:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Pin List
description: Causes the authenticated user to pin a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/post-users-id-pinned-lists
operationId: pinList
parameters:
- name: id
in: path
description: The ID of the authenticated source User that will pin the List.
required: true
schema:
$ref: '#/components/schemas/UserIdMatchesAuthenticatedUser'
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListPinnedRequest'
required: true
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListPinnedResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/2/users/{id}/pinned_lists/{list_id}:
delete:
security:
- OAuth2UserToken:
- list.write
- tweet.read
- users.read
- UserToken: []
tags:
- Lists
summary: Unpin List
description: Causes the authenticated user to unpin a specific List by its ID.
externalDocs:
url: https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/delete-users-id-pinned-lists-list_id
operationId: unpinList
parameters:
- name: id
in: path
description: The ID of the authenticated source User for whom to return results.
required: true
schema:
$ref: '#/components/schemas/UserIdMatchesAuthenticatedUser'
style: simple
- name: list_id
in: path
description: The ID of the List to unpin.
required: true
schema:
$ref: '#/components/schemas/ListId'
style: simple
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ListUnpinResponse'
default:
description: The request has failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
components:
schemas:
HashtagEntity:
allOf:
- $ref: '#/components/schemas/EntityIndicesInclusiveExclusive'
- $ref: '#/components/schemas/HashtagFields'
Get2ListsIdTweetsResponse:
type: object
properties:
data:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Tweet'
errors:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Problem'
includes:
$ref: '#/components/schemas/Expansions'
meta:
type: object
properties:
next_token:
$ref: '#/components/schemas/NextToken'
previous_token:
$ref: '#/components/schemas/PreviousToken'
result_count:
$ref: '#/components/schemas/ResultCount'
PaginationToken36:
type: string
description: A base36 pagination token.
minLength: 1
User:
type: object
description: The X User object.
required:
- id
- name
- username
properties:
affiliation:
type: object
description: Metadata about a user's affiliation.
properties:
badge_url:
type: string
description: The badge URL corresponding to the affiliation.
format: uri
description:
type: string
description: The description of the affiliation.
url:
type: string
description: The URL, if available, to details about an affiliation.
format: uri
user_id:
type: array
minItems: 1
items:
$ref: '#/components/schemas/UserId'
connection_status:
type: array
description: Returns detailed information about the relationship between two users.
minItems: 0
items:
type: string
description: Type of connection between users.
enum:
- follow_request_received
- follow_request_sent
- blocking
- followed_by
- following
- muting
created_at:
type: string
description: Creation time of this User.
format: date-time
description:
type: string
description: The text of this User's profile description (also known as bio), if the User provided one.
entities:
type: object
description: A list of metadata found in the User's profile description.
properties:
description:
$ref: '#/components/schemas/FullTextEntities'
url:
type: object
description: Expanded details for the URL specified in the User's profile, with start and end indices.
properties:
urls:
type: array
minItems: 1
items:
$ref: '#/components/schemas/UrlEntity'
id:
$ref: '#/components/schemas/UserId'
location:
type: string
description: The location specified in the User's profile, if the User provided one. As this is a freeform value, it may not indicate a valid location, but it may be fuzzily evaluated when performing searches with location queries.
most_recent_tweet_id:
$ref: '#/components/schemas/TweetId'
name:
type: string
description: The friendly name of this User, as shown on their profile.
pinned_tweet_id:
$ref: '#/components/schemas/TweetId'
profile_banner_url:
type: string
description: The URL to the profile banner for this User.
format: uri
profile_image_url:
type: string
description: The URL to the profile image for this User.
format: uri
protected:
type: boolean
description: Indicates if this User has chosen to protect their Posts (in other words, if this User's Posts are private).
public_metrics:
type: object
description: A list of metrics for this User.
required:
- followers_count
- following_count
- tweet_count
- listed_count
properties:
followers_count:
type: integer
description: Number of Users who are following this User.
following_count:
type: integer
description: Number of Users this User is following.
like_count:
type: integer
description: The number of likes created by this User.
listed_count:
type: integer
description: The number of lists that include this User.
tweet_count:
type: integer
description: The number of Posts (including Retweets) posted by this User.
receives_your_dm:
type: boolean
description: Indicates if you
# --- truncated at 32 KB (82 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/twitter-x/refs/heads/main/openapi/twitter-x-lists-api-openapi.yml