Authentication
All endpoints require a Bearer token in the Authorization header. Generate API keys in your workspace settings.
Authorization: Bearer apionics_live_...
For mutating requests, send an Idempotency-Key header so retries do not create duplicate publish jobs.
Platform availability
| Platform | Status | Notes |
|---|---|---|
| Live | Publishing, scheduling, connected accounts | |
| Live | Publishing, scheduling, connected accounts | |
| Coming soon | Planned platform rollout | |
| TikTok | Coming soon | Planned platform rollout |
| YouTube | Coming soon | Planned platform rollout |
| Coming soon | Planned platform rollout | |
| Google Business | Coming soon | Planned platform rollout |
Endpoints
/v1/publishQueue content for one or more connected Instagram or Facebook accounts.
Request body
{
"content": "string (required)",
"platforms": ["instagram", "facebook"],
"accounts": ["acc_123"],
"schedule": "2026-06-01T09:00:00Z | "now"",
"media": ["media_456"]
}Response
{
"id": "post_789",
"status": "queued",
"scheduled_at": "2026-06-01T09:00:00Z",
"platforms": ["instagram", "facebook"],
"tasks": [
{ "account_id": "acc_123", "platform": "instagram", "status": "queued" }
]
}/v1/postsList all posts in the workspace with status, schedule, and platform breakdown.
Response
{
"posts": [
{
"id": "post_789",
"content": "Hello from Apionics",
"status": "published",
"platforms": ["instagram", "facebook"],
"created_at": "2026-05-31T10:00:00Z"
}
],
"total": 42
}/v1/posts/{post_id}Get detailed status of a single post, including per-account task results.
Response
{
"id": "post_789",
"content": "Hello from Apionics",
"status": "published",
"tasks": [
{ "account_id": "acc_123", "platform": "instagram", "status": "published", "published_at": "2026-05-31T10:00:05Z" }
]
}/v1/posts/{post_id}Cancel a scheduled post. Cannot delete already-published content.
Response
{ "success": true }/v1/accountsList connected social accounts with platform, status, and token health.
Response
{
"accounts": [
{
"id": "acc_123",
"platform": "instagram",
"username": "apionics",
"status": "active",
"token_expires_at": "2026-08-01T00:00:00Z"
}
]
}/v1/webhooksRegister a webhook endpoint for post status and approval events.
Request body
{
"url": "https://your-app.com/webhooks/apionics",
"events": ["publish.completed", "publish.failed", "approval.requested"],
"secret": "whsec_..."
}Response
{
"id": "wh_123",
"url": "https://your-app.com/webhooks/apionics",
"active": true
}Webhooks
Apionics sends signed webhook events when platform tasks complete, fail, or require approval. Treat webhooks as the source of truth for asynchronous publishing state.
| Event | Description |
|---|---|
| publish.completed | A publish task completed successfully for a platform/account pair. |
| publish.failed | A publish task failed after platform validation or retry handling. |
| approval.requested | A post requires workspace approval before it can be published. |
Errors
Error responses use a stable envelope. Retry transient failures with the same Idempotency-Key; do not retry validation or authorization errors without changing the request.
| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Invalid request body or missing required field. |
| 401 | Unauthorized | API key missing, invalid, or expired. |
| 403 | Forbidden | API key lacks required scope for this endpoint. |
| 404 | Not Found | Post, account, or webhook does not exist in this workspace. |
| 409 | Conflict | Duplicate request or conflicting state (e.g. post already published). |
| 429 | Rate Limited | Too many requests. Retry after the seconds specified in Retry-After header. |
| 500 | Internal Error | Platform API error or transient failure. Retry with exponential backoff. |
Error examples
Missing or invalid API key
{
"error": {
"code": "unauthorized",
"message": "API key missing, invalid, or expired."
}
}Duplicate idempotency key
{
"error": {
"code": "idempotency_conflict",
"message": "This Idempotency-Key was already used with a different request body."
}
}Validation error
{
"error": {
"code": "validation_error",
"message": "accounts must contain at least one connected account id.",
"field": "accounts"
}
}Rate limited
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after 30 seconds."
}
}Transient platform failure
{
"error": {
"code": "platform_error",
"message": "The platform API returned a transient error. Retry with the same Idempotency-Key."
}
}