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.
title: “Account Activity API: Enterprise” keywords: [“enterprise Account Activity API”, “enterprise AAA”, “Account Activity enterprise”, “enterprise webhooks”, “enterprise activity”] description: Overview
Enterprise The Account Activity API provides you the ability to subscribe to realtime activities related to a user account via webhooks. This…---
This endpoint has been updated to include Post edit metadata. Learn more about these metadata on the “Edit Posts” fundamentals page. This endpoint is often used with the Direct Messages endpoints. We have launched new v2 Direct Messages endpoints. Note that the Enterprise and Premium Account Activity APIs support v2 one-to-one messages, but do not yet support group conversations.
Enterprise
The Account Activity API provides you the ability to subscribe to realtime activities related to a user account via webhooks. This means that you can receive realtime Posts, Direct Messages, and other account events from one or more of your owned or subscribed accounts through a single connection.
You will receive all related activities below for each user subscription on your webhook registration:
| Activity types | |
|---|---|
| * Posts (by user) * Post deletes (by user) * @mentions (of user) * Replies (to or from user) * Retweets (by user or of user) * Quote Tweets (by user or of user) * Retweets of Quoted Tweets (by user or of user) * Likes (by user or of user) * Follows (by user or of user) * Unfollows (by user) | * Blocks (by user) * Unblocks (by user) * Mutes (by user) * Unmutes (by user) * Direct Messages sent (by user) * Direct Messages received (by user) * Typing indicators (to user) * Read receipts (to user) * Subscription revokes (by user) |
Video Series
Check out our four-part video series on the Account Activity API to get up to speed!Feature summary
| Tier | Pricing | Number of unique subscriptions | Number of webhooks | Reliability and Activity Recovery |
|---|---|---|---|---|
| Enterprise | Contact sales | Up to 500+ | 3+ | Retries and Replay |
Manage webhooks and subscribed users
⏱ 10 min read The enterprise Account Activity API provides you webhook-based JSON messages any time there are events associated with X accounts subscribed to your service. X delivers those activities to your registered webhook. In the following steps, you will learn how to manage webhooks and subscribed users. You will learn how to register, view, and remove, both webhooks and subscribed users. We’ll be using simple cURL commands to make requests to the various API endpoints. cURL is a command-line tool for getting or sending requests using the URL syntax. You will need: * A registered X app - register here * A bearer token - learn more * A webhook that passes a Challenge-Response Check (CRC) - learn more * An enterprise account - [apply here]https://developer.x.com/en/products/x-api/enterprise Before you get started, we recommend you check out our Github repo here that provides a sample web app and helper scripts to get started with X’s Account Activity APIManaging a webhook:
Using a webhook provides you the ability to subscribe to realtime activities related to a user account through a single connection.- Adding a webhook
- Viewing a webhook
- Removing a webhook
Let’s begin with registering a new webhook URL for the given application context.The URL will be validated via a CRC request before saving. Once you’ve registered a webhook, make sure to document the webhook ID as you will need it later on.Copy the following cURL request into your command line after making changes to the following:* URL
<URL> e.g. https://yourdomain.com/webhooks/twitter/* Consumer key <CONSUMER_KEY> e.g. xvz1evFS4wEEPTGEFPHBog* Access token <ACCESS_TOKEN> e.g. 370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEbManaging subscribed users:
Once you’ve registered a Webhook, you can add a subscribed user to the Account Activity API to begin receiving their account activities.- Adding a subscription
- Viewing subscriptions
- Removing a subscription
We’ll begin with subscribing a user so you recieve all event types.Copy the following cURL request into your command line after making changes to the following:* Webhook ID
<:WEBHOOK_ID> e.g. 1234567890* Consumer key name <CONSUMER_KEY> e.g. xvz1evFS4wEEPTGEFPHBog* Subscribing user’s access token <SUBSCRIBING_USER'S_ACCESS_TOKEN> e.g. 370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb