Skip to content

Commit 8974857

Browse files
committed
Update documentation with latest OpenAPI spec
1 parent 35bc641 commit 8974857

2 files changed

Lines changed: 114 additions & 4 deletions

File tree

openapi.json

Lines changed: 111 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi" : "3.0.0",
33
"info" : {
44
"description" : "X API v2 available endpoints",
5-
"version" : "2.149",
5+
"version" : "2.150",
66
"title" : "X API v2",
77
"termsOfService" : "https://developer.x.com/en/developer-terms/agreement-and-policy.html",
88
"contact" : {
@@ -783,7 +783,7 @@
783783
"summary" : "Terminate all connections",
784784
"description" : "Terminates all active streaming connections for the authenticated application.",
785785
"externalDocs" : {
786-
"url" : "https://developer.x.com"
786+
"url" : "https://docs.x.com/x-api/connections/terminate-all-connections"
787787
},
788788
"operationId" : "deleteAllConnections",
789789
"parameters" : [ ],
@@ -1529,6 +1529,66 @@
15291529
}
15301530
}
15311531
},
1532+
"/2/evaluate_note" : {
1533+
"post" : {
1534+
"security" : [
1535+
{
1536+
"OAuth2UserToken" : [
1537+
"tweet.write"
1538+
]
1539+
},
1540+
{
1541+
"UserToken" : [ ]
1542+
}
1543+
],
1544+
"tags" : [
1545+
"Community Notes"
1546+
],
1547+
"summary" : "Evaluate a Community Note",
1548+
"description" : "Endpoint to evaluate a community note.",
1549+
"externalDocs" : {
1550+
"url" : "https://communitynotes.x.com/guide/api/overview"
1551+
},
1552+
"operationId" : "evaluateCommunityNotes",
1553+
"parameters" : [ ],
1554+
"requestBody" : {
1555+
"content" : {
1556+
"application/json" : {
1557+
"schema" : {
1558+
"$ref" : "#/components/schemas/EvaluateNoteRequest"
1559+
}
1560+
}
1561+
}
1562+
},
1563+
"responses" : {
1564+
"200" : {
1565+
"description" : "The request has succeeded.",
1566+
"content" : {
1567+
"application/json" : {
1568+
"schema" : {
1569+
"$ref" : "#/components/schemas/EvaluateNoteResponse"
1570+
}
1571+
}
1572+
}
1573+
},
1574+
"default" : {
1575+
"description" : "The request has failed.",
1576+
"content" : {
1577+
"application/json" : {
1578+
"schema" : {
1579+
"$ref" : "#/components/schemas/Error"
1580+
}
1581+
},
1582+
"application/problem+json" : {
1583+
"schema" : {
1584+
"$ref" : "#/components/schemas/Problem"
1585+
}
1586+
}
1587+
}
1588+
}
1589+
}
1590+
}
1591+
},
15321592
"/2/insights/28hr" : {
15331593
"get" : {
15341594
"security" : [
@@ -3650,7 +3710,7 @@
36503710
"content" : {
36513711
"application/json" : {
36523712
"schema" : {
3653-
"$ref" : "#/components/schemas/DeleteNoteResponse"
3713+
"$ref" : "#/components/schemas/CreateNoteResponse"
36543714
}
36553715
}
36563716
}
@@ -3905,7 +3965,7 @@
39053965
"content" : {
39063966
"application/json" : {
39073967
"schema" : {
3908-
"$ref" : "#/components/schemas/CreateNoteResponse"
3968+
"$ref" : "#/components/schemas/DeleteNoteResponse"
39093969
}
39103970
}
39113971
}
@@ -8149,6 +8209,9 @@
81498209
],
81508210
"summary" : "Get Reposts of me",
81518211
"description" : "Retrieves a list of Posts that repost content from the authenticated user.",
8212+
"externalDocs" : {
8213+
"url" : "https://docs.x.com/x-api/posts/retweets/quickstart/retweets-of-me#retweets-of-me"
8214+
},
81528215
"operationId" : "getUsersRepostsOfMe",
81538216
"parameters" : [
81548217
{
@@ -12787,6 +12850,45 @@
1278712850
}
1278812851
}
1278912852
},
12853+
"EvaluateNoteRequest" : {
12854+
"type" : "object",
12855+
"required" : [
12856+
"post_id",
12857+
"note_text"
12858+
],
12859+
"properties" : {
12860+
"note_text" : {
12861+
"type" : "string",
12862+
"description" : "Text for the community note."
12863+
},
12864+
"post_id" : {
12865+
"$ref" : "#/components/schemas/TweetId"
12866+
}
12867+
},
12868+
"additionalProperties" : false
12869+
},
12870+
"EvaluateNoteResponse" : {
12871+
"type" : "object",
12872+
"properties" : {
12873+
"data" : {
12874+
"type" : "object",
12875+
"properties" : {
12876+
"claim_opinion_score" : {
12877+
"type" : "number",
12878+
"description" : "Claim opinion model score for the note.",
12879+
"format" : "double"
12880+
}
12881+
}
12882+
},
12883+
"errors" : {
12884+
"type" : "array",
12885+
"minItems" : 1,
12886+
"items" : {
12887+
"$ref" : "#/components/schemas/Problem"
12888+
}
12889+
}
12890+
}
12891+
},
1279012892
"Expansions" : {
1279112893
"type" : "object",
1279212894
"properties" : {
@@ -20295,6 +20397,11 @@
2029520397
"type" : "string",
2029620398
"description" : "The user ID"
2029720399
},
20400+
"created_at" : {
20401+
"type" : "string",
20402+
"description" : "The datetime the webhook was linked to the stream",
20403+
"format" : "data-time"
20404+
},
2029820405
"fields" : {
2029920406
"type" : "array",
2030020407
"description" : "Requested fields to be rendered",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
openapi: post /2/evaluate_note
3+
---

0 commit comments

Comments
 (0)