Skip to content

Commit 9e7c27a

Browse files
committed
update doc structure
1 parent 9292c1b commit 9e7c27a

File tree

197 files changed

+1970
-2555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+1970
-2555
lines changed

docs.json

Lines changed: 342 additions & 1053 deletions
Large diffs are not rendered by default.

enterprise-api/account-activity/introduction.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This API is commonly used to build applications that need to react instantly to
3232

3333
## How it works
3434

35-
1. **Register webhook** — Register your webhook URL via the [V2 Webhooks API](/enterprise-api/webhooks/introduction)
35+
1. **Register webhook** — Register your webhook URL via the [V2 Webhooks API](/x-api/webhooks/introduction)
3636
2. **Subscribe users** — Add user subscriptions to your webhook
3737
3. **Receive events** — Get activity events delivered as POST requests with JSON payloads
3838
4. **Process events** — Handle events in your application and respond with `200 OK`
@@ -64,9 +64,9 @@ You will receive all related activities below for each user subscription on your
6464
- **Subscription revokes** (by user)
6565

6666
<Note>
67-
We do not deliver home timeline data via the Account Activity API. Use the [User Posts timeline by User ID](/enterprise-api/posts/timelines/get-user-tweets) endpoint to pull this data.
67+
We do not deliver home timeline data via the Account Activity API. Use the [User Posts timeline by User ID](/x-api/posts/timelines/get-user-tweets) endpoint to pull this data.
6868

69-
The returned Posts from the Account Activity API count towards the monthly [Post cap](/enterprise-api/fundamentals/post-cap).
69+
The returned Posts from the Account Activity API count towards the monthly [Post cap](/x-api/fundamentals/post-cap).
7070
</Note>
7171

7272
---
@@ -544,11 +544,11 @@ This ensures that applications can process the entire content of longform posts,
544544
</Accordion>
545545

546546
<Accordion title="I need development, staging, and production environments. Is this possible?">
547-
Yes! You can register multiple webhook URLs and manage subscriptions separately via the [V2 Webhooks API](/enterprise-api/webhooks/introduction).
547+
Yes! You can register multiple webhook URLs and manage subscriptions separately via the [V2 Webhooks API](/x-api/webhooks/introduction).
548548
</Accordion>
549549

