Skip to content
Relay Port

Get started

Authentication

API keys for live and test data, the scopes a key can hold, brand restrictions, and the operations that need a signed-in session.

Every request carries an API key as a bearer token in the Authorization header:

curl -X POST https://api.relayport.dev/posts \
  -H "Authorization: Bearer $RELAYPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: winter-menu-2026-12-01" \
  -d '{
    "mode": "schedule",
    "scheduledAt": "2026-12-01T09:00:00+09:00",
    "text": "Our winter menu is here.",
    "media": [
      { "mediaId": "0193d29f-0c4a-7e21-a5b8-2c9d8e7f6a01" },
      { "mediaId": "0193d29f-0c4a-7e22-b6c9-3d0e9f8a7b02" }
    ],
    "platformData": { "instagram": { "contentType": "carousel" } },
    "targets": [
      { "accountId": "0193c8e1-77a2-7b05-8d14-6a5b4c3d2e10" },
      { "accountId": "0193c8e1-77a2-7b06-9e25-7b6c5d4e3f21" }
    ]
  }'

A request without a valid key answers 401 Unauthenticated, and a key that is unknown, revoked or cut short answers 401 InvalidApiKey.

Live and test keys

  • rp_live_ keys read and write live data: real accounts and real posts.
  • rp_test_ keys see only test accounts, such as sandbox accounts, and the posts made to them. A live key never sees them, and a post made in one mode is not found in the other.

Scopes

A key holds a set of scopes, and an operation it is not allowed to call answers 403 Forbidden with the missing scope in details.requiredScope. The table under this guide lists every scope, read from the OpenAPI document, with the operations that need it. GET /api-keys/scopes returns the same list for a workspace, with the scopes its plan and modules allow.

posts:publish is separate from posts:write. A key with only posts:write can create drafts and schedule posts, but mode: "publish_now", POST /posts/{id}/publish and POST /posts/{id}/retry need posts:publish as well.

Brands

A key can be limited to some of the workspace's brands. Accounts, posts, queues and media of the other brands answer 404 NotFound, as if they did not exist.

Workspace

A key belongs to one workspace, so the X-Workspace-Id header is optional. When you send it, it must name the key's workspace.

Session-only operations

Managing API keys, members, invites and workspaces takes a signed-in Dashboard session, and an API key is refused there. The reference marks those operations as session only.

Keeping keys safe

  • The full key is shown once, when you create or rotate it. Keep it in a secret store, never in client code or a repository.
  • Rotate a key with POST /api-keys/{id}/rotate and revoke one with DELETE /api-keys/{id}.
  • Give each integration its own key with only the scopes it needs, so you can revoke one without stopping the others.

Scopes

ScopeOperations
accounts:read
accounts:manage
webhooks:read
posts:read
media:write
posts:write
posts:publish
usage:read
webhooks:write