Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

REST API

Base URL: https://<your-host>/public/v1 (locally, http://localhost:5000/public/v1).

The paths and bodies follow Postiz’s public API, so most clients written for it only need a new base URL and key. The CLI and MCP server go through the same code, so behaviour is identical everywhere.

Authentication

Send the organization API key on every request, in either form:

Authorization: Bearer <api-key>
Authorization: <api-key>

Keys never go in URLs. Create and rotate them with rustiz org create and rustiz org rotate-key <org-id> (see CLI).

Rate limits

RouteDefault per hourSetting
POST /public/v1/posts90 per organizationAPI_LIMIT
/mcp and every other /public/v1 route10,000 per organizationREQUEST_LIMIT
POST /oauth/authorize, /oauth/register30 per client addressfixed
POST /oauth/token120 per client addressfixed

0 turns a limit off. Counts are kept per process.

Errors

Errors are JSON with an error message. Status codes: 400 bad request, 401 missing or invalid key, 404 not found, 409 the post is being published right now (retry later), 429 rate limited.

Posts

MethodPathNotes
GET/posts?startDate=&endDate=&customer=ISO 8601 window; returns { posts: [...] }
POST/postsCreate posts (body below). Uses API_LIMIT
GET/posts/{id}One post with its channel
PUT/posts/{id}Edit in place; omitted fields keep their value
PUT/posts/{id}/date{ date, publish?, republish? }
DELETE/posts/{id}Deletes the post and the rest of its group
DELETE/posts/group/{group}Deletes a whole group
GET/posts/{id}/missingRecent platform posts, for linking a post whose release id is missing
PUT/posts/{id}/release-idSet the platform post id manually
GET/find-slot/{channelId}Next free posting slot

Create a scheduled post with a reply:

curl -sS -X POST "$RUSTIZ_URL/public/v1/posts" \
  -H "Authorization: Bearer $RUSTIZ_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "type": "schedule",
    "date": "2030-01-01T09:00:00Z",
    "shortLink": false,
    "tags": [],
    "posts": [{
      "integration": { "id": "<channel id>" },
      "value": [
        { "content": "<p>We just shipped.</p>", "image": [] },
        { "content": "<p>Docs: https://example.com/docs</p>", "image": [] }
      ],
      "settings": {}
    }]
  }'

type is draft, schedule or now. value[0] is the post and the other entries are replies. inter (a number of days) repeats the post. The response lists { postId, integration, group } for each created post.

Published posts can’t be edited, because platforms keep the original. Use republish with a date to publish one again. A post in ERROR may already be live, so check the platform before you retry with publish. Deleting a post here does not remove it from the platform.

Channels (integrations)

MethodPathNotes
GET/integrationsConnected channels
DELETE/integrations/{id}Disconnect
GET/is-connectedChecks the API key
GET/providersEvery provider with its connection mode
GET/providers/statusReadiness: configured, missing env var names
POST/integrations/{provider}/connectStart a headless connection: { externalUrl?, customFields?, name?, description? }
GET/integrations/connect/{connectionId}Poll a pending connection
GET/social/{provider}Raw OAuth start URL (what Postiz returns)
GET/integration-settings/{id}The channel’s settings schema and rules
POST/integrations/{id}/timeReplace posting times
POST/integrations/{id}/mentionsLook up mentionable accounts

A connection either returns { connected: true, ... } or { connected: false, pending: true, connectionId, url, message }. Hand the url to a human, then poll. See the provider overview for each connection mode.

Media

MethodPathNotes
POST/uploadMultipart, field file (png, jpg, gif, webp, mp4, mov, webm, pdf)
POST/upload-from-url{ "url": "https://..." }
GET/media?page=Media library
GET/media/{id}/statusProcessing state
DELETE/media/{id}Removes it from the library

The size limit is MAX_UPLOAD_MB (default 1024). The upload rules are in Self-hosting §5.5.

Analytics and notifications

MethodPathNotes
GET/analytics/{channelId}?date=<days>Channel analytics
GET/analytics/post/{postId}?date=<days>Post analytics
GET/notificationsRecent notifications

Workspace

MethodPath
GET POST PUT/webhooks
DELETE/webhooks/{id}
POST/webhooks/send
GET POST/tags · PUT DELETE /tags/{id}
GET POST PUT/sets · DELETE /sets/{id}
GET POST/signatures · GET /signatures/default · PUT DELETE /signatures/{id}
GET/customers · PUT /customers/{id}

Debugging

MethodPath
GET/debug/posts/{id} (timeline of one post)
GET/debug/account
GET/debug/channels
GET/debug/activity

Outside /public/v1

PathPurpose
GET /healthReturns ok
/mcpMCP endpoint (MCP setup)
GET /integrations/social/{provider}OAuth callback that platforms redirect to
/.well-known/oauth-*, /oauth/*MCP OAuth
/uploads/*Local media, when UPLOAD_DIRECTORY is set