550550
<Accordion title="Do you have any step-by-step guides for getting set up?">
551-
Yes! See the [Account Activity API Quickstart](/enterprise-api/account-activity/quickstart), the [Getting Started with Webhooks guide](/enterprise-api/webhooks/quickstart), and the [Account Activity API Sample Application](https://github.com/xdevplatform/account-activity-dashboard-enterprise/tree/master).
551+
Yes! See the [Account Activity API Quickstart](/x-api/account-activity/quickstart), the [Getting Started with Webhooks guide](/x-api/webhooks/quickstart), and the [Account Activity API Sample Application](https://github.com/xdevplatform/account-activity-dashboard-enterprise/tree/master).
552552
</Accordion>
553553

554554
<Accordion title="What authentication do I need for the Account Activity API?">
@@ -579,14 +579,14 @@ This ensures that applications can process the entire content of longform posts,
579579

580580
| Purpose | V2 Endpoint |
581581
|:--------|:------------|
582-
| Subscribes an application to an account's events | [`POST /2/account_activity/webhooks/:webhook_id/subscriptions/all`](/enterprise-api/account-activity/create-subscription) |
583-
| Returns a count of currently active subscriptions | [`GET /2/account_activity/subscriptions/count`](/enterprise-api/account-activity/get-subscription-count) |
584-
| Checks if a webhook is subscribed to an account | [`GET /2/account_activity/webhooks/:webhook_id/subscriptions/all`](/enterprise-api/account-activity/validate-subscription) |
585-
| Returns a list of currently active subscriptions | [`GET /2/account_activity/webhooks/:webhook_id/subscriptions/all/list`](/enterprise-api/account-activity/get-subscriptions) |
586-
| Deactivates a subscription using app-only OAuth | [`DELETE /2/account_activity/webhooks/:webhook_id/subscriptions/:user_id/all`](/enterprise-api/account-activity/delete-subscription) |
587-
| Creates a replay job | [`POST /2/account_activity/replay/webhooks/:webhook_id/subscriptions/all`](/enterprise-api/account-activity/create-replay-job) |
582+
| Subscribes an application to an account's events | [`POST /2/account_activity/webhooks/:webhook_id/subscriptions/all`](/x-api/account-activity/create-subscription) |
583+
| Returns a count of currently active subscriptions | [`GET /2/account_activity/subscriptions/count`](/x-api/account-activity/get-subscription-count) |
584+
| Checks if a webhook is subscribed to an account | [`GET /2/account_activity/webhooks/:webhook_id/subscriptions/all`](/x-api/account-activity/validate-subscription) |
585+
| Returns a list of currently active subscriptions | [`GET /2/account_activity/webhooks/:webhook_id/subscriptions/all/list`](/x-api/account-activity/get-subscriptions) |
586+
| Deactivates a subscription using app-only OAuth | [`DELETE /2/account_activity/webhooks/:webhook_id/subscriptions/:user_id/all`](/x-api/account-activity/delete-subscription) |
587+
| Creates a replay job | [`POST /2/account_activity/replay/webhooks/:webhook_id/subscriptions/all`](/x-api/account-activity/create-replay-job) |
588588

589-
For webhook management endpoints (register, view, validate, delete), see the [V2 Webhooks API documentation](/enterprise-api/webhooks/introduction).
589+
For webhook management endpoints (register, view, validate, delete), see the [V2 Webhooks API documentation](/x-api/webhooks/introduction).
590590

591591
---
592592

@@ -602,16 +602,16 @@ For webhook management endpoints (register, view, validate, delete), see the [V2
602602
</Note>
603603

604604
<CardGroup cols={2}>
605-
<Card title="Quickstart" icon="rocket" href="/enterprise-api/account-activity/quickstart">
605+
<Card title="Quickstart" icon="rocket" href="/x-api/account-activity/quickstart">
606606
Set up subscriptions and start receiving events
607607
</Card>
608-
<Card title="Webhooks API" icon="webhook" href="/enterprise-api/webhooks/introduction">
608+
<Card title="Webhooks API" icon="webhook" href="/x-api/webhooks/introduction">
609609
Register and manage your webhooks
610610
</Card>
611-
<Card title="Migration guide" icon="right-left" href="/enterprise-api/account-activity/migrate/overview">
611+
<Card title="Migration guide" icon="right-left" href="/x-api/account-activity/migrate/overview">
612612
Migrate from legacy Enterprise to v2
613613
</Card>
614-
<Card title="Activity stream" icon="bars-staggered" href="/enterprise-api/activity/introduction">
614+
<Card title="Activity stream" icon="bars-staggered" href="/x-api/activity/introduction">
615615
Streaming alternative to webhooks
616616
</Card>
617617
</CardGroup>

enterprise-api/account-activity/migrate/overview.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ This guide helps you migrate from the legacy Enterprise Account Activity API to
1717

1818
| V1.1 Endpoint | V2 Equivalent / Action | Notes |
1919
| ----- | ----- | ----- |
20-
| POST /1.1/account\_activity/webhooks.json?url=\<URL\> | POST /2/webhooks | [Docs](https://docs.x.com/enterprise-api/webhooks/introduction). Requires OAuth2AppOnly. |
21-
| GET /1.1/account\_activity/webhooks.json | GET /2/webhooks | [Docs](https://docs.x.com/enterprise-api/webhooks/introduction). Requires OAuth2AppOnly. |
22-
| PUT /1.1/account\_activity/webhooks/:webhook\_id.json | PUT /2/webhooks/:webhook\_id | Triggers CRC. [Docs](https://docs.x.com/enterprise-api/webhooks/introduction). Requires OAuth2AppOnly. |
23-
| DELETE /1.1/account\_activity/webhooks/:webhook\_id.json | DELETE /2/webhooks/:webhook\_id | [Docs](https://docs.x.com/enterprise-api/webhooks/introduction). Requires OAuth2AppOnly. |
20+
| POST /1.1/account\_activity/webhooks.json?url=\<URL\> | POST /2/webhooks | [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
21+
| GET /1.1/account\_activity/webhooks.json | GET /2/webhooks | [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
22+
| PUT /1.1/account\_activity/webhooks/:webhook\_id.json | PUT /2/webhooks/:webhook\_id | Triggers CRC. [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
23+
| DELETE /1.1/account\_activity/webhooks/:webhook\_id.json | DELETE /2/webhooks/:webhook\_id | [Docs](https://docs.x.com/x-api/webhooks/introduction). Requires OAuth2AppOnly. |
2424
| POST /1.1/account\_activity/webhooks/:webhook\_id/subscriptions/all.json | POST /2/account\_activity/webhooks/:webhook\_id/subscriptions/all | Requires OAuthUser. |
2525
| GET /1.1/account\_activity/subscriptions/count.json | GET /2/account\_activity/subscriptions/count | Requires OAuth2AppOnly. |
2626
| GET /1.1/account\_activity/webhooks/:webhook\_id/subscriptions/all.json | GET /2/account\_activity/webhooks/:webhook\_id/subscriptions/all | Requires OAuthUser. |
@@ -30,7 +30,7 @@ This guide helps you migrate from the legacy Enterprise Account Activity API to
3030

3131
* **Response Formats**: Review the success and error response structures in the AAAPI documentation.
3232

33-
When migrating, update your code to use the new base paths, adjust authentication flows, and manage webhooks using the [V2 Webhooks API](https://docs.x.com/enterprise-api/webhooks/introduction).
33+
When migrating, update your code to use the new base paths, adjust authentication flows, and manage webhooks using the [V2 Webhooks API](https://docs.x.com/x-api/webhooks/introduction).
3434

3535
### How to Migrate
3636

@@ -49,7 +49,7 @@ When migrating, update your code to use the new base paths, adjust authenticatio
4949
* Client ID and Client Secret.
5050
* **Verify or Reconfigure Your Webhook**:
5151
* Use your existing webhook URL or set up a new one (e.g., https://your\_domain.com/webhook/twitter).
52-
* Follow the [V2 Webhooks API documentation](https://docs.x.com/enterprise-api/webhooks/introduction) to register and manage your webhook.
52+
* Follow the [V2 Webhooks API documentation](https://docs.x.com/x-api/webhooks/introduction) to register and manage your webhook.
5353
* **Sample Apps:**
5454
* [Simple webhook server](https://github.com/m-rosinsky/XWebhookTest/blob/main/app.py)
5555
* A single python script that shows you how to respond to the CRC check and accept POST events.

enterprise-api/account-activity/quickstart.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The Account Activity API is available on the Enterprise and Pay Per Use tiers. S
2727

2828
## 3. Register a webhook
2929

30-
To receive Account Activity events, you must register a webhook with a publicly accessible HTTPS URL. See the [V2 Webhooks API documentation](/enterprise-api/webhooks/introduction) for details on developing a webhook consumer app, registering a webhook, securing it, and handling Challenge-Response Checks (CRC).
30+
To receive Account Activity events, you must register a webhook with a publicly accessible HTTPS URL. See the [V2 Webhooks API documentation](/x-api/webhooks/introduction) for details on developing a webhook consumer app, registering a webhook, securing it, and handling Challenge-Response Checks (CRC).
3131

3232
- Ensure your webhook is configured to handle POST requests with JSON-encoded event payloads.
3333
- Obtain the **`webhook_id`** from the webhook registration response, as it is required for managing subscriptions.
@@ -62,7 +62,7 @@ Once you have a registered webhook with a valid `webhook_id`, you can manage use
6262

6363
### Adding a subscription
6464

65-
**Endpoint:** `POST /2/account_activity/webhooks/:webhook_id/subscriptions/all`[API Reference](/enterprise-api/account-activity/create-subscription)
65+
**Endpoint:** `POST /2/account_activity/webhooks/:webhook_id/subscriptions/all`[API Reference](/x-api/account-activity/create-subscription)
6666

6767
Subscribes the authenticating user to receive events via the specified webhook.
6868

@@ -100,7 +100,7 @@ curl --request POST \
100100

101101
### Checking a subscription
102102

103-
**Endpoint:** `GET /2/account_activity/webhooks/:webhook_id/subscriptions/all`[API Reference](/enterprise-api/account-activity/validate-subscription)
103+
**Endpoint:** `GET /2/account_activity/webhooks/:webhook_id/subscriptions/all`[API Reference](/x-api/account-activity/validate-subscription)
104104

105105
Checks if the authenticating user is subscribed to the specified webhook.
106106

@@ -136,7 +136,7 @@ curl --request GET \
136136

137137
### Removing a subscription
138138

139-
**Endpoint:** `DELETE /2/account_activity/webhooks/:webhook_id/subscriptions/:user_id/all`[API Reference](/enterprise-api/account-activity/delete-subscription)
139+
**Endpoint:** `DELETE /2/account_activity/webhooks/:webhook_id/subscriptions/:user_id/all`[API Reference](/x-api/account-activity/delete-subscription)
140140

141141
Deactivates the subscription for a specific user ID, stopping event delivery to the webhook.
142142

@@ -174,7 +174,7 @@ curl --request DELETE \
174174

175175
### Viewing all subscriptions
176176

177-
**Endpoint:** `GET /2/account_activity/webhooks/:webhook_id/subscriptions/all/list`[API Reference](/enterprise-api/account-activity/get-subscriptions)
177+
**Endpoint:** `GET /2/account_activity/webhooks/:webhook_id/subscriptions/all/list`[API Reference](/x-api/account-activity/get-subscriptions)
178178

179179
Retrieves a list of all user IDs currently subscribed to the specified webhook.
180180

@@ -216,7 +216,7 @@ curl --request GET \
216216

217217
### Subscription count
218218

219-
**Endpoint:** `GET /2/account_activity/subscriptions/count`[API Reference](/enterprise-api/account-activity/get-subscription-count)
219+
**Endpoint:** `GET /2/account_activity/subscriptions/count`[API Reference](/x-api/account-activity/get-subscription-count)
220220

221221
Returns the total count of active subscriptions and the provisioned limit for the authenticating application.
222222

@@ -251,7 +251,7 @@ DM-only subscriptions are no longer supported. The `subscriptions_count_direct_m
251251

252252
AAAv2 provides replay functionality that allows you to retrieve past events for a specified time range and re-deliver them to your webhook. This is useful for recovering missed events due to downtime.
253253

254-
**Endpoint:** `POST /2/account_activity/replay/webhooks/:webhook_id/subscriptions/all`[API Reference](/enterprise-api/account-activity/create-replay-job)
254+
**Endpoint:** `POST /2/account_activity/replay/webhooks/:webhook_id/subscriptions/all`[API Reference](/x-api/account-activity/create-replay-job)
255255

256256
**Authentication:** OAuth2 App Only Bearer Token.
257257

@@ -344,16 +344,16 @@ In the event your job does not complete successfully, X will return the followin
344344
## Next steps
345345

346346
<CardGroup cols={2}>
347-
<Card title="Introduction" icon="book" href="/enterprise-api/account-activity/introduction">
347+
<Card title="Introduction" icon="book" href="/x-api/account-activity/introduction">
348348
Activity types, data objects, and payload examples
349349
</Card>
350-
<Card title="Webhooks API" icon="webhook" href="/enterprise-api/webhooks/introduction">
350+
<Card title="Webhooks API" icon="webhook" href="/x-api/webhooks/introduction">
351351
Register and manage your webhooks
352352
</Card>
353-
<Card title="Migration guide" icon="right-left" href="/enterprise-api/account-activity/migrate/overview">
353+
<Card title="Migration guide" icon="right-left" href="/x-api/account-activity/migrate/overview">
354354
Migrate from legacy Enterprise to v2
355355
</Card>
356-
<Card title="Webhook quickstart" icon="rocket" href="/enterprise-api/webhooks/quickstart">
356+
<Card title="Webhook quickstart" icon="rocket" href="/x-api/webhooks/quickstart">
357357
CRC setup, security, and webhook registration
358358
</Card>
359359
</CardGroup>

enterprise-api/activity/introduction.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A developer can subscribe to events they are interested in such as `profile.upda
1515
The X Activity API currently supports the following delivery mechanisms to send events to your app:
1616

1717
- Persistent HTTP stream
18-
- [Webhook](/enterprise-api/webhooks/introduction)
18+
- [Webhook](/x-api/webhooks/introduction)
1919

2020
## Supported Event Types
2121

@@ -96,7 +96,7 @@ News events provide updates on trending topics and headlines curated by Grok.
9696
In future releases, XAA will expand to support additional event types including social interactions, content engagement, monetization features, and more. We will continue to update our docs when new event types become available.
9797

9898
<Note>
99-
**Note:** XAA does not deliver posts. For real-time post delivery, see our [Filtered Stream](/enterprise-api/posts/filtered-stream/introduction) endpoint, which allows developers to filter for and stream posts in real-time.
99+
**Note:** XAA does not deliver posts. For real-time post delivery, see our [Filtered Stream](/x-api/posts/filtered-stream/introduction) endpoint, which allows developers to filter for and stream posts in real-time.
100100
</Note>
101101

102102
## Event Privacy and Authentication
@@ -136,11 +136,11 @@ The X Activity API has different subscription limits based on your account tier:
136136

137137
| Method | Endpoint | Description |
138138
|:-------|:---------|:------------|
139-
| GET | [`/2/activity/stream`](/enterprise-api/activity/activity-stream) | Connect to activity stream |
140-
| POST | [`/2/activity/subscriptions`](/enterprise-api/activity/create-x-activity-subscription) | Create a subscription |
141-
| GET | [`/2/activity/subscriptions`](/enterprise-api/activity/get-x-activity-subscriptions) | List subscriptions |
142-
| PUT | [`/2/activity/subscriptions/:id`](/enterprise-api/activity/update-x-activity-subscription) | Update a subscription |
143-
| DELETE | [`/2/activity/subscriptions/:id`](/enterprise-api/activity/deletes-x-activity-subscription) | Delete a subscription |
139+
| GET | [`/2/activity/stream`](/x-api/activity/activity-stream) | Connect to activity stream |
140+
| POST | [`/2/activity/subscriptions`](/x-api/activity/create-x-activity-subscription) | Create a subscription |
141+
| GET | [`/2/activity/subscriptions`](/x-api/activity/get-x-activity-subscriptions) | List subscriptions |
142+
| PUT | [`/2/activity/subscriptions/:id`](/x-api/activity/update-x-activity-subscription) | Update a subscription |
143+
| DELETE | [`/2/activity/subscriptions/:id`](/x-api/activity/deletes-x-activity-subscription) | Delete a subscription |
144144

145145
<Note>
146146
**Account setup**
@@ -150,11 +150,11 @@ To access these endpoints, you will need:
150150
* An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info).
151151
* To authenticate using the keys and tokens from a [developer App](/resources/fundamentals/developer-apps) that is located within a [Project](/resources/fundamentals/projects).
152152

153-
Learn more about getting access to the X API v2 endpoints in our [getting started guide](/enterprise-api/getting-started/getting-access).
153+
Learn more about getting access to the X API v2 endpoints in our [getting started guide](/x-api/getting-started/getting-access).
154154
</Note>
155155

156156
<div className="flex">
157-
<Button href="/enterprise-api/activity/quickstart">
157+
<Button href="/x-api/activity/quickstart">
158158
Quick start
159159
</Button>
160160
</div>

enterprise-api/activity/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Upon successful request, your subscription will be created:
108108
109109
## Getting the events
110110
111-
Once we have created the subscription, we can receive the events via [webhooks](https://docs.x.com/enterprise-api/webhooks/introduction) or a persistent HTTP stream. In this example, we will open the persistent HTTP stream:
111+
Once we have created the subscription, we can receive the events via [webhooks](https://docs.x.com/x-api/webhooks/introduction) or a persistent HTTP stream. In this example, we will open the persistent HTTP stream:
112112
113113
```bash
114114
curl -H "Authorization: Bearer YOUR_BEARER_TOKEN" https://api.x.com/2/activity/stream
@@ -158,7 +158,7 @@ curl -H "Authorization: Bearer YOUR_BEARER_TOKEN" \
158158
159159
<Note>
160160
- The `tag` field is optional. This can be used to help identify events on delivery.
161-
- The `webhook_id` field is also optional. See our [webhook docs](https://docs.x.com/enterprise-api/webhooks/introduction) for help setting up a webhook. If a `webhook_id` is specified, the event will be delivered to the provided webhook, in addition to the stream if it is open.
161+
- The `webhook_id` field is also optional. See our [webhook docs](https://docs.x.com/x-api/webhooks/introduction) for help setting up a webhook. If a `webhook_id` is specified, the event will be delivered to the provided webhook, in addition to the stream if it is open.
162162
</Note>
163163
164164
**Response:**
@@ -285,10 +285,10 @@ curl -H "Authorization: Bearer YOUR_BEARER_TOKEN" \
285285
## Next steps
286286
287287
<CardGroup cols={2}>
288-
<Card title="API Reference" icon="code" href="/enterprise-api/activity/activity-stream">
288+
<Card title="API Reference" icon="code" href="/x-api/activity/activity-stream">
289289
Full endpoint documentation
290290
</Card>
291-
<Card title="Webhooks" icon="webhook" href="/enterprise-api/webhooks/introduction">
291+
<Card title="Webhooks" icon="webhook" href="/x-api/webhooks/introduction">
292292
Set up webhook delivery
293293
</Card>
294294
</CardGroup>

0 commit comments

Comments
 (0)