Documentation

API Reference

Use the PostPiper REST API to manage connected accounts, drafts, publishing, scheduling, and images.

Base URLhttps://api.postpiper.ai/v1

OpenAPIDownload the OpenAPI specification for API clients and AI agents.

AuthenticationBearer $POSTPIPER_API_KEYCreate an API key

Terminal
curl -H "Authorization: Bearer $POSTPIPER_API_KEY" \
  "https://api.postpiper.ai/v1/accounts"

Accounts

Posts

Media

Errors

Use the HTTP status and error.code to handle failures; include request_id when contacting support.

Successful response · 200

Example from GET /accounts?platform=x.

JSON
{
  "accounts": [
    {
      "id": "<account-uuid>",
      "platform": "x",
      "platform_user_id": "123456789",
      "platform_username": "example",
      "platform_display_name": "Example",
      "platform_avatar_url": null
    }
  ]
}

Error response · 400

Example from an invalid platform query value.

JSON
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Request validation failed",
    "request_id": "req-123"
  }
}

HTTP status and error codes

HTTP statusWhen it occursExample error.code
400Invalid parameters or post contentINVALID_REQUEST, INVALID_CONTENT
401Missing or invalid API keyUNAUTHORIZED
403API key lacks the required scopeFORBIDDEN
404Resource or route not foundPOST_NOT_FOUND, ROUTE_NOT_FOUND
409Post or upload is in the wrong statePOST_NOT_DRAFT
413 / 415File too large / unsupported media typeMEDIA_TOO_LARGE / INVALID_MEDIA_REQUEST
429Upload or platform rate limitMEDIA_RATE_LIMITED, X_RATE_LIMITED
500 / 502 / 503Server, upstream, or service failureINTERNAL_ERROR, X_PUBLISH_FAILED, SERVICE_UNAVAILABLE