API reference

Every endpoint of the Postel API v1, with links to the guide that covers it.

Base URL https://www.postel.app/api. Every request needs an API key. Request and response bodies are JSON.

The machine-readable description is an OpenAPI 3.1 spec at https://www.postel.app/api/v1/openapi.json. Load it into Postman, Insomnia or a client generator.

Account

MethodPathWhat it does
GET/v1/meThe person and workspace the key acts for, and whether the plan can publish. Authentication
GET/v1/channelsThe networks Postel posts to and whether each is connected. Quickstart

Posts

MethodPathWhat it does
GET/v1/postsList posts, newest first. Pagination
GET/v1/posts/{id}Get one post. Read posts
POST/v1/postsCreate a draft, or schedule or publish it right away. Create a post
POST/v1/posts/generateWrite a post in your voice from a prompt and save it as a draft. Write in your voice
POST/v1/posts/{id}/scheduleSchedule a draft. Schedule a draft
POST/v1/posts/{id}/publishPublish a draft within a minute. Publish now

Viral posts

MethodPathWhat it does
GET/v1/viral/postsSearch posts and videos that took off. Find viral posts
GET/v1/viral/posts/{id}Get one viral post or video. Find viral posts
GET/v1/viral/formatsList the formats viral posts keep using. Formats
POST/v1/viral/takesWrite your take on a viral post or format, one draft per network. Write your take

Events

MethodPathWhat it does
GET/v1/eventsPoll for published posts, failed posts, ready drafts and new viral posts. Polling events

Headers

HeaderDirectionWhat it does
AuthorizationRequestBearer pstl_.... Required. Authentication
Idempotency-KeyRequestMakes POST /v1/posts, POST /v1/posts/generate and POST /v1/viral/takes safe to retry. Idempotency
X-Postel-ClientRequestOptional. Your app's name and version. Authentication
X-Request-IdBothNames the request. Quote it when you contact support. Request IDs
Retry-AfterResponseSeconds to wait after a 429. Rate limits
Idempotent-ReplayedResponsetrue when the response is a replay of an earlier request. Idempotency

On this page