API Reference
REST API Overview
Programmatic access to workspaces, post sets, approvals, scheduling, media, and analytics under /api/v1.
Authentication & Headers
All API routes live under /api/v1. Authenticate with either a workspace API key or a user Bearer JWT in the Authorization header.
Browser clients proxy through /api/mera/<path> with httpOnly session cookies and must include the CSRF header X-Mera-Client: web on state-changing requests.
curl-example.sh
curl -X GET "https://sparlby.com/api/v1/workspaces" \
-H "Authorization: Bearer $SPARLBY_API_KEY" \
-H "Accept: application/json"Core endpoints
Below are the primary resource endpoints exposed by the Sparlby API v1:
GET
/api/v1/workspacesList workspaces accessible to the callerGET
/api/v1/workspaces/{ws}/accountsList connected social accounts and health statusGET
/api/v1/workspaces/{ws}/postsList post sets and account variantsPOST
/api/v1/workspaces/{ws}/postsCreate a new post set with per-account variantsPOST
/api/v1/workspaces/{ws}/posts/{id}/request-approvalDispatch approval cards to paired channelsPOST
/api/v1/workspaces/{ws}/approvals/{id}/decideRecord an explicit approve or reject decisionPOST
/api/v1/workspaces/{ws}/publishing/scheduleSchedule an approved variant with staggered jitterGET
/api/v1/workspaces/{ws}/analytics/overviewFetch workspace-wide impressions and engagementGET
/api/v1/workspaces/{ws}/mcp/serversList connected external MCP serversSigned webhooks
Sparlby signs every outbound webhook event using HMAC-SHA256 in the Mera-Signature header (t=<timestamp>,v1=<hex_digest>) so you can verify payload authenticity before processing.