Build on SocialAgentry

Two ways in, one key. Create an access key in Settings → AI assistant access (keys look like sam_… and are scoped to one brand). The same key works for the REST API and the MCP server. Everything created through the API lands in the normal review queue — your approval flow stays in charge.

Partner REST API

Base URL https://socialagentry.com/api/partner/v1 — send the key on every call:

Authorization: Bearer sam_your_key_here

(Clients that can't set headers may use ?key=sam_... — prefer the header; URLs end up in logs.) Errors are always { "error": "message" } with 400/401/404/429/502. No idempotency keys — after a timeout, list posts before retrying to avoid duplicates.

GET/overview

Brand snapshot: post counts per status, AI budget, channels and whether they publish live.

GET/posts?status=PUBLISHED&limit=20

List posts with engagement metrics. Statuses: DRAFT, IN_REVIEW, APPROVED, SCHEDULED, PUBLISHED, REJECTED, FAILED.

POST/posts

Push your own text as a draft into the review queue. Limits: hashtags max 15, mediaUrls max 8 (https), link truncated at 500 chars; the body must respect the platform's character limit (400 explains any rejection).
{
  "body": "Excited to announce ...",
  "platform": "linkedin",
  "hashtags": ["compliance"],
  "link": "https://example.com",
  "mediaUrls": ["https://.../image.png"]
}

POST/generate

Ask SocialAgentry's AI to write drafts (same engine and daily budget as the app). Synchronous — usually under a minute, but set your client timeout to 300s. Returns 429 when the brand's daily AI budget is spent, 502 if generation fails. count: 1–10.
{ "topic": "our new whitepaper on Oracle audits", "count": 3, "platforms": ["linkedin", "x"] }

GET/summary

30-day KPIs for dashboards: publish volume, engagement totals, next scheduled post, latest AI performance brief.

GET/webhooks

List registered webhooks.

POST/webhooks

Get notified when posts publish or fail. The signing secret is returned once. Max 10 webhooks per brand; url must be https.
{ "url": "https://your-tool.com/hooks/socialagentry", "events": ["post.published", "post.failed"] }
Each delivery is a JSON POST with headers x-socialagentry-signature = hex(HMAC-SHA256(secret, raw body)) — verify it (constant-time, raw bytes) before trusting the payload — and x-socialagentry-event naming the event. One delivery attempt, 10s timeout, no retries.
{ "event": "post.published", "timestamp": "...", "data": { "postId": "...", "platform": "LinkedIn", "live": true, "url": "https://... or null", "preview": "first 140 chars" } }
{ "event": "post.failed",    "timestamp": "...", "data": { "postId": "...", "platform": "LinkedIn", "error": "why it failed", "preview": "first 140 chars" } }

DELETE/webhooks/:id

Remove a webhook.

MCP server (for AI assistants)

The same brand key connects Claude, ChatGPT, or any MCP-capable tool directly to your workspace over Streamable HTTP:

https://socialagentry.com/api/mcp
Authorization: Bearer sam_your_key_here   (or ?key=sam_...)

Tools: get_overview, generate_posts, create_draft (push your own text), list_posts, approve_posts, schedule_best_times, publish_post, get_performance. Every action respects the brand's approval lifecycle, AI budget, and audit log.

Need a key?

Sign in, open Settings → AI assistant access, and create one per tool you connect. Keys are shown once and can be revoked anytime.