API Reference
Accounts
List and connect X (Twitter) accounts to post through Chirpie.
List Connected Accounts
GET /api/v1/accounts
Authorization: Bearer chirpie_sk_YOUR_KEYResponse 200 OK
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"x_user_id": "123456789",
"x_username": "chirpie_ai",
"x_display_name": "Chirpie",
"x_profile_image_url": "https://pbs.twimg.com/...",
"is_active": true,
"created_at": "2026-03-01T00:00:00.000Z"
}
]
}Account Fields
| Field | Description |
|---|---|
id | Chirpie account UUID — use this as account_id when creating posts |
x_user_id | X/Twitter numeric user ID |
x_username | X handle (without @) |
x_display_name | Display name on X |
x_profile_image_url | Profile picture URL |
is_active | true if OAuth tokens are valid. false if tokens expired and need re-authorization |
If is_active is false, the account's OAuth tokens have expired. The user needs to re-authorize from the dashboard.
Connect an Account
POST /api/v1/accounts
Authorization: Bearer chirpie_sk_YOUR_KEYNo request body is required.
Response 200 OK
{
"data": {
"authorization_url": "https://twitter.com/i/oauth2/authorize?..."
}
}How it Works
- Call
POST /api/v1/accounts - Redirect the user to the returned
authorization_url - User authorizes Chirpie on X
- X redirects to Chirpie's callback URL
- Chirpie stores the encrypted OAuth tokens
- The account appears in
GET /api/v1/accounts
Account Limits
| Plan | Max X Accounts |
|---|---|
| Free | 1 |
| Starter | 3 |
| Pro | 10 |
| Scale | 25 |
| Enterprise | Unlimited |