Documentation
API Reference
Last updated: March 5, 2026
post2all API Documentation
Base URL:
https://api.post2all.com/api/v1Authentication: API key viax-api-keyheader
Authentication
All requests require an API key passed in the x-api-key header.
curl -H "x-api-key: amp_your_key_here" https://api.post2all.com/api/v1/accounts
API keys are created in Settings → API Keys within your workspace. Each key is scoped to a specific organization and user.
Endpoints
GET /api/v1/accounts
List connected social accounts for your organization.
Response
{
"accounts": [
{
"id": "acc_123",
"platform": "twitter",
"platformAccountId": "123456",
"username": "@post2all",
"displayName": "post2all",
"avatarUrl": "https://...",
"status": "active",
"supportedPostTypes": {
"text": true,
"image": true,
"video": true
},
"createdAt": "2026-01-15T10:00:00.000Z"
}
]
}
curl
curl -H "x-api-key: amp_xxx" https://api.post2all.com/api/v1/accounts
POST /api/v1/posts
Create and schedule/publish a post. Uses multipart/form-data to support inline media upload.
Form Fields
| Field | Type | Required | Description |
|---|---|---|---|
type | "text" | "image" | "video" | ✅ | Post type |
content | string | ✅ for text | Post text content |
socialAccountIds | JSON array | ✅ | ["acc_id1", "acc_id2"] |
status | "draft" | "scheduled" | — | Default: "scheduled" |
scheduledAt | ISO 8601 date | — | When to publish. Omit or use now for immediate |
accountSettings | JSON object | — | Per-account overrides (see below) |
media | File(s) | For image/video | One or more image/* or video/* files |
Account Settings Schema
{
"acc_id1": {
"caption": "Custom caption for this account",
"title": "Video title",
"description": "Video description",
"tags": ["tag1", "tag2"],
"privacyStatus": "public",
"categoryId": "22",
"topicTag": "topic"
}
}
Response (201)
{
"post": {
"id": "post_abc",
"type": "text",
"content": "Hello from API",
"status": "scheduled",
"scheduledAt": "2026-03-01T00:00:00.000Z",
"createdAt": "2026-02-28T10:00:00.000Z",
"mediaCount": 0,
"accountCount": 2
}
}
curl Examples
Text post (publish immediately):
curl -X POST -H "x-api-key: amp_xxx" \
-F 'type=text' \
-F 'content=Hello from the post2all API! 🚀' \
-F 'socialAccountIds=["acc_id1","acc_id2"]' \
https://api.post2all.com/api/v1/posts
Image post with media:
curl -X POST -H "x-api-key: amp_xxx" \
-F 'type=image' \
-F 'content=Check out this photo' \
-F 'socialAccountIds=["acc_id1"]' \
-F 'media=@./photo.jpg' \
https://api.post2all.com/api/v1/posts
Video post with scheduled time:
curl -X POST -H "x-api-key: amp_xxx" \
-F 'type=video' \
-F 'content=New video!' \
-F 'socialAccountIds=["acc_id1"]' \
-F 'media=@./video.mp4' \
-F 'scheduledAt=2026-03-01T12:00:00Z' \
-F 'accountSettings={"acc_id1":{"title":"My Video","privacyStatus":"public"}}' \
https://api.post2all.com/api/v1/posts
Multiple images:
curl -X POST -H "x-api-key: amp_xxx" \
-F 'type=image' \
-F 'content=Photo dump' \
-F 'socialAccountIds=["acc_id1"]' \
-F 'media=@./photo1.jpg' \
-F 'media=@./photo2.jpg' \
-F 'media=@./photo3.jpg' \
https://api.post2all.com/api/v1/posts
Save as draft:
curl -X POST -H "x-api-key: amp_xxx" \
-F 'type=text' \
-F 'content=Work in progress' \
-F 'socialAccountIds=["acc_id1"]' \
-F 'status=draft' \
https://api.post2all.com/api/v1/posts
GET /api/v1/posts
List posts for your organization with pagination.
Query Parameters
| Param | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
limit | number | 20 | Items per page (max 100) |
status | string | — | Filter by status: draft, scheduled, published, partially_failed, failed |
type | string | — | Filter by type: text, image, video |
Response
{
"posts": [
{
"id": "post_abc",
"type": "text",
"content": "Hello world",
"status": "published",
"scheduledAt": "2026-02-28T10:00:00.000Z",
"publishedAt": "2026-02-28T10:00:05.000Z",
"createdAt": "2026-02-28T09:00:00.000Z",
"accounts": [
{
"id": "acc_id1",
"platform": "twitter",
"username": "@post2all",
"displayName": "post2all",
"status": "published",
"platformPostUrl": "https://x.com/post2all/status/123",
"error": null
}
]
}
],
"pagination": {
"page": 1,
"limit": 20,
"hasMore": false
}
}
curl
curl -H "x-api-key: amp_xxx" \
"https://api.post2all.com/api/v1/posts?status=published&limit=10"
GET /api/v1/posts/:id
Get detailed information about a specific post.
Response
{
"post": {
"id": "post_abc",
"type": "image",
"content": "Photo caption",
"media": [
{ "type": "image", "path": "org/user/abc-photo.jpg" }
],
"status": "published",
"scheduledAt": "2026-02-28T10:00:00.000Z",
"publishedAt": "2026-02-28T10:00:05.000Z",
"createdAt": "2026-02-28T09:00:00.000Z",
"updatedAt": "2026-02-28T10:00:05.000Z",
"accounts": [
{
"id": "acc_id1",
"platform": "twitter",
"platformAccountId": "123456",
"username": "@post2all",
"displayName": "post2all",
"avatarUrl": "https://...",
"status": "published",
"platformPostId": "123456789",
"platformPostUrl": "https://x.com/post2all/status/123456789",
"error": null,
"publishedAt": "2026-02-28T10:00:05.000Z"
}
]
}
}
curl
curl -H "x-api-key: amp_xxx" https://api.post2all.com/api/v1/posts/post_abc
Typical Agent Workflow
- Get accounts →
GET /api/v1/accountsto discover connected platforms - Create post →
POST /api/v1/postswith content, media, and target account IDs - Check status →
GET /api/v1/posts/:idto monitor publish results per platform
Supported Platforms
| Platform | Text | Image | Video |
|---|---|---|---|
| Twitter / X | ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ | |
| YouTube | ❌ | ❌ | ✅ |
| ❌ | ✅ | ✅ | |
| ✅ | ✅ | ✅ | |
| Threads | ✅ | ✅ | ✅ |
| Bluesky | ✅ | ✅ | ❌ |
| ✅ | ✅ | ✅ |
Error Codes
All errors return this shape:
{ "error": { "code": "ERROR_CODE", "message": "Human-readable message" } }
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | Missing or invalid API key |
EXPIRED_API_KEY | 401 | API key has expired |
RATE_LIMITED | 429 | Too many requests |
FORBIDDEN | 403 | Key doesn't have org access |
INVALID_REQUEST | 400 | Malformed body or missing required fields |
INVALID_ACCOUNTS | 400 | One or more socialAccountIds don't belong to your org |
UNSUPPORTED_MEDIA | 400 | File type not image/* or video/* |
POST_NOT_FOUND | 404 | Post ID not found |
INTERNAL_ERROR | 500 | Server error |