Getting Started
Create your API key and make your first API call in under 5 minutes.
Create your API key and make your first API call in under 5 minutes.
API and MCP access requires a Creator, Pro or Agency workspace. Keys are scoped to a workspace and its selected permissions; enable analytics:read if your integration needs statistics.
Your key will look like dpk_live_aBcDeFgHiJkL...
Store your API key securely. Never commit it to version control or share it publicly.
Make sure you have at least one social account connected in dopost. Then fetch your accounts:
curl -H "x-api-key: <apiKey>" \
https://dopost.co/api/v1/social/accountscurl -H "x-api-key: <apiKey>" \
https://dopost.co/api/v1/social/accountsResponse:
{
"accounts": [
{
"id": "cm3xyz789ghi012",
"platform": "LINKEDIN",
"platformUsername": "johndoe",
"platformUserId": "urn:li:person:a1B2c3D4e5"
}
]
}{
"accounts": [
{
"id": "cm3xyz789ghi012",
"platform": "LINKEDIN",
"platformUsername": "johndoe",
"platformUserId": "urn:li:person:a1B2c3D4e5"
}
]
}Copy the id of the account you want to publish to.
curl -X POST \
-H "x-api-key: <apiKey>" \
-H "Content-Type: application/json" \
-d '{
"accountId": "<accountId>",
"text": "Hello from the dopost API!"
}' \
https://dopost.co/api/v1/post/publishcurl -X POST \
-H "x-api-key: <apiKey>" \
-H "Content-Type: application/json" \
-d '{
"accountId": "<accountId>",
"text": "Hello from the dopost API!"
}' \
https://dopost.co/api/v1/post/publishResponse (202 Accepted):
{
"success": true,
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"postId": "cm3abc123def456",
"status": "processing"
}{
"success": true,
"jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"postId": "cm3abc123def456",
"status": "processing"
}Use the postId to check your post details:
curl -H "x-api-key: <apiKey>" \
https://dopost.co/api/v1/post/<postId>curl -H "x-api-key: <apiKey>" \
https://dopost.co/api/v1/post/<postId>Response:
{
"id": "cm3abc123def456",
"status": "PUBLISHED",
"platform": "LINKEDIN",
"text": "Hello from the dopost API!",
"postUrl": "https://linkedin.com/feed/update/urn:li:share:123456"
}{
"id": "cm3abc123def456",
"status": "PUBLISHED",
"platform": "LINKEDIN",
"text": "Hello from the dopost API!",
"postUrl": "https://linkedin.com/feed/update/urn:li:share:123456"
}n8n integration — Connect your account and automate publishing from workflows
Publish endpoint — Publishing, scheduling, replies, threads, and media
Get post — Retrieve post details and status by ID
Postman setup — Import our collection for quick testing
These errors can be returned by any endpoint:
| Status | Error | Cause |
|---|---|---|
401 | Invalid or missing API key | Bad or missing x-api-key header |
403 | API key does not have permission for this action | API key lacks the required scope for this endpoint. Check its permissions in Settings → API keys |
429 | Monthly post limit reached | Your plan's monthly post quota has been exceeded. Upgrade your plan or wait for the next billing cycle |
429 | Rate limit exceeded | Too many requests. Check X-RateLimit-* response headers and retry after the indicated time |