Skip to main content
POST
/
2
/
activity
/
subscriptions
Create X activity subscription
curl --request POST \
  --url https://api.x.com/2/activity/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "event_type": "ProfileBioUpdate",
  "filter": {
    "user_id": "2244994945"
  },
  "tag": "<string>",
  "webhook_id": "1146654567674912769"
}'
{
  "data": {
    "subscription": {
      "created_at": "2023-11-07T05:31:56Z",
      "event_type": "<string>",
      "filter": {
        "user_id": "2244994945"
      },
      "subscription_id": "1146654567674912769",
      "tag": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "webhook_id": "1146654567674912769"
    },
    "total_subscriptions_for_instance_id": 123
  },
  "errors": [
    {
      "detail": "<string>",
      "status": 123,
      "title": "<string>",
      "type": "<string>"
    }
  ],
  "meta": {
    "total_subscriptions": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
event_type
enum<string>
required
Available options:
ProfileBioUpdate,
ProfilePictureUpdate,
ProfileBannerPictureUpdate,
ProfileScreennameUpdate,
ProfileGeoUpdate,
ProfileUrlUpdate
filter
object
required

An XAA subscription.

tag
string
Required string length: 1 - 200
webhook_id
string

The unique identifier of this webhook config.

Example:

"1146654567674912769"

Response

The request has succeeded.

data
object
errors
object[]
Minimum length: 1
meta
object
I