Build with the API

A REST API at https://api.socialcrm.org/v1 authenticated with API keys. Same account, same plan limits, your data.

Quickstart

First, create an API key in your SocialCRM account, under Settings, API keys. Then list your posts:

curl https://api.socialcrm.org/v1/posts \
  -H "Authorization: Bearer sk_live_..."
const res = await fetch("https://api.socialcrm.org/v1/posts", {
  headers: { Authorization: "Bearer sk_live_..." },
});
const { data } = await res.json();

Authentication

Send your key in the Authorization header on every request:

Authorization: Bearer sk_live_...

You can also send it as X-API-Key: sk_live_.... Keys are bound to one workspace and act as you, within your plan limits.

A key is shown in full only once, when you create it. Store it somewhere safe. If you lose it, revoke it and create a new one.

Scopes

Each key carries a set of scopes. A call that needs a scope your key does not hold returns forbidden_scope.

ScopeWhat it allows
insights:readRead analytics, persona, trending, and connected accounts
posts:readRead posts and drafts
posts:writeCreate and edit draft posts
posts:publishSchedule and publish posts (paid)
ai:generateGenerate AI content (paid, uses quota)
media:writeUpload media (paid)

Rate limits

Each key may make up to 600 requests per minute. Past that, requests return 429 with the standard error envelope:

{"error":{"code":"rate_limited","message":"Too many requests. Slow down and retry."}}

Errors

Every error uses the same envelope:

{"error":{"code":"forbidden_scope","message":"This key cannot publish posts."}}
CodeHTTPMeaning
unauthorized401Missing or invalid key
forbidden_scope403Key lacks the required scope
payment_required402Action needs a paid plan
quota_exceeded402Plan quota for this action is used up
rate_limited429Too many requests for this key
not_found404Resource does not exist
invalid_request400Malformed or missing parameters

Pagination

List endpoints take limit (default 20, max 50) and offset. Results come back under a data array:

{"data":[{"id":"post_123"},{"id":"post_124"}]}

Endpoints

Posts

MethodPathScopeDescription
GET/v1/postsposts:readList posts
POST/v1/postsposts:writeCreate a draft post
GET/v1/posts/{id}posts:readGet one post
PATCH/v1/posts/{id}posts:writeUpdate a post
DELETE/v1/posts/{id}posts:writeDelete a post
POST/v1/posts/{id}/scheduleposts:publishSchedule a post
POST/v1/posts/{id}/publishposts:publishPublish a post now
GET/v1/posts/{id}/analyticsinsights:readGet post analytics

AI

MethodPathScopeDescription
POST/v1/ai/rewriteai:generateRewrite text in your voice
POST/v1/ai/composeai:generateCompose a post from a prompt
POST/v1/ai/hashtagsai:generateSuggest hashtags
POST/v1/ai/threadai:generateExpand into a thread
POST/v1/ai/ideasai:generateGenerate content ideas
POST/v1/ai/optimiseai:generateOptimise a post for reach

Data

MethodPathScopeDescription
GET/v1/accountsinsights:readList connected social accounts
GET/v1/accounts/analyticsinsights:readGet account analytics
GET/v1/personainsights:readGet your brand persona
GET/v1/trendinginsights:readList trending topics

Media

MethodPathScopeDescription
POST/v1/media/upload-urlmedia:writeRequest a presigned upload URL
POST/v1/media/{id}/confirmmedia:writeConfirm a finished upload

Example: create a post

curl -X POST https://api.socialcrm.org/v1/posts \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"body":"Launch day is here.","account_ids":["acct_1"]}'

# 201 Created
# {"id":"post_123","status":"draft","body":"Launch day is here."}

Example: rewrite with AI

curl -X POST https://api.socialcrm.org/v1/ai/rewrite \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"text":"buy now","tone":"friendly"}'

# 200 OK
# {"data":{"text":"Grab yours today, we would love to have you."}}

Try it

Run a read-only GET against the live API with your own key, right here.

Your key stays in your browser. It is sent only to this API as the Authorization header, never to us, and never stored.