RokData

API

REST endpoints for integrations.

Read workspace metrics, smartlinks, and posts — or create scheduled drafts — with bearer tokens. Health is public; everything else requires authentication.

GET /api/v1/health

Public liveness check. No authentication required.

curl https://rokdata.co.uk/api/v1/health

Returns ok, service name, version, and server time as JSON.

GET /api/v1/metrics

Deep Metrics summary for the token's organization — health score plus social, SEO, and security counts.

curl -H "Authorization: Bearer YOUR_TOKEN" https://rokdata.co.uk/api/v1/metrics

GET /api/v1/smartlinks

List smartlink pages with item, click, and lead counts.

curl -H "Authorization: Bearer YOUR_TOKEN" https://rokdata.co.uk/api/v1/smartlinks

GET /api/v1/posts

Latest social posts across brands in the workspace (up to 50).

curl -H "Authorization: Bearer YOUR_TOKEN" https://rokdata.co.uk/api/v1/posts

POST /api/v1/posts

Create a draft or scheduled post. JSON body requires brand_id, network, and body; optional scheduled_at.

curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"brand_id":1,"network":"linkedin","body":"Hello from the API"}' \
  https://rokdata.co.uk/api/v1/posts

Authentication

Send Authorization: Bearer <token> or pass ?api_token=<token> on GET requests.

Note: API tokens are created by platform admins in Admin → Organizations (or the org API token panel when enabled). There is no self-serve token UI in the product yet — ask your install admin for a token.

Need a token for your workspace?

Contact your platform admin or get in touch if you run your own install.