The whole v1 API is described in one OpenAPI 3.1 document:
https://pogton.com/api/v1/openapi.json
It needs no API key. It covers every endpoint with its parameters, request bodies, responses and error codes, plus:
components.schemas.PlatformOptions: one schema per platform forplatform_options, built from the same definitions the API validates with.webhooks: the payload and headers of every webhook event.- The
Idempotency-Keyheader on the endpoints that accept it, and the rate limit headers on every response.
The document is generated from the API's own validation code, so it changes when the API does. Fields marked deprecated are kept for clients of the first API version.
Import into an API client
Postman, Insomnia, Bruno and Hoppscotch can import the URL directly. Set the Bearer token to your API key once at the collection level.
Generate a client
TypeScript types with openapi-typescript, and a small typed fetch client:
npx openapi-typescript https://pogton.com/api/v1/openapi.json -o pogton.d.ts
npm install openapi-fetch
import createClient from 'openapi-fetch'
import type { paths } from './pogton'
const pogton = createClient<paths>({
baseUrl: 'https://pogton.com/api/v1',
headers: { Authorization: `Bearer ${process.env.POGTON_KEY}` },
})
const { data, error } = await pogton.POST('/posts', {
body: { user_id: 'user_123', platforms: ['linkedin'], content: 'Hello', queue: true },
params: { header: { 'Idempotency-Key': crypto.randomUUID() } },
})
if (error) console.error(error.data.error.code)
else console.log(data.status, data.targets)
Other languages with OpenAPI Generator:
npx @openapitools/openapi-generator-cli generate \
-i https://pogton.com/api/v1/openapi.json \
-g python \
-o ./pogton-client
Replace python with go, java, ruby, php, csharp or any other generator. Pin the generated client in your repository and regenerate it when you need new fields.
For AI tools
Coding assistants work better with the spec in context. Point them at the URL above, or connect them to the MCP server to call the API directly.
