Query structured spec data via REST or MCP. Get exactly what your agent needs.
https://api.twitter.com
/2/users/{id}/bookmarks/{tweet_id}
Removes a Tweet from the requesting User’s bookmarked Tweets.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the authenticated source User whose bookmark is to be removed. |
|
| tweet_id | path | required | The ID of the Tweet that the source User is removing from bookmarks. |
The request has failed.
The request has succeeded.
DELETE /2/users/{id}/bookmarks/{tweet_id}
/2/lists/{id}
Delete a List that you own.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the List to delete. |
The request has failed.
The request has succeeded.
DELETE /2/lists/{id}
/2/lists/{id}/members/{user_id}
Causes a User to be removed from the members of a List.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the List to remove a member. |
|
| user_id | path | required | The ID of User that will be removed from the List. |
The request has failed.
The request has succeeded.
DELETE /2/lists/{id}/members/{user_id}
/2/users/{id}/followed_lists/{list_id}
Causes a User to unfollow a List.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the authenticated source User that will unfollow the List. |
|
| list_id | path | required | The ID of the List to unfollow. |
The request has failed.
The request has succeeded.
DELETE /2/users/{id}/followed_lists/{list_id}
/2/users/{id}/pinned_lists/{list_id}
Causes a User to remove a pinned List.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the authenticated source User for whom to return results. |
|
| list_id | path | required | The ID of the List to unpin. |
The request has failed.
The request has succeeded.
DELETE /2/users/{id}/pinned_lists/{list_id}
/2/tweets/{id}
Delete specified Tweet (in the path) by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the Tweet to be deleted. |
The request has failed.
The request has succeeded.
DELETE /2/tweets/{id}
/2/users/{id}/likes/{tweet_id}
Causes the User (in the path) to unlike the specified Tweet. The User must match the User context authorizing the request
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the authenticated source User that is requesting to unlike the Tweet. |
|
| tweet_id | path | required | The ID of the Tweet that the User is requesting to unlike. |
The request has failed.
The request has succeeded.
DELETE /2/users/{id}/likes/{tweet_id}
/2/users/{id}/retweets/{source_tweet_id}
Causes the User (in the path) to unretweet the specified Tweet. The User must match the User context authorizing the request
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | The ID of the authenticated source User that is requesting to retweet the Tweet. |
|
| source_tweet_id | path | required | The ID of the Tweet that the User is requesting to unretweet. |
The request has failed.
The request has succeeded.
DELETE /2/users/{id}/retweets/{source_tweet_id}
/2/users/{source_user_id}/blocking/{target_user_id}
Causes the source User to unblock the target User. The source User must match the User context authorizing the request
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source_user_id | path | required | The ID of the authenticated source User that is requesting to unblock the target User. |
|
| target_user_id | path | required | The ID of the User that the source User is requesting to unblock. |
The request has failed.
The request has succeeded.
DELETE /2/users/{source_user_id}/blocking/{target_user_id}
/2/users/{source_user_id}/following/{target_user_id}
Causes the source User to unfollow the target User. The source User must match the User context authorizing the request
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source_user_id | path | required | The ID of the authenticated source User that is requesting to unfollow the target User. |
|
| target_user_id | path | required | The ID of the User that the source User is requesting to unfollow. |
The request has failed.
The request has succeeded.
DELETE /2/users/{source_user_id}/following/{target_user_id}
/2/users/{source_user_id}/muting/{target_user_id}
Causes the source User to unmute the target User. The source User must match the User context authorizing the request
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source_user_id | path | required | The ID of the authenticated source User that is requesting to unmute the target User. |
|
| target_user_id | path | required | The ID of the User that the source User is requesting to unmute. |
The request has failed.
The request has succeeded.
DELETE /2/users/{source_user_id}/muting/{target_user_id}
AddOrDeleteRulesRequest
{
"oneOf": [
{
"$ref": "#/components/schemas/AddRulesRequest"
},
{
"$ref": "#/components/schemas/DeleteRulesRequest"
}
]
}
AddOrDeleteRulesResponse
{
"type": "object",
"required": [
"meta"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Rule"
},
"description": "All user-specified stream filtering rules that were created."
},
"meta": {
"$ref": "#/components/schemas/RulesResponseMetadata"
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Problem"
},
"minItems": 1
}
},
"description": "A response from modifying user-specified stream filtering rules."
}
AddRulesRequest
{
"type": "object",
"required": [
"add"
],
"properties": {
"add": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RuleNoId"
}
}
},
"description": "A request to add a user-specified stream filtering rule."
}
Aggregate
{
"type": "integer",
"format": "int32",
"description": "The sum of results returned in this response."
}
AnimatedGif
{
"allOf": [
{
"$ref": "#/components/schemas/Media"
},
{
"type": "object",
"properties": {
"variants": {
"$ref": "#/components/schemas/Variants"
},
"preview_image_url": {
"type": "string",
"format": "uri"
}
}
}
]
}
BlockUserMutationResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"blocking": {
"type": "boolean"
}
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Problem"
},
"minItems": 1
}
}
}
BlockUserRequest
{
"type": "object",
"required": [
"target_user_id"
],
"properties": {
"target_user_id": {
"$ref": "#/components/schemas/UserId"
}
}
}
BookmarkAddRequest
{
"type": "object",
"required": [
"tweet_id"
],
"properties": {
"tweet_id": {
"$ref": "#/components/schemas/TweetId"
}
}
}
BookmarkMutationResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"bookmarked": {
"type": "boolean"
}
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Problem"
},
"minItems": 1
}
}
}
CashtagEntity
{
"allOf": [
{
"$ref": "#/components/schemas/EntityIndicesInclusiveExclusive"
},
{
"$ref": "#/components/schemas/CashtagFields"
}
]
}
CashtagFields
{
"type": "object",
"required": [
"tag"
],
"properties": {
"tag": {
"type": "string",
"example": "TWTR"
}
},
"description": "Represent the portion of text recognized as a Cashtag, and its start and end position within the text."
}
ClientForbiddenProblem
{
"allOf": [
{
"$ref": "#/components/schemas/Problem"
},
{
"type": "object",
"properties": {
"reason": {
"enum": [
"official-client-forbidden",
"client-not-enrolled"
],
"type": "string"
},
"registration_url": {
"type": "string",
"format": "uri"
}
}
}
],
"description": "A problem that indicates your client is forbidden from making this request."
}
ComplianceJob
{
"type": "object",
"required": [
"id",
"type",
"created_at",
"upload_url",
"download_url",
"upload_expires_at",
"download_expires_at",
"status"
],
"properties": {
"id": {
"$ref": "#/components/schemas/JobId"
},
"name": {
"$ref": "#/components/schemas/ComplianceJobName"
},
"type": {
"$ref": "#/components/schemas/ComplianceJobType"
},
"status": {
"$ref": "#/components/schemas/ComplianceJobStatus"
},
"created_at": {
"$ref": "#/components/schemas/CreatedAt"
},
"upload_url": {
"$ref": "#/components/schemas/UploadUrl"
},
"download_url": {
"$ref": "#/components/schemas/DownloadUrl"
},
"upload_expires_at": {
"$ref": "#/components/schemas/UploadExpiration"
},
"download_expires_at": {
"$ref": "#/components/schemas/DownloadExpiration"
}
}
}
ComplianceJobName
{
"type": "string",
"example": "my-job",
"maxLength": 64,
"description": "User-provided name for a compliance job."
}
ComplianceJobStatus
{
"enum": [
"created",
"in_progress",
"failed",
"complete",
"expired"
],
"type": "string",
"description": "Status of a compliance job."
}
ComplianceJobType
{
"enum": [
"tweets",
"users"
],
"type": "string",
"description": "Type of compliance job to list."
}
ConnectionExceptionProblem
{
"allOf": [
{
"$ref": "#/components/schemas/Problem"
},
{
"type": "object",
"properties": {
"connection_issue": {
"enum": [
"TooManyConnections",
"ProvisioningSubscription",
"RuleConfigurationIssue",
"RulesInvalidIssue"
],
"type": "string"
}
}
}
],
"description": "A problem that indicates something is wrong with the connection."
}
ContextAnnotation
{
"type": "object",
"required": [
"domain",
"entity"
],
"properties": {
"domain": {
"$ref": "#/components/schemas/ContextAnnotationDomainFields"
},
"entity": {
"$ref": "#/components/schemas/ContextAnnotationEntityFields"
}
},
"description": "Annotation inferred from the Tweet text."
}
ContextAnnotationDomainFields
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]{1,19}$",
"description": "The unique id for a context annotation domain."
},
"name": {
"type": "string",
"description": "Name of the context annotation domain."
},
"description": {
"type": "string",
"description": "Description of the context annotation domain."
}
},
"description": "Represents the data for the context annotation domain."
}
ContextAnnotationEntityFields
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]{1,19}$",
"description": "The unique id for a context annotation entity."
},
"name": {
"type": "string",
"description": "Name of the context annotation entity."
},
"description": {
"type": "string",
"description": "Description of the context annotation entity."
}
},
"description": "Represents the data for the context annotation entity."
}
CountryCode
{
"type": "string",
"example": "US",
"pattern": "^[A-Z]{2}$",
"description": "A two-letter ISO 3166-1 alpha-2 country code."
}
CreateAttachmentsMessageRequest
{
"type": "object",
"required": [
"attachments"
],
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "Text of the message."
},
"attachments": {
"$ref": "#/components/schemas/DmAttachments"
}
}
}
CreateComplianceJobRequest
{
"type": "object",
"required": [
"type"
],
"properties": {
"name": {
"$ref": "#/components/schemas/ComplianceJobName"
},
"type": {
"enum": [
"tweets",
"users"
],
"type": "string",
"description": "Type of compliance job to list."
},
"resumable": {
"type": "boolean",
"description": "If true, this endpoint will return a pre-signed URL with resumable uploads enabled."
}
},
"description": "A request to create a new batch compliance job."
}
CreateComplianceJobResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ComplianceJob"
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Problem"
},
"minItems": 1
}
}
}
CreateDmConversationRequest
{
"type": "object",
"required": [
"conversation_type",
"participant_ids",
"message"
],
"properties": {
"message": {
"$ref": "#/components/schemas/CreateMessageRequest"
},
"participant_ids": {
"$ref": "#/components/schemas/DmParticipants"
},
"conversation_type": {
"enum": [
"Group"
],
"type": "string",
"description": "The conversation type that is being created."
}
}
}
CreateDmEventResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"required": [
"dm_conversation_id",
"dm_event_id"
],
"properties": {
"dm_event_id": {
"$ref": "#/components/schemas/DmEventId"
},
"dm_conversation_id": {
"$ref": "#/components/schemas/DmConversationId"
}
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Problem"
},
"minItems": 1
}
}
}
CreateMessageRequest
{
"anyOf": [
{
"$ref": "#/components/schemas/CreateTextMessageRequest"
},
{
"$ref": "#/components/schemas/CreateAttachmentsMessageRequest"
}
]
}
CreateTextMessageRequest
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "Text of the message."
},
"attachments": {
"$ref": "#/components/schemas/DmAttachments"
}
}
}
CreatedAt
{
"type": "string",
"format": "date-time",
"example": "2021-01-06T18:40:40.000Z",
"description": "Creation time of the compliance job."
}
DeleteRulesRequest
{
"type": "object",
"required": [
"delete"
],
"properties": {
"delete": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RuleId"
},
"description": "IDs of all deleted user-specified stream filtering rules."
},
"values": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RuleValue"
},
"description": "Values of all deleted user-specified stream filtering rules."
}
},
"description": "IDs and values of all deleted user-specified stream filtering rules."
}
},
"description": "A response from deleting user-specified stream filtering rules."
}
DisallowedResourceProblem
{
"allOf": [
{
"$ref": "#/components/schemas/Problem"
},
{
"type": "object",
"required": [
"resource_id",
"resource_type",
"section"
],
"properties": {
"section": {
"enum": [
"data",
"includes"
],
"type": "string"
},
"resource_id": {
"type": "string"
},
"resource_type": {
"enum": [
"user",
"tweet",
"media",
"list",
"space"
],
"type": "string"
}
}
}
],
"description": "A problem that indicates that the resource requested violates the precepts of this API."
}
DmAttachments
{
"type": "array",
"items": {
"$ref": "#/components/schemas/DmMediaAttachment"
},
"description": "Attachments to a DM Event."
}
DmConversationId
{
"type": "string",
"example": "123123123-456456456",
"pattern": "^([0-9]{1,19}-[0-9]{1,19}|[0-9]{15,19})$",
"description": "Unique identifier of a DM conversation. This can either be a numeric string, or a pair of numeric strings separated by a '-' character in the case of one-on-one DM Conversations."
}
DmEvent
{
"type": "object",
"required": [
"id",
"event_type"
],
"properties": {
"id": {
"$ref": "#/components/schemas/DmEventId"
},
"text": {
"type": "string"
},
"sender_id": {
"$ref": "#/components/schemas/UserId"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"event_type": {
"type": "string",
"example": "MessageCreate"
},
"attachments": {
"type": "object",
"properties": {
"card_ids": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"description": "A list of card IDs (if cards are attached)."
},
"media_keys": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MediaKey"
},
"minItems": 1,
"description": "A list of Media Keys for each one of the media attachments (if media are attached)."
}
},
"description": "Specifies the type of attachments (if any) present in this DM."
},
"participant_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserId"
},
"minItems": 1,
"description": "A list of participants for a ParticipantsJoin or ParticipantsLeave event_type."
},
"referenced_tweets": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"$ref": "#/components/schemas/TweetId"
}
}
},
"minItems": 1,
"description": "A list of Tweets this DM refers to."
},
"dm_conversation_id": {
"$ref": "#/components/schemas/DmConversationId"
}
}
}
DmEventId
{
"type": "string",
"example": "1146654567674912769",
"pattern": "^[0-9]{1,19}$",
"description": "Unique identifier of a DM Event."
}
DmMediaAttachment
{
"type": "object",
"required": [
"media_id"
],
"properties": {
"media_id": {
"$ref": "#/components/schemas/MediaId"
}
}
}
DmParticipants
{
"type": "array",
"items": {
"$ref": "#/components/schemas/UserId"
},
"maxItems": 49,
"minItems": 2,
"description": "Participants for the DM Conversation."
}
DownloadExpiration
{
"type": "string",
"format": "date-time",
"example": "2021-01-06T18:40:40.000Z",
"description": "Expiration time of the download URL."
}
DownloadUrl
{
"type": "string",
"format": "uri",
"description": "URL from which the user will retrieve their compliance results."
}
DuplicateRuleProblem
{
"allOf": [
{
"$ref": "#/components/schemas/Problem"
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
],
"description": "The rule you have submitted is a duplicate."
}
End
{
"type": "string",
"format": "date-time",
"description": "The end time of the bucket."
}
EntityIndicesInclusiveExclusive
{
"type": "object",
"required": [
"start",
"end"
],
"properties": {
"end": {
"type": "integer",
"example": 61,
"minimum": 0,
"description": "Index (zero-based) at which position this entity ends. The index is exclusive."
},
"start": {
"type": "integer",
"example": 50,
"minimum": 0,
"description": "Index (zero-based) at which position this entity starts. The index is inclusive."
}
},
"description": "Represent a boundary range (start and end index) for a recognized entity (for example a hashtag or a mention). `start` must be smaller than `end`. The start index is inclusive, the end index is exclusive."
}
EntityIndicesInclusiveInclusive
{
"type": "object",
"required": [
"start",
"end"
],
"properties": {
"end": {
"type": "integer",
"example": 61,
"minimum": 0,
"description": "Index (zero-based) at which position this entity ends. The index is inclusive."
},
"start": {
"type": "integer",
"example": 50,
"minimum": 0,
"description": "Index (zero-based) at which position this entity starts. The index is inclusive."
}
},
"description": "Represent a boundary range (start and end index) for a recognized entity (for example a hashtag or a mention). `start` must be smaller than `end`. The start index is inclusive, the end index is inclusive."
}
Error
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
Expansions
{
"type": "object",
"properties": {
"media": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Media"
},
"minItems": 1
},
"polls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Poll"
},
"minItems": 1
},
"users": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
},
"minItems": 1
},
"places": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Place"
},
"minItems": 1
},
"topics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Topic"
},
"minItems": 1
},
"tweets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Tweet"
},
"minItems": 1
}
}
}
FieldUnauthorizedProblem
{
"allOf": [
{
"$ref": "#/components/schemas/Problem"
},
{
"type": "object",
"required": [
"resource_type",
"field",
"section"
],
"properties": {
"field": {
"type": "string"
},
"section": {
"enum": [
"data",
"includes"
],
"type": "string"
},
"resource_type": {
"enum": [
"user",
"tweet",
"media",
"list",
"space"
],
"type": "string"
}
}
}
],
"description": "A problem that indicates that you are not allowed to see a particular field on a Tweet, User, etc."
}
FilteredStreamingTweetResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Tweet"
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Problem"
},
"minItems": 1
},
"includes": {
"$ref": "#/components/schemas/Expansions"
},
"matching_rules": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"$ref": "#/components/schemas/RuleId"
},
"tag": {
"$ref": "#/components/schemas/RuleTag"
}
}
},
"description": "The list of rules which matched the Tweet"
}
},
"description": "A Tweet or error that can be returned by the streaming Tweet API. The values returned with a successful streamed Tweet includes the user provided rules that the Tweet matched."
}
FullTextEntities
{
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UrlEntity"
},
"minItems": 1
},
"cashtags": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CashtagEntity"
},
"minItems": 1
},
"hashtags": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HashtagEntity"
},
"minItems": 1
},
"mentions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MentionEntity"
},
"minItems": 1
},
"annotations": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/EntityIndicesInclusiveInclusive"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"example": "Person",
"description": "Annotation type."
},
"probability": {
"type": "number",
"format": "double",
"maximum": 1,
"minimum": 0,
"description": "Confidence factor for annotation type."
},
"normalized_text": {
"type": "string",
"example": "Barack Obama",
"description": "Text used to determine annotation."
}
},
"description": "Represents the data for the annotation."
}
],
"description": "Annotation for entities based on the Tweet text."
},
"minItems": 1
}
}
}
GeneralGetOpenApiSpecResponse
{
"type": "object",
"example": {},
"properties": {}
}
Geo
{
"type": "object",
"required": [
"type",
"bbox",
"properties"
],
"properties": {
"bbox": {
"type": "array",
"items": {
"type": "number",
"format": "double",
"maximum": 180,
"minimum": -180
},
"example": [
-105.193475,
39.60973,
-105.053164,
39.761974
],
"maxItems": 4,
"minItems": 4
},
"type": {
"enum": [
"Feature"
],
"type": "string"
},
"geometry": {
"$ref": "#/components/schemas/Point"
},
"properties": {
"type": "object"
}
}
}
| Version | Endpoints | Schemas | Ingested | Status |
|---|---|---|---|---|
| 2.62 | 80 | 228 | 2026-05-11 | current |
| 2.62 | 80 | 228 | 2026-04-20 | |
| 2.62 | 80 | 228 | 2026-04-16 |