API docs

PeakX API reference.

REST endpoints, JSON responses, and bearer-token auth.

Authentication

Authorization: Bearer YOUR_API_KEY

Base URL: https://api.peakx.so

GET/v1/analytics

Fetch follower growth, impressions, and engagement metrics.

Query params

periodstring7d | 30d | 90d (default: 30d)

Response example

{
  "followers": 4821,
  "follower_growth_7d": 143,
  "avg_impressions": 8420,
  "engagement_rate": 0.042
}
POST/v1/posts

Publish a post immediately to your connected X account.

Body params

textstringPost content (max 280 chars)
account_idstringID of connected X account

Response example

{
  "id": "post_01J5X...",
  "status": "published",
  "url": "https://x.com/..."
}
POST/v1/schedule

Schedule a post for a future time.

Body params

textstringPost content
scheduled_atISO 8601e.g. 2026-08-01T09:00:00Z
account_idstringID of connected X account

Response example

{
  "id": "scheduled_01J5X...",
  "status": "scheduled",
  "scheduled_at": "2026-08-01T09:00:00Z"
}
GET/v1/voice

Retrieve your trained voice profile as a system prompt fragment.

Response example

{
  "voice_prompt": "Write in a direct, confident tone...",
  "trained_at": "2026-07-10T12:00:00Z"
}

Rate limits

100 requests per minute per API key. Exceeding the limit returns 429.