{"openapi":"3.1.0","info":{"title":"Automate10x Agentic Publishing API","version":"2.0.0","description":"Turn content into published posts across every platform. Multi-destination publish in one call, idempotent writes, dry-run validation, a capability manifest, and async jobs. Auth: `Authorization: Bearer sk_...`.","x-llms":"https://automate10x.com/llms-full.txt"},"servers":[{"url":"https://automate10x.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk_..."}},"schemas":{"ErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["auth_error","validation_error","not_found","rate_limited","insufficient_credits","platform_error","conflict","internal_error"]},"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"},"docs":{"type":"string"},"requestId":{"type":"string"}},"required":["type","code","message","requestId"]}}},"Target":{"type":"object","properties":{"accountId":{"type":"string","description":"A connected account id from GET /v2/accounts."},"text":{"type":"string","description":"Per-target text override (else top-level text is used)."},"media":{"type":"array","items":{"type":"string","format":"uri"}},"channelId":{"type":"string","description":"Page/board/playlist for this account (platform-agnostic). Routed to the post target channel and satisfies a platform’s page/board requirement without naming the per-platform option."},"options":{"type":"object","additionalProperties":true,"description":"Per-platform options validated against GET /v2/capabilities (pageId, boardId, privacyLevel, title, privacyStatus, altText, truncate, ...). Unknown keys are rejected."}},"required":["accountId"]}},"parameters":{"Limit":{"name":"limit","in":"query","schema":{"type":"integer","maximum":100},"description":"Opt into cursor pagination."},"Cursor":{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from a prior page."}}},"paths":{"/api/v2/users/me":{"get":{"operationId":"getMe","summary":"Verify the API key and return identity, plan, credits, scopes.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"activeBrandId":{"type":"string","nullable":true},"plan":{"type":"object"},"creditsRemaining":{"type":"integer"},"scopes":{"type":"array","items":{"type":"string"}},"keyId":{"type":"string"},"keyLastFour":{"type":"string","nullable":true}}}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v2/capabilities":{"get":{"operationId":"getCapabilities","summary":"Per-platform rules (char limits, media, required/optional options) + your accounts with channel ids.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"type":"object","additionalProperties":{"type":"object"}},"accounts":{"type":"array","items":{"type":"object"}}}}}}}}}},"/api/v2/posts":{"post":{"operationId":"publish","summary":"Publish one idea to many destinations (the publish button).","parameters":[{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Validate every target, queue nothing."},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Safe retries (replayed 24h)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"title":"Multi-destination (recommended)","type":"object","properties":{"text":{"type":"string"},"media":{"type":"array","items":{"type":"string","format":"uri"}},"targets":{"type":"array","items":{"$ref":"#/components/schemas/Target"},"minItems":1},"schedule":{"type":"object","properties":{"mode":{"type":"string","enum":["now","at","next_free_slot"]},"time":{"type":"string","format":"date-time"},"platform":{"type":"string"}}}},"required":["targets"]},{"title":"Legacy single account","type":"object","properties":{"accountId":{"type":"string"},"body":{"type":"string"},"mediaUrls":{"type":"array","items":{"type":"string"}},"scheduledAt":{"type":"string"}},"required":["accountId","body"]}]}}}},"responses":{"200":{"description":"Job created (multi-destination body).","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"targets":{"type":"array","items":{"type":"object"}},"poll":{"type":"string"},"credits":{"type":"object"}}}}}},"201":{"description":"Single row created (legacy body)."},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Account not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency-Key reused with a different body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v2/posts/{jobId}":{"get":{"operationId":"getJob","summary":"Poll a multi-destination publish. Partial failure is first-class.","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","partially_failed","failed"]},"targets":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"No such job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v2/accounts":{"get":{"operationId":"listAccounts","summary":"Connected social accounts.","responses":{"200":{"description":"OK"}}}},"/api/v2/sources":{"post":{"operationId":"createSource","summary":"Research feedstock: resolve an article(URL)/youtube/tiktok/pdf/audio/perplexity/text source. Returns a poll URL (text resolves immediately).","responses":{"201":{"description":"Queued; poll GET /api/v2/sources/{id}"}}}},"/api/v2/sources/{id}":{"get":{"operationId":"getSource","summary":"Poll a source resolution until status=ready (resolvedContent + tokens).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/v2/accounts/{id}/subaccounts":{"get":{"operationId":"listSubaccounts","summary":"Resolvable channels for an account (LinkedIn/Facebook pages, YouTube channels).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/v2/accounts/{id}/boards":{"get":{"operationId":"listBoards","summary":"Pinterest boards for an account.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/v2/slots":{"get":{"operationId":"listSlots","summary":"Scheduling slots that back schedule.mode=next_free_slot. Filter: platform.","parameters":[{"name":"platform","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"createSlot","summary":"Create a posting slot (platform, timeOfDay HH:MM, dayMask 1..127).","responses":{"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v2/media/{id}":{"get":{"operationId":"getMedia","summary":"Media processing status (ready|processing) + content type/size for a mediaId.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not a valid mediaId"}}}},"/api/v2/visuals":{"post":{"operationId":"createVisual","summary":"Generate a visual as a job (kind: quote_card | slideshow | carousel). Poll GET /api/v2/visuals/{id}; visual.ready webhook fires on completion.","responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"poll":{"type":"string"},"credits":{"type":"object"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v2/visuals/{id}":{"get":{"operationId":"getVisual","summary":"Poll a visual job (status: queued|rendering|ready|failed) for its url.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/api/v2/media":{"post":{"operationId":"createMedia","summary":"Presigned upload for local files. PUT bytes to uploadUrl, then reference publicUrl in media[].","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string"},"uploadUrl":{"type":"string"},"publicUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}}}}}}}},"/api/v2/scheduled-posts":{"get":{"operationId":"listScheduled","summary":"Scheduled posts (filters: status, platform, jobId, from, to).","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"platform","in":"query","schema":{"type":"string"}},{"name":"jobId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v2/published-posts":{"get":{"operationId":"listPublished","summary":"Published posts with permalinks.","responses":{"200":{"description":"OK"}}}},"/api/v2/generate":{"post":{"operationId":"generate","summary":"Generate post variants from a prompt/sources.","responses":{"200":{"description":"OK"}}}},"/api/v2/brands":{"get":{"operationId":"listBrands","summary":"The key owner's brands.","responses":{"200":{"description":"OK"}}}},"/api/v2/webhooks":{"post":{"operationId":"createWebhook","summary":"Subscribe to signed events (post.published, post.failed, job.completed, ...). Returns the signing secret once.","responses":{"201":{"description":"Created (secret returned once)"}}},"get":{"operationId":"listWebhooks","summary":"List your webhook subscriptions (no secret).","responses":{"200":{"description":"OK"}}}},"/api/v2/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook subscription.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"},"404":{"description":"Not found"}}}},"/api/v2/webhooks/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"Recent delivery attempts for a webhook (status, response code, attempts).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}}}}