Skip to content
Docs menu

Authentication

Create workspace API keys and choose the permissions your integration needs.

On this page

Create and use a key

Choose a workspace, then open Settings → API keys as an admin or owner. Name the key, assign access, and store the value when it appears. The ph_ key is shown once. Posthoop stores its hash and a short prefix.

Send the key in the Authorization header over HTTPS. The key determines the workspace. Keep it in a server-side environment variable or secret store.

HTTP
Authorization: Bearer <your Posthoop API key>

Key roles and permissions

Access in SettingsRoleWhat the key can do
Read onlyviewerRead accounts, media, posts, analytics, scheduling, webhooks, and delivery history.
PublishingeditorRead data, use groups and presets, upload or import media, create and validate posts, edit and cancel posts, and reorder the queue.
Publishing adminadminEverything in Publishing, plus manage groups and presets, replace the weekly schedule, delete media, and manage webhooks.

REST permissions come from the key role. MCP OAuth grants have Publishing access by default. Workspace admins and owners can also grant admin tools for schedule changes, account management, sync flows, and manual analytics refreshes. Creating or revoking keys and connecting social accounts require the corresponding dashboard permissions.

Rotate or revoke

Create a replacement key in the same workspace, update the integration, and verify it with GET /api/v1/accounts. Revoke the old key in Settings. Subsequent requests using it return 401.

On a self-hosted checkout with database access, the key creation script also accepts viewer, editor, or admin. It defaults to editor if you omit the role.

Shell
pnpm api-key:create <workspace-id> "Local automation" editor