ChirpieDocs
API Reference

Posts

Create, list, retrieve, and delete posts via the Chirpie API.

Create a Post

Posts are published immediately by default. Add schedule_at to schedule for later.

POST /api/v1/posts
Authorization: Bearer chirpie_sk_YOUR_KEY
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
account_idstring (UUID)YesID of the connected X account
textstringYesPost content (1-280 characters)
media_urlsstring[]NoUp to 4 public image/video URLs (see Media below)
schedule_atstring (ISO 8601)NoSchedule for a future time

Media Support

Pass public URLs in media_urls. Chirpie downloads, validates, and uploads them to X automatically.

TypeFormatsMax SizePer Post
ImagesJPEG, PNG, WebP, GIF5 MBUp to 4
VideoMP4, MOV512 MB1 per post

For scheduled posts, media is downloaded and stored immediately (URLs may expire before publish time). Media is uploaded to X at publish time and cleaned up after.

Example

curl -X POST https://chirpie.ai/api/v1/posts \
  -H "Authorization: Bearer chirpie_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "550e8400-e29b-41d4-a716-446655440000",
    "text": "Shipping new features today!",
    "media_urls": ["https://example.com/screenshot.png"],
    "schedule_at": "2026-04-01T14:00:00Z"
  }'

Response 201 Created

{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "550e8400-e29b-41d4-a716-446655440000",
    "text": "Shipping new features today!",
    "media_urls": null,
    "platform_post_id": null,
    "status": "scheduled",
    "scheduled_at": "2026-04-01T14:00:00.000Z",
    "published_at": null,
    "thread_id": null,
    "thread_order": null,
    "error_message": null,
    "created_at": "2026-03-23T10:00:00.000Z"
  }
}

Error Responses

StatusCodeCondition
400bad_requestInvalid text, missing fields, or schedule_at in the past
401unauthorizedInvalid or missing API key
404not_foundAccount not found or inactive
429rate_limitedMonthly post limit exceeded
502upstream_errorX API returned an error

List Posts

GET /api/v1/posts
Authorization: Bearer chirpie_sk_YOUR_KEY

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Results per page (max 100)
offsetinteger0Pagination offset
statusstringFilter: draft, scheduled, publishing, published, failed, deleted
account_idstringFilter by X account UUID

Example

curl "https://chirpie.ai/api/v1/posts?status=published&limit=10" \
  -H "Authorization: Bearer chirpie_sk_YOUR_KEY"

Response 200 OK

{
  "data": [
    {
      "id": "a1b2c3d4-...",
      "text": "Hello world!",
      "status": "published",
      "platform_post_id": "1234567890",
      "published_at": "2026-03-23T10:01:00.000Z",
      ...
    }
  ]
}

Get a Post

GET /api/v1/posts/:id
Authorization: Bearer chirpie_sk_YOUR_KEY

Response 200 OK

Returns a single post object (same shape as list items).

StatusCodeCondition
404not_foundPost doesn't exist or belongs to another user

Delete a Post

DELETE /api/v1/posts/:id
Authorization: Bearer chirpie_sk_YOUR_KEY

If the post was published on X, Chirpie also deletes it from X. If the X deletion fails, the post is still marked as deleted in Chirpie.

Response 200 OK

{
  "data": {
    "id": "a1b2c3d4-...",
    "deleted": true
  }
}

On this page