Resources
OpenAPI
Download the Onepostly OpenAPI spec, generate a client from it, and find the docs formats for AI tools.
The API is described by one OpenAPI 3.1 document. The SDKs and the API Reference are generated from it, so they always match what the API accepts and returns.
Download the Spec
curl -o onepostly-openapi.json https://api.onepostly.com/openapi.jsonIt is also at https://onepostly.com/openapi.json. Neither needs an API key.
| Part | Contains |
|---|---|
paths | Every API-key route, with its operationId and tag |
components.schemas | Request and response objects, plus Error and ErrorCode |
components.parameters | Shared ones, such as cursor, limit and Idempotency-Key |
components.securitySchemes | Authorization: Bearer. See Authentication |
servers | https://api.onepostly.com |
webhooks | Every event sent to your endpoint. See below |
Every route in it works with an API key, since dashboard-only routes are left out. New fields, routes and events can appear at any time. See the Changelog.
Generate a Client
The SDKs cover TypeScript and Python. For another language, use any OpenAPI 3.1 code generator. This example builds a Go client.
npx @openapitools/openapi-generator-cli generate \
-i https://api.onepostly.com/openapi.json \
-g go \
-o ./onepostly-go| Tip | Why |
|---|---|
| Generate from a saved copy | Your client changes only when you update it |
| Keep unknown fields | Objects can gain fields at any time |
| Keep open enums open | See Open Enums |
Send Idempotency-Key on POST | A retry never runs twice. See Idempotency |
Webhooks in the Spec
The webhooks section has one entry per event type, such as post.published. Each entry has the delivery headers and the body schema.
| Part | Contains |
|---|---|
| Headers | The Onepostly-* delivery headers and User-Agent |
| Body | A schema per event, such as PostPublishedEvent |
| Responses | Any 2xx acknowledges it. See Delivery |
Generate your handler's types from these schemas, then verify the signature. Each event also has its own API Reference page.
Open Enums
A response field with listed values can gain new ones at any time, so handle a value you do not know. In the spec, it is anyOf the known values and any other string.
{
"anyOf": [
{ "type": "string", "enum": ["scheduled", "publishing", "published", "failed", "cancelled", "deleted"] },
{ "type": "string" }
]
}Error code values are open too. Request fields are closed, and an unlisted value returns 400 VALIDATION_ERROR. See Data Formats for every open field.
Docs for AI Tools
Point an AI assistant at these to write code against the current API.
| URL | Contains |
|---|---|
/llms.txt | Every page's title and description, with spec and docs links |
/llms-full.txt | Every docs page as Markdown, in one file |
/docs/<page>.md | One page as Markdown, such as /docs/quickstart.md |
Add .md to any docs URL for its Markdown, and the introduction is at /docs.md. Each page also has a Copy Markdown button under its title.
To let an assistant act on your workspace, connect the MCP Server.