API Reference

Authentication

Every public UniPost API request uses Bearer authentication with your API key. If the key is missing, malformed, revoked, or from the wrong environment, the request fails before any business logic runs.

How it works

Send your UniPost API key in the Authorization header as Bearer <key>. Keys are workspace-scoped and can be generated from the UniPost dashboard.

curl https://api.unipost.dev/v1/social-accounts \
  -H "Authorization: Bearer up_live_xxxx"

Key types

PrefixEnvironmentUse case
up_live_ProductionReal publishing and production traffic
up_test_TestDevelopment, staging, and non-production integration work

Best practices

  • Store keys in environment variables, not in client-side source code or version control.
  • Use different keys for staging and production to keep telemetry and quota usage separate.
  • Rotate keys if a credential is exposed or if a teammate no longer needs access.

Common failures

HTTPCodeWhat it usually means
401UNAUTHORIZEDThe API key is missing, invalid, or revoked
403FORBIDDENThe key is valid but the workspace or plan does not allow the action
429RATE_LIMITEDThe key exceeded request limits for the current time window