|
2 | 2 | "openapi" : "3.0.0", |
3 | 3 | "info" : { |
4 | 4 | "description" : "X API v2 available endpoints", |
5 | | - "version" : "2.148", |
| 5 | + "version" : "2.149", |
6 | 6 | "title" : "X API v2", |
7 | 7 | "termsOfService" : "https://developer.x.com/en/developer-terms/agreement-and-policy.html", |
8 | 8 | "contact" : { |
|
6732 | 6732 | } |
6733 | 6733 | } |
6734 | 6734 | }, |
| 6735 | + "/2/tweets/search/webhooks" : { |
| 6736 | + "get" : { |
| 6737 | + "security" : [ |
| 6738 | + { |
| 6739 | + "BearerToken" : [ ] |
| 6740 | + } |
| 6741 | + ], |
| 6742 | + "tags" : [ |
| 6743 | + "Webhooks", |
| 6744 | + "Stream" |
| 6745 | + ], |
| 6746 | + "summary" : "Get stream links", |
| 6747 | + "description" : "Get a list of webhook links associated with a filtered stream ruleset.", |
| 6748 | + "externalDocs" : { |
| 6749 | + "url" : "https://docs.x.com/x-api/webhooks/introduction" |
| 6750 | + }, |
| 6751 | + "operationId" : "getWebhooksStreamLinks", |
| 6752 | + "parameters" : [ ], |
| 6753 | + "responses" : { |
| 6754 | + "200" : { |
| 6755 | + "description" : "The request has succeeded.", |
| 6756 | + "content" : { |
| 6757 | + "application/json" : { |
| 6758 | + "schema" : { |
| 6759 | + "$ref" : "#/components/schemas/WebhookLinksGetResponse" |
| 6760 | + } |
| 6761 | + } |
| 6762 | + } |
| 6763 | + }, |
| 6764 | + "default" : { |
| 6765 | + "description" : "The request has failed.", |
| 6766 | + "content" : { |
| 6767 | + "application/json" : { |
| 6768 | + "schema" : { |
| 6769 | + "$ref" : "#/components/schemas/Error" |
| 6770 | + } |
| 6771 | + }, |
| 6772 | + "application/problem+json" : { |
| 6773 | + "schema" : { |
| 6774 | + "$ref" : "#/components/schemas/Problem" |
| 6775 | + } |
| 6776 | + } |
| 6777 | + } |
| 6778 | + } |
| 6779 | + } |
| 6780 | + } |
| 6781 | + }, |
| 6782 | + "/2/tweets/search/webhooks/{webhook_id}" : { |
| 6783 | + "delete" : { |
| 6784 | + "security" : [ |
| 6785 | + { |
| 6786 | + "BearerToken" : [ ] |
| 6787 | + } |
| 6788 | + ], |
| 6789 | + "tags" : [ |
| 6790 | + "Webhooks", |
| 6791 | + "Stream" |
| 6792 | + ], |
| 6793 | + "summary" : "Delete stream link", |
| 6794 | + "description" : "Deletes a link from FilteredStream events to the given webhook.", |
| 6795 | + "externalDocs" : { |
| 6796 | + "url" : "https://docs.x.com/x-api/webhooks/introduction" |
| 6797 | + }, |
| 6798 | + "operationId" : "deleteWebhooksStreamLink", |
| 6799 | + "parameters" : [ |
| 6800 | + { |
| 6801 | + "name" : "webhook_id", |
| 6802 | + "in" : "path", |
| 6803 | + "description" : "The webhook ID to link to your FilteredStream ruleset.", |
| 6804 | + "required" : true, |
| 6805 | + "schema" : { |
| 6806 | + "$ref" : "#/components/schemas/WebhookConfigId" |
| 6807 | + }, |
| 6808 | + "style" : "simple" |
| 6809 | + } |
| 6810 | + ], |
| 6811 | + "responses" : { |
| 6812 | + "200" : { |
| 6813 | + "description" : "The request has succeeded.", |
| 6814 | + "content" : { |
| 6815 | + "application/json" : { |
| 6816 | + "schema" : { |
| 6817 | + "$ref" : "#/components/schemas/WebhookLinksDeleteResponse" |
| 6818 | + } |
| 6819 | + } |
| 6820 | + } |
| 6821 | + }, |
| 6822 | + "default" : { |
| 6823 | + "description" : "The request has failed.", |
| 6824 | + "content" : { |
| 6825 | + "application/json" : { |
| 6826 | + "schema" : { |
| 6827 | + "$ref" : "#/components/schemas/Error" |
| 6828 | + } |
| 6829 | + }, |
| 6830 | + "application/problem+json" : { |
| 6831 | + "schema" : { |
| 6832 | + "$ref" : "#/components/schemas/Problem" |
| 6833 | + } |
| 6834 | + } |
| 6835 | + } |
| 6836 | + } |
| 6837 | + } |
| 6838 | + }, |
| 6839 | + "post" : { |
| 6840 | + "security" : [ |
| 6841 | + { |
| 6842 | + "BearerToken" : [ ] |
| 6843 | + } |
| 6844 | + ], |
| 6845 | + "tags" : [ |
| 6846 | + "Webhooks", |
| 6847 | + "Stream" |
| 6848 | + ], |
| 6849 | + "summary" : "Create stream link", |
| 6850 | + "description" : "Creates a link to deliver FilteredStream events to the given webhook.", |
| 6851 | + "externalDocs" : { |
| 6852 | + "url" : "https://docs.x.com/x-api/webhooks/introduction" |
| 6853 | + }, |
| 6854 | + "operationId" : "createWebhooksStreamLink", |
| 6855 | + "parameters" : [ |
| 6856 | + { |
| 6857 | + "name" : "webhook_id", |
| 6858 | + "in" : "path", |
| 6859 | + "description" : "The webhook ID to link to your FilteredStream ruleset.", |
| 6860 | + "required" : true, |
| 6861 | + "schema" : { |
| 6862 | + "$ref" : "#/components/schemas/WebhookConfigId" |
| 6863 | + }, |
| 6864 | + "style" : "simple" |
| 6865 | + }, |
| 6866 | + { |
| 6867 | + "name" : "tweet.fields", |
| 6868 | + "in" : "query", |
| 6869 | + "description" : "A comma separated list of Tweet fields to display.", |
| 6870 | + "required" : false, |
| 6871 | + "schema" : { |
| 6872 | + "type" : "string" |
| 6873 | + }, |
| 6874 | + "style" : "form" |
| 6875 | + }, |
| 6876 | + { |
| 6877 | + "name" : "expansions", |
| 6878 | + "in" : "query", |
| 6879 | + "description" : "A comma separated list of fields to expand.", |
| 6880 | + "required" : false, |
| 6881 | + "schema" : { |
| 6882 | + "type" : "string" |
| 6883 | + }, |
| 6884 | + "style" : "form" |
| 6885 | + }, |
| 6886 | + { |
| 6887 | + "name" : "media.fields", |
| 6888 | + "in" : "query", |
| 6889 | + "description" : "A comma separated list of Media fields to display.", |
| 6890 | + "required" : false, |
| 6891 | + "schema" : { |
| 6892 | + "type" : "string" |
| 6893 | + }, |
| 6894 | + "style" : "form" |
| 6895 | + }, |
| 6896 | + { |
| 6897 | + "name" : "poll.fields", |
| 6898 | + "in" : "query", |
| 6899 | + "description" : "A comma separated list of Poll fields to display.", |
| 6900 | + "required" : false, |
| 6901 | + "schema" : { |
| 6902 | + "type" : "string" |
| 6903 | + }, |
| 6904 | + "style" : "form" |
| 6905 | + }, |
| 6906 | + { |
| 6907 | + "name" : "user.fields", |
| 6908 | + "in" : "query", |
| 6909 | + "description" : "A comma separated list of User fields to display.", |
| 6910 | + "required" : false, |
| 6911 | + "schema" : { |
| 6912 | + "type" : "string" |
| 6913 | + }, |
| 6914 | + "style" : "form" |
| 6915 | + }, |
| 6916 | + { |
| 6917 | + "name" : "place.fields", |
| 6918 | + "in" : "query", |
| 6919 | + "description" : "A comma separated list of Place fields to display.", |
| 6920 | + "required" : false, |
| 6921 | + "schema" : { |
| 6922 | + "type" : "string" |
| 6923 | + }, |
| 6924 | + "style" : "form" |
| 6925 | + } |
| 6926 | + ], |
| 6927 | + "responses" : { |
| 6928 | + "200" : { |
| 6929 | + "description" : "The request has succeeded.", |
| 6930 | + "content" : { |
| 6931 | + "application/json" : { |
| 6932 | + "schema" : { |
| 6933 | + "$ref" : "#/components/schemas/WebhookLinksCreateResponse" |
| 6934 | + } |
| 6935 | + } |
| 6936 | + } |
| 6937 | + }, |
| 6938 | + "default" : { |
| 6939 | + "description" : "The request has failed.", |
| 6940 | + "content" : { |
| 6941 | + "application/json" : { |
| 6942 | + "schema" : { |
| 6943 | + "$ref" : "#/components/schemas/Error" |
| 6944 | + } |
| 6945 | + }, |
| 6946 | + "application/problem+json" : { |
| 6947 | + "schema" : { |
| 6948 | + "$ref" : "#/components/schemas/Problem" |
| 6949 | + } |
| 6950 | + } |
| 6951 | + } |
| 6952 | + } |
| 6953 | + } |
| 6954 | + } |
| 6955 | + }, |
6735 | 6956 | "/2/tweets/{id}" : { |
6736 | 6957 | "delete" : { |
6737 | 6958 | "security" : [ |
@@ -20009,6 +20230,100 @@ |
20009 | 20230 | } |
20010 | 20231 | } |
20011 | 20232 | } |
| 20233 | + }, |
| 20234 | + "WebhookLinksCreateResponse" : { |
| 20235 | + "type" : "object", |
| 20236 | + "properties" : { |
| 20237 | + "data" : { |
| 20238 | + "type" : "object", |
| 20239 | + "properties" : { |
| 20240 | + "provisioned" : { |
| 20241 | + "type" : "boolean" |
| 20242 | + } |
| 20243 | + } |
| 20244 | + }, |
| 20245 | + "errors" : { |
| 20246 | + "type" : "array", |
| 20247 | + "minItems" : 1, |
| 20248 | + "items" : { |
| 20249 | + "$ref" : "#/components/schemas/Problem" |
| 20250 | + } |
| 20251 | + } |
| 20252 | + } |
| 20253 | + }, |
| 20254 | + "WebhookLinksDeleteResponse" : { |
| 20255 | + "type" : "object", |
| 20256 | + "properties" : { |
| 20257 | + "data" : { |
| 20258 | + "type" : "object", |
| 20259 | + "properties" : { |
| 20260 | + "deleted" : { |
| 20261 | + "type" : "boolean" |
| 20262 | + } |
| 20263 | + } |
| 20264 | + }, |
| 20265 | + "errors" : { |
| 20266 | + "type" : "array", |
| 20267 | + "minItems" : 1, |
| 20268 | + "items" : { |
| 20269 | + "$ref" : "#/components/schemas/Problem" |
| 20270 | + } |
| 20271 | + } |
| 20272 | + } |
| 20273 | + }, |
| 20274 | + "WebhookLinksGetResponse" : { |
| 20275 | + "type" : "object", |
| 20276 | + "properties" : { |
| 20277 | + "data" : { |
| 20278 | + "type" : "object", |
| 20279 | + "description" : "The list of active webhook links for a given stream", |
| 20280 | + "required" : [ |
| 20281 | + "links" |
| 20282 | + ], |
| 20283 | + "properties" : { |
| 20284 | + "links" : { |
| 20285 | + "type" : "array", |
| 20286 | + "description" : "list of links", |
| 20287 | + "items" : { |
| 20288 | + "type" : "object", |
| 20289 | + "properties" : { |
| 20290 | + "application_id" : { |
| 20291 | + "type" : "string", |
| 20292 | + "description" : "The application ID" |
| 20293 | + }, |
| 20294 | + "business_user_id" : { |
| 20295 | + "type" : "string", |
| 20296 | + "description" : "The user ID" |
| 20297 | + }, |
| 20298 | + "fields" : { |
| 20299 | + "type" : "array", |
| 20300 | + "description" : "Requested fields to be rendered", |
| 20301 | + "items" : { |
| 20302 | + "type" : "string", |
| 20303 | + "description" : "A query-parameter formatted field or expansion, e.g., 'expansions=author_id' or 'user.fields=name,username'" |
| 20304 | + } |
| 20305 | + }, |
| 20306 | + "instance_id" : { |
| 20307 | + "type" : "string", |
| 20308 | + "description" : "The stream ID associated with the FilteredStream instance" |
| 20309 | + }, |
| 20310 | + "webhook_id" : { |
| 20311 | + "type" : "string", |
| 20312 | + "description" : "The unique identifier for the webhook" |
| 20313 | + } |
| 20314 | + } |
| 20315 | + } |
| 20316 | + } |
| 20317 | + } |
| 20318 | + }, |
| 20319 | + "errors" : { |
| 20320 | + "type" : "array", |
| 20321 | + "minItems" : 1, |
| 20322 | + "items" : { |
| 20323 | + "$ref" : "#/components/schemas/Problem" |
| 20324 | + } |
| 20325 | + } |
| 20326 | + } |
20012 | 20327 | } |
20013 | 20328 | }, |
20014 | 20329 | "parameters" : { |
|
0 commit comments