The Socialit API authenticates every request with a workspace API key. The key itself determines which workspace you’re acting on — there is no separate workspace header to send.
Create an API key
- Sign in to the Socialit app.
- Go to Settings → API keys.
- Click Create key, give it a name, and copy the secret.
The full secret (
sk_live_...) is shown only once, at creation time. Store it somewhere safe. If you lose it, revoke the key and create a new one.
API keys are admin-only to create and revoke, and each key is scoped to a single workspace.
Authenticate requests
Send the key as a Bearer token in the Authorization header:
curl https://api.socialit.com/v1/posts \
-H "Authorization: Bearer sk_live_your_key_here"
If the header is missing or the key is invalid or revoked, the API responds with 401 Unauthorized:
{ "error": "Unauthorized" }
Key format
- Production keys start with
sk_live_. - Test/non-production keys start with
sk_test_.
Treat keys like passwords: never commit them to source control or expose them in client-side code.