Creates a subscription for an X activity event
curl --request POST \
--url https://api.x.com/2/activity/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_type": "profile.update.bio",
"filter": {
"direction": "inbound",
"keyword": "The President",
"user_id": "2244994945"
},
"tag": "<string>",
"webhook_id": "1146654567674912769"
}
'{
"data": {
"subscription": {
"created_at": "2023-11-07T05:31:56Z",
"event_type": "<string>",
"filter": {
"direction": "inbound",
"keyword": "The President",
"user_id": "2244994945"
},
"subscription_id": "1146654567674912769",
"updated_at": "2023-11-07T05:31:56Z",
"tag": "<string>",
"webhook_id": "1146654567674912769"
},
"total_subscriptions_for_instance_id": 123
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
],
"meta": {
"total_subscriptions": 123
}
}Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
profile.update.bio, profile.update.profile_picture, profile.update.banner_picture, profile.update.screenname, profile.update.geo, profile.update.url, profile.update.verified_badge, profile.update.affiliate_badge, profile.update.handle, news.new, follow.follow, follow.unfollow, spaces.start, spaces.end, chat.received, chat.sent, chat.conversation_join, dm.sent, dm.received, dm.indicate_typing, dm.read An XAA subscription filter.
Show child attributes
1 - 200The unique identifier of this webhook config.
^[0-9]{1,19}$"1146654567674912769"
The request has succeeded.
Show child attributes
1An HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807).
Show child attributes
Show child attributes
curl --request POST \
--url https://api.x.com/2/activity/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_type": "profile.update.bio",
"filter": {
"direction": "inbound",
"keyword": "The President",
"user_id": "2244994945"
},
"tag": "<string>",
"webhook_id": "1146654567674912769"
}
'{
"data": {
"subscription": {
"created_at": "2023-11-07T05:31:56Z",
"event_type": "<string>",
"filter": {
"direction": "inbound",
"keyword": "The President",
"user_id": "2244994945"
},
"subscription_id": "1146654567674912769",
"updated_at": "2023-11-07T05:31:56Z",
"tag": "<string>",
"webhook_id": "1146654567674912769"
},
"total_subscriptions_for_instance_id": 123
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
],
"meta": {
"total_subscriptions": 123
}
}