Overview
Webhook delivery
Real-time
Comprehensive
Subscription-based
How it works
- Register webhook — Register your webhook URL via the V2 Webhooks API
- Subscribe users — Add user subscriptions to your webhook
- Receive events — Get activity events delivered as POST requests with JSON payloads
- Process events — Handle events in your application and respond with
200 OK
Activity types
You will receive all related activities below for each user subscription on your webhook registration:- Posts (by user)
- Post deletes (by user)
- @mentions (of user)
- Replies (to or from user)
- Reposts (by user or of user)
- Quote Posts (by user or of user)
- Reposts of Quoted Posts (by user or of user)
- Likes (by user or of user)
- Follows (by user or of user)
- Unfollows (by user or of user)
- Blocks (by user or of user)
- Unblocks (by user or of user)
- Mutes (by user or of user)
- Unmutes (by user or of user)
- Direct Messages sent (by user)
- Direct Messages received (by user)
- Typing indicators (to user)
- Read receipts (to user)
- Subscription revokes (by user)
Feature summary
| Tier | Number of Unique Subscriptions | Number of Webhooks |
|---|---|---|
| Pay Per Use | 3 | 1 |
| Enterprise | 5000+ | 5+ |
Account Activity data object structure
| Object | Details |
|---|---|
for_user_id | Identifies the user subscription that the event is related to. |
is_blocked_by | (Conditional) Shown only for Post mention events if the mentioning user is blocked by the subscribed user. |
source | The user performing the activity (e.g., the user following, blocking, or muting). |
target | The user the activity applies to (e.g., the user being followed, blocked, or muted). |
Available activities
| Message Type | Details |
|---|---|
tweet_create_events | Post status for Posts, Retweets, Replies, @mentions, Quote Tweets, or Retweet of Quote Tweets. |
favorite_events | Like event with user and target. |
follow_events | Follow event with user and target. |
unfollow_events | Unfollow event with user and target. |
block_events | Block event with user and target. |
unblock_events | Unblock event with user and target. |
mute_events | Mute event with user and target. |
unmute_events | Unmute event with user and target. |
user_event | Revoke events when a user removes app authorization (subscription auto-deleted). |
direct_message_events | DM status for sent or received messages. |
direct_message_indicate_typing_events | DM typing event with user and target. |
direct_message_mark_read_events | DM read event with user and target. |
tweet_delete_events | Notice of deleted Posts for compliance. |
Payload examples
Below are example payloads for each Account Activity event.tweet_create_events (Posts, Retweets, Replies, QuoteTweets)
tweet_create_events (@mentions)
favorite_events
follow_events
unfollow_events
block_events
unblock_events
mute_events
unmute_events
user_event
direct_message_events
direct_message_indicate_typing_events
direct_message_mark_read_events
tweet_delete_events
Support for longform Posts
The V2 Account Activity API supports longform posts, which are posts exceeding 280 characters. When a longform post is included in atweet_create_events payload, the text field contains the first 140 characters (or fewer), and the truncated field is set to true. The full post content is delivered in the extended_tweet object, which includes:
full_text— The complete text of the post, including all characters beyond the 280-character limit.entities— Any entities (e.g., hashtags, URLs, user mentions, symbols) appearing in the full text, including those after the 280th character.display_text_range— The range of characters to display, accounting for the full text.
tweet_create_events payload for a longform post:
Frequently asked questions
What are the advantages of using the Account Activity API?
What are the advantages of using the Account Activity API?
- Speed — Delivers data at the speed of X.
- Simplicity — Provides all account events through a single webhook connection, including Posts, @mentions, Replies, Reposts, Quote Tweets, Likes, DMs, Follows, Blocks, and Mutes.
- Scale — Supports all activities for managed accounts without rate limits or event caps (Enterprise tier).
I need development, staging, and production environments. Is this possible?
I need development, staging, and production environments. Is this possible?
Do you have any step-by-step guides for getting set up?
Do you have any step-by-step guides for getting set up?
What authentication do I need for the Account Activity API?
What authentication do I need for the Account Activity API?
- User-specific actions (e.g., subscribing a user) require OAuth 1.0a (3-legged OAuth flow).
- App-level actions (e.g., listing/deleting subscriptions, subscription count) require OAuth2 App Only Bearer Token.
Will I get duplicate activities if subscribed to users interacting with each other?
Will I get duplicate activities if subscribed to users interacting with each other?
for_user_id field to identify the subscription.Can I replace /all/ in the endpoint to limit activities delivered?
Can I replace /all/ in the endpoint to limit activities delivered?
/all/ product is the only option, delivering all supported event types.If I have access to three webhooks, can I use three webhooks for each of my apps?
If I have access to three webhooks, can I use three webhooks for each of my apps?
API reference index
| Purpose | V2 Endpoint |
|---|---|
| Subscribes an application to an account’s events | POST /2/account_activity/webhooks/:webhook_id/subscriptions/all |
| Returns a count of currently active subscriptions | GET /2/account_activity/subscriptions/count |
| Checks if a webhook is subscribed to an account | GET /2/account_activity/webhooks/:webhook_id/subscriptions/all |
| Returns a list of currently active subscriptions | GET /2/account_activity/webhooks/:webhook_id/subscriptions/all/list |
| Deactivates a subscription using app-only OAuth | DELETE /2/account_activity/webhooks/:webhook_id/subscriptions/:user_id/all |
| Creates a replay job | POST /2/account_activity/replay/webhooks/:webhook_id/subscriptions/all |
Getting started
- An approved developer account
- A Project and App in the Developer Console
- A publicly accessible HTTPS webhook endpoint
- Enterprise or Pay Per Use access for the Account Activity API