API Documentation

Quickstart

Get up and running with the SocialDock API in under two minutes.

1. Get your API key

Navigate to your dashboard and open Settings → API. Click Generate new key. Keys are prefixed sd_live_ for production and sd_test_ for sandbox. Copy it immediately — it will not be shown again.

2. Make your first API call

curl -X GET https://api.socialdock.com/api/v1/accounts \
  -H "Authorization: Bearer sd_live_xxxx..."

3. Response envelope

All responses follow a consistent envelope format:

{
  "data": [ ... ],
  "error": null,
  "meta": {
    "total": 3,
    "page": 1
  }
}

Authentication

SocialDock uses API key authentication via the HTTP Authorization header.

PropertyValue
Header nameAuthorization
FormatBearer sd_live_xxxx...
ScopeOne key per workspace
Generated inDashboard → Settings → API
# All requests must include this header
Authorization: Bearer sd_live_xxxx...
Keep your key secret. Never expose it in client-side code or public repositories. Rotate it immediately from Settings → API if it is compromised.

Rate Limits

Rate limits are enforced per workspace, per minute. When you exceed a limit the API returns HTTP 429.

PlanRequests / minAPI Access
FREENo API access
BUILD100Enabled
ACCELERATE500Enabled
UNLIMITED1,000Enabled

Rate limit headers

Every response includes these headers:

HeaderDescription
X-RateLimit-LimitMax requests allowed per window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the window resets

API Reference

The base URL for all endpoints is https://api.socialdock.com. Replace {platform} with one of: facebook, instagram, linkedin, threads, tiktok, reddit, telegram, youtube.

Accounts

Accounts represent connected social media profiles in your workspace. Connections must be established through the SocialDock dashboard OAuth flow — they cannot be created via the API.

GET/api/v1/accountsList all connected accounts
POST/api/v1/accounts/connectMust use dashboard OAuth flow
DELETE/api/v1/accounts/{id}Disconnect an account
Example — List accounts
curl -X GET https://api.socialdock.com/api/v1/accounts \
  -H "Authorization: Bearer sd_live_xxxx..."
Response
{
  "data": [
    {
      "id": "acc_01hx...",
      "platform": "instagram",
      "username": "@yourbrand",
      "displayName": "Your Brand",
      "connectedAt": "2026-01-15T10:30:00Z"
    }
  ],
  "error": null,
  "meta": { "total": 1 }
}

Posts

Publish or schedule content to any connected platform account.

POST/api/v1/{platform}/posts/publishPublish a post immediately
POST/api/v1/{platform}/posts/scheduleSchedule a post for later
GET/api/v1/{platform}/postsList posts for a platform
GET/api/v1/{platform}/posts/{id}Retrieve a single post
DELETE/api/v1/{platform}/posts/{id}Delete a post
Example — Publish a post
curl -X POST https://api.socialdock.com/api/v1/instagram/posts/publish \
  -H "Authorization: Bearer sd_live_xxxx..." \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_01hx...",
    "content": "Hello from SocialDock!",
    "mediaUrls": ["https://example.com/image.jpg"]
  }'
Example — Schedule a post
curl -X POST https://api.socialdock.com/api/v1/linkedin/posts/schedule \
  -H "Authorization: Bearer sd_live_xxxx..." \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_01hx...",
    "content": "Exciting news coming soon!",
    "scheduledAt": "2026-04-01T09:00:00Z"
  }'
Response
{
  "data": {
    "id": "post_01hy...",
    "platform": "instagram",
    "status": "published",
    "content": "Hello from SocialDock!",
    "publishedAt": "2026-03-16T12:00:00Z",
    "platformPostId": "17854..."
  },
  "error": null,
  "meta": {}
}

Drafts

Save post drafts before publishing. Drafts are stored per platform and are never published automatically.

POST/api/v1/{platform}/draftsCreate a draft
GET/api/v1/{platform}/draftsList drafts for a platform
DELETE/api/v1/{platform}/drafts/{id}Delete a draft
Example — Create a draft
curl -X POST https://api.socialdock.com/api/v1/twitter/drafts \
  -H "Authorization: Bearer sd_live_xxxx..." \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_01hx...",
    "content": "Work in progress — do not publish yet.",
    "mediaUrls": []
  }'

Media

Upload media assets by providing a publicly accessible URL. SocialDock fetches, validates, and stores the asset for use in posts.

POST/api/v1/mediaUpload media from a URL
Request body
{
  "url": "https://example.com/photo.jpg"
}
Response
{
  "data": {
    "id": "med_01hz...",
    "url": "https://cdn.socialdock.com/med_01hz.jpg",
    "mimeType": "image/jpeg",
    "sizeBytes": 204800,
    "uploadedAt": "2026-03-16T12:00:00Z"
  },
  "error": null,
  "meta": {}
}

Analytics requires addon

Analytics endpoints are available on plans with the Analytics add-on enabled.

GET/api/v1/{platform}/analytics/accountAccount-level analytics for a platform
GET/api/v1/analytics/workspaceWorkspace-wide analytics summary
Example — Account analytics
curl -X GET "https://api.socialdock.com/api/v1/instagram/analytics/account?accountId=acc_01hx...&from=2026-03-01&to=2026-03-16" \
  -H "Authorization: Bearer sd_live_xxxx..."
