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.
| Property | Value |
|---|---|
| Header name | Authorization |
| Format | Bearer sd_live_xxxx... |
| Scope | One key per workspace |
| Generated in | Dashboard → Settings → API |
# All requests must include this header
Authorization: Bearer sd_live_xxxx...Rate Limits
Rate limits are enforced per workspace, per minute. When you exceed a limit the API returns HTTP 429.
| Plan | Requests / min | API Access |
|---|---|---|
| FREE | — | No API access |
| BUILD | 100 | Enabled |
| ACCELERATE | 500 | Enabled |
| UNLIMITED | 1,000 | Enabled |
Rate limit headers
Every response includes these headers:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Max requests allowed per window |
| X-RateLimit-Remaining | Requests remaining in current window |
| X-RateLimit-Reset | Unix 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.
/api/v1/accountsList all connected accounts/api/v1/accounts/connectMust use dashboard OAuth flow/api/v1/accounts/{id}Disconnect an accountExample — 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.
/api/v1/{platform}/posts/publishPublish a post immediately/api/v1/{platform}/posts/scheduleSchedule a post for later/api/v1/{platform}/postsList posts for a platform/api/v1/{platform}/posts/{id}Retrieve a single post/api/v1/{platform}/posts/{id}Delete a postExample — 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.
/api/v1/{platform}/draftsCreate a draft/api/v1/{platform}/draftsList drafts for a platform/api/v1/{platform}/drafts/{id}Delete a draftExample — 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.
/api/v1/mediaUpload media from a URLRequest 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.
/api/v1/{platform}/analytics/accountAccount-level analytics for a platform/api/v1/analytics/workspaceWorkspace-wide analytics summaryExample — 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.
/api/v1/{platform}/commentsList comments on platform posts/api/v1/{platform}/comments/replyReply to a comment/api/v1/{platform}/messagesList direct messages/api/v1/{platform}/messages/replyReply to a direct messageExample — 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.
/api/v1/webhooksRegister a new webhook/api/v1/webhooksList registered webhooks/api/v1/webhooks/{id}Delete a webhookSupported events
| Event | Triggered when |
|---|---|
| post_published | A scheduled post is successfully published |
| post_failed | A post fails to publish |
| new_comment | A new comment is received on a post |
| new_message | A 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": {}
}| Status | Meaning | Common cause |
|---|---|---|
| 400 | Bad Request | Invalid or missing request body fields |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Valid key but insufficient permissions or plan |
| 404 | Not Found | Resource does not exist in this workspace |
| 429 | Too Many Requests | Rate limit exceeded — check X-RateLimit-Reset |
| 500 | Internal Server Error | Unexpected 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.
| Platform | Text | Images | Video | Carousel | Scheduling | Analytics |
|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| ✓ | ✓ | ✓ | ✗ | ✓ | ✓ | |
| Threads | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ |
| TikTok | ✗ | ✗ | ✓ | ✗ | ✓ | ✓ |
| ✓ | ✓ | ✗ | ✗ | ✓ | ✗ | |
| 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.
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