PostKing Docs
API and CLI

API keys

Create pk_live keys, choose read or read and write access, and call the PostKing API from scripts and tools.

Use an API key when a script, Zapier or your own agent should create and publish content. To use PostKing from Claude, ChatGPT or Cursor, use the connector instead; it needs no key.

Create a key

  1. Open Account, then API keys (/dashboard/account/api-keys).
  2. Choose Create key.
  3. Name it after where it will be used, for example "Zapier production".
  4. Pick access:
    • Read & write: can create, schedule and publish.
    • Read only: can list and view, nothing else.
  5. Copy the key now. The full key is shown once.

Keys start with pk_live_. Send it as a bearer token:

curl -H "Authorization: Bearer pk_live_..." https://try.postking.app/api/agent/v1/health

Manage keys

The key list is grouped by origin:

  • Created by you: keys from the Create key dialog.
  • CLI sessions: added when you sign in with the CLI or the browser extension.
  • OAuth tokens: issued to apps you connected, such as an assistant connector.

Rename a key, view its usage, or revoke it. Revoking is immediate and cannot be undone: anything using the key stops working. Keys unused for 90 days are flagged so you can review and revoke them.

Errors you may see

  • A read-only key calling a write endpoint is rejected; use a read and write key.
  • An expired trial returns TRIAL_EXPIRED; upgrade to continue.
  • Calls are rate limited per key.

Where the spec lives

  • OpenAPI: https://try.postking.app/api/agent/v1/openapi.json
  • Base URL: https://try.postking.app/api/agent/v1

CLI · Connect an assistant

On this page