Authentication

API keys, bearer tokens, and key rotation.

Updated May 12, 2026·1 min read

The Unison API uses bearer-token authentication. Every request must include an Authorization: Bearer <key> header. Requests without one return a 401.

Generating a key

  1. 1
    Open Settings → API keys in the dashboard.
  2. 2
    Click Create key, give it a name, and pick the scopes you need.
  3. 3
    The key is shown once. Copy it into your secret store immediately.

Key format

Keys look like unison_live_<32 chars> for production and unison_test_<32 chars> for the sandbox environment. The prefix lets you spot at a glance which environment a key belongs to.

bash
curl https://api.unison.ink/v1/me \
  -H "Authorization: Bearer unison_live_d3f8a..."

Scopes

ScopePurpose
posts:writeCreate, update, and delete scheduled posts.
posts:readRead post status and history.
inbox:readRead unified-inbox messages.
inbox:writeReply to inbox messages.
analytics:readRead aggregated analytics.

Rotating a key

API keys can be rotated without downtime: create a new key, deploy it, and revoke the old one. There is no expiry on keys by default. We recommend rotating every 90 days regardless.

Treat keys like passwords. Never commit them, never log them, and never share them in support tickets. If a key leaks, revoke it immediately from the dashboard.

Was this helpful?