Response
{
  "data": {
    "followers": 12480,
    "followersGrowth": 3.2,
    "impressions": 84200,
    "reach": 61000,
    "engagementRate": 4.7,
    "posts": 18
  },
  "error": null,
  "meta": { "from": "2026-03-01", "to": "2026-03-16" }
}

Comments & Messages requires addon

Manage comments and direct messages from connected accounts. Requires the Comments + DMs add-on.

GET/api/v1/{platform}/commentsList comments on platform posts
POST/api/v1/{platform}/comments/replyReply to a comment
GET/api/v1/{platform}/messagesList direct messages
POST/api/v1/{platform}/messages/replyReply to a direct message
Example — Reply to a comment
curl -X POST https://api.socialdock.com/api/v1/instagram/comments/reply \
  -H "Authorization: Bearer sd_live_xxxx..." \
  -H "Content-Type: application/json" \
  -d '{
    "commentId": "cmt_01ha...",
    "accountId": "acc_01hx...",
    "message": "Thanks for the kind words!"
  }'

Webhooks

Receive real-time event notifications by registering a webhook endpoint. SocialDock will send a signed HTTP POST to your URL for each subscribed event.

POST/api/v1/webhooksRegister a new webhook
GET/api/v1/webhooksList registered webhooks
DELETE/api/v1/webhooks/{id}Delete a webhook
Supported events
EventTriggered when
post_publishedA scheduled post is successfully published
post_failedA post fails to publish
new_commentA new comment is received on a post
new_messageA new direct message is received
Register a webhook
curl -X POST https://api.socialdock.com/api/v1/webhooks \
  -H "Authorization: Bearer sd_live_xxxx..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/socialdock",
    "events": ["post_published", "post_failed"],
    "secret": "your_signing_secret"
  }'
Signature verification (HMAC SHA-256)

Every webhook request includes an X-SocialDock-Signature header. Verify it to ensure the payload is authentic.

// Node.js example
const crypto = require("crypto");

function verifyWebhook(rawBody, signature, secret) {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(expected, "hex"),
    Buffer.from(signature, "hex")
  );
}

// In your Express handler:
app.post("/webhooks/socialdock", (req, res) => {
  const sig = req.headers["x-socialdock-signature"];
  const valid = verifyWebhook(req.rawBody, sig, process.env.WEBHOOK_SECRET);
  if (!valid) return res.status(401).send("Invalid signature");
  // handle event...
  res.sendStatus(200);
});

Errors

All errors use the same response envelope. The data field will be null and error will be populated.

Error envelope

{
  "data": null,
  "error": {
    "message": "Account not found",
    "details": "No account with id acc_01hx... exists in this workspace."
  },
  "meta": {}
}
StatusMeaningCommon cause
400Bad RequestInvalid or missing request body fields
401UnauthorizedMissing or invalid API key
403ForbiddenValid key but insufficient permissions or plan
404Not FoundResource does not exist in this workspace
429Too Many RequestsRate limit exceeded — check X-RateLimit-Reset
500Internal Server ErrorUnexpected server error — contact support

Example — 401 Unauthorized

{
  "data": null,
  "error": {
    "message": "Unauthorized",
    "details": "The provided API key is invalid or has been revoked."
  },
  "meta": {}
}

Example — 429 Rate Limit

{
  "data": null,
  "error": {
    "message": "Too Many Requests",
    "details": "Rate limit of 100 requests/min exceeded. Retry after 2026-03-16T12:01:00Z."
  },
  "meta": {
    "retryAfter": "2026-03-16T12:01:00Z"
  }
}

Platform Capabilities

Not all features are available on every platform. This table shows what the SocialDock API supports per platform.

PlatformTextImagesVideoCarouselSchedulingAnalytics
Facebook
Instagram
LinkedIn
Threads
TikTok
Reddit
Telegram
YouTube

Analytics support requires the Analytics add-on. Platform capabilities may change as platform APIs evolve.


Changelog

A history of API changes. Backwards-incompatible changes will be announced with a deprecation period.

v1.0.0March 2026Initial release

First public release of the SocialDock REST API.

  • GET /api/v1/accounts — list connected accounts
  • DELETE /api/v1/accounts/{id} — disconnect an account
  • POST /api/v1/{platform}/posts/publish — publish immediately
  • POST /api/v1/{platform}/posts/schedule — schedule for later
  • GET/DELETE /api/v1/{platform}/posts, /api/v1/{platform}/posts/{id}
  • POST/GET/DELETE /api/v1/{platform}/drafts
  • POST /api/v1/media — media upload via URL
  • GET /api/v1/{platform}/analytics/account (Analytics add-on)
  • GET /api/v1/analytics/workspace (Analytics add-on)
  • GET/POST /api/v1/{platform}/comments, /comments/reply (Comments add-on)
  • GET/POST /api/v1/{platform}/messages, /messages/reply (Comments add-on)
  • POST/GET/DELETE /api/v1/webhooks

Need help?

If you run into any issues or have questions about the API, reach out to our team.

Contact Support