API Documentation
The Ampost REST API lets you publish, schedule, and manage social media content across 5 platforms from a single integration. All requests use Bearer token authentication and return clean JSON.
AI / LLM ready. This documentation is also available as a machine-readable /llm.txt file, designed for LLMs and AI agents that want to understand the Ampost API.
Overview
Ampost provides a unified social media API. Instead of integrating each platform individually, you connect to Ampost once and get access to instagram, facebook, linkedin, tiktok, threads through a single REST API.
Base URL
api.ampost.io
Protocol
HTTPS only
Content Type
application/json
Auth
Bearer token
Rate Limit
Tier-based
Quickstart
Make your first API call in under a minute:
Public REST and MCP traffic is hosted on https://api.ampost.io. The dashboard, OAuth callbacks, and billing/session flows stay on https://ampost.io. Public API paths on https://ampost.io still respond temporarily for backwards compatibility, but new integrations should use the API host.
Get your API key
Sign up at ampost.io, go to Dashboard → Settings → API Keys, and create a new key. Save the raw key — it is shown only once.
Connect a social account
Create a browser-assisted connection through POST /api/v1/accounts/connect or use the dashboard. Create a platform set to group your connections, then reference that platformSetId when creating posts. Use the Accounts endpoints if you need to inspect which active connections are inside a set.
Create a post
curl -X POST https://api.ampost.io/api/v1/posts \
-H "Authorization: Bearer amp_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": {
"text": "Hello from the Ampost API!",
"media": [],
"linkUrl": null,
"platformOverrides": {}
},
"platforms": ["threads"],
"scheduledFor": null,
"platformSetId": "set_uuid"
}'Authentication
All API requests require a valid API key passed as a Bearer token in the Authorization header. API keys are created and managed through the Ampost dashboard. Dashboard-only management routes such as /api/keys, billing, reconnect, refresh, and disconnect do not accept Bearer API keys. New account connections can be initiated with a Bearer key through the hosted connect endpoints below; social consent still happens in the user's browser.
Key format
API keys use the prefix amp_live_ followed by a base64url-encoded random secret. The raw key is shown only once at creation time.
Any valid API key can access the public Ampost API and MCP endpoints that your plan allows. Route-level access is determined by whether an endpoint is part of the public API surface, not by key-level permissions. Ampost API keys are scope-free: the key identifies the owning user, and the endpoint decides whether Bearer-key access is allowed.
Posts
The Posts API is the core of Ampost. Create, retrieve, and manage social media posts across all connected platforms.
/api/v1/postsList posts for the authenticated user. Supports filtering by status and platform, with pagination.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| status | string | No | Filter by post status: draft, scheduled, queued, posting, published, partial, failed, discarded. |
| platform | string | No | Filter by platform: instagram, facebook, linkedin, tiktok, threads. |
| limit | integer | No | Maximum number of posts to return (default: 20, max: 100). |
| offset | integer | No | Number of posts to skip for pagination (default: 0). |
{
"posts": [
{
"id": "post_uuid",
"status": "published",
"textPreview": "Building in public...",
"platforms": ["threads", "instagram"],
"mediaCount": 1,
"publishedCount": 2,
"failedCount": 0,
"scheduledFor": null,
"createdAt": "2026-04-30T10:00:00Z",
"updatedAt": "2026-04-30T10:00:00Z",
"platformSetId": "set_uuid"
}
],
"total": 42
}/api/v1/postsCreate a draft or scheduled post with JSON or multipart inline media upload. Publish later with the scheduler or immediately through the versioned publish endpoint.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| content.text | string | Yes | The post text content. |
| content.media | PostMedia[] | No | Array of already-hosted media attachments, or omit it and send files inline with multipart/form-data. TikTok requires explicit media objects with type, MIME type, sizeBytes, and video durationSeconds when relevant. |
| content.linkUrl | string | null | No | URL to include in the post. |
| content.platformOverrides | object | No | Per-platform overrides (text, settings). Settings supports Instagram/Facebook placement selection, LinkedIn member-post options such as visibility, article metadata, video title, and alt text, and TikTok creator controls. |
| platforms | Platform[] | Yes | Array of platforms to publish to. |
| scheduledFor | string | null | No | ISO 8601 timestamp for scheduled posting. null creates a draft. Scheduling is currently supported for Instagram, Facebook, Threads, and TikTok. |
| platformSetId | string | Yes | Platform set UUID. The post must be scoped to a platform set. |
{
"post": {
"id": "post_uuid",
"userId": "user_xyz",
"content": { ... },
"platformPosts": [
{
"id": "pp_uuid",
"platform": "threads",
"status": "published",
"publishedUrl": "https://threads.net/user/post/123",
...
}
],
"status": "draft",
"scheduledFor": null,
"createdAt": "2026-04-30T10:00:00Z",
"updatedAt": "2026-04-30T10:00:00Z",
"platformSetId": "set_uuid"
}
}/api/v1/posts/:idGet a single post by ID. Only returns posts belonging to the authenticated user.
/api/v1/posts/:id/cancelCancel a draft, scheduled, queued, partial, or failed post. Published and actively posting posts cannot be cancelled.
/api/v1/posts/:idUpdate a draft or scheduled post. Provide any subset of content, platforms, scheduledFor, or platformSetId.
/api/v1/posts/:idDiscard a post through the primary resource endpoint.
/api/v1/posts/:id/publishPublish a draft or scheduled post immediately to all target platforms.
/api/v1/posts/:id/retryRetry failed platform publishes. Optionally pass a JSON body with a platforms array.
MCP Server
Ampost provides a Model Context Protocol (MCP) server for AI agents and LLMs. The MCP documentation lives on its own page with endpoint details, available tools, and configuration examples.
View MCP Documentation →Platforms
Ampost supports 5 social media platforms through a single integration. Connect your accounts in the dashboard, then reference them by platform name in API requests.
instagramImages, video, carousels
facebookPosts, pages, groups
linkedinMember posts only; org posting gated
TikTok
tiktokScheduled photo and video posts; audit-sensitive visibility
Threads
threadsPosts, replies
Placement
Instagram and Facebook support placement selection to control how content appears. Placements are set via platformOverrides.{platform}.settings.placement and are validated against the media configuration.
Instagram Placements
feedstoryreelcarouselCarousel requires 2+ images. Reel requires exactly one video. Story supports single image or video. Feed supports single image only.
Facebook Placements
feedstoryreelReel requires exactly one video and Meta currently expects 9:16 media between 4 and 60 seconds. Feed and story support images or video. If Facebook returns identity-confirmation errors, complete the Page authorization flow in the Facebook mobile app before retrying.
Platform Sets
Platform sets group your connected social accounts into named collections. Every post must be scoped to a platform set via platformSetId. Each user can create up to 20 sets.
The public REST surface exposes versioned platform-set endpoints for Bearer API keys. Use them to list sets, create new ones, rename any set, or delete a set when at least one other set remains. Deleting a set revokes its active platform connections. Dashboard cookie-auth routes remain available separately for the web app.
The canonical public endpoints are /api/v1/platform-sets and /api/v1/platform-sets/:id. The older /api/platforms/sets routes also accept Bearer API keys and dashboard session auth for the same list, create, rename, and delete operations. The public hosted-connect API can create and poll new browser-assisted connections. Existing dashboard reconnect, refresh, disconnect, and dashboard Facebook Page-selection routes remain session-only.
/api/v1/platform-setsList all platform sets for the authenticated user. Each set includes a connection count of active platform connections.
{
"sets": [
{
"id": "set_uuid",
"userId": "user_xyz",
"name": "My Brand Accounts",
"isDefault": true,
"createdAt": "2026-04-30T10:00:00Z",
"updatedAt": "2026-04-30T10:00:00Z",
"connectionCount": 3
}
]
}/api/v1/platform-setsCreate a new platform set. Max 20 sets per user.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Display name for the platform set (max 50 characters). |
{
"set": {
"id": "set_uuid",
"userId": "user_xyz",
"name": "My Brand Accounts",
"isDefault": false,
"createdAt": "2026-04-30T10:00:00Z",
"updatedAt": "2026-04-30T10:00:00Z",
"connectionCount": 0
}
}/api/v1/platform-sets/:idRename an existing platform set owned by the authenticated user.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | New display name for the platform set (max 50 characters). |
{
"set": {
"id": "set_uuid",
"userId": "user_xyz",
"name": "Renamed Set",
"isDefault": false,
"createdAt": "2026-04-30T10:00:00Z",
"updatedAt": "2026-05-01T12:00:00Z"
}
}/api/v1/platform-sets/:idDelete a platform set. All active connections in the set are revoked. The last remaining set cannot be deleted.
{
"success": true
}Accounts
Use the versioned account endpoints to start a browser-assisted connection or discover connected publishing accounts before creating and debugging posts.
Account responses include scopes, platform set membership, token expiry, derived tokenHealth, and non-secret platformMetadata. For TikTok this metadata includes creator publish options such as available privacy levels, disabled comment/duet/stitch flags, and max video duration. For LinkedIn it includes the member's subject identifier, basic OIDC profile snapshot, granted scopes, auth-flow marker, and the organization-posting gate state captured at connect time.
Browser-assisted hosted flow
Create a short-lived request, show its one-time connectUrlto the user, and ask them to open it in a browser. The hosted Ampost page handles confirmation, provider consent, and Facebook Page selection. Poll the status resource every 2–5 seconds until it becomes connected, failed, or expired.
Show the complete URL once, but never log, analyze, transform, or repeat its fragment after that handoff. Do not ask users to paste the fragment back, or ask for access tokens, OAuth codes, passwords, state values, or Facebook Page tokens. The create response is the only API response containing the URL; status responses contain only safe state and error information.
MVP exclusions: profiles, customer callbacks, webhooks, headless authorization, public reconnect, public disconnect, and public token refresh. Those existing account-lifecycle operations remain dashboard-authenticated. Creation is unavailable while the operator-controlled PLATFORM_CONNECT_ENABLED rollout flag is false; status reads remain available for incident recovery.
/api/v1/accounts/connectCreate a ten-minute hosted connection request for one of the five supported platforms. Omit platformSetId to use the API-key owner's default set.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| platform | string | Yes | One of: instagram, facebook, linkedin, tiktok, threads. |
| platformSetId | UUID | No | Owned target set; omission resolves the default set. |
{
"connectRequest": {
"id": "11111111-1111-4111-8111-111111111111",
"platform": "instagram",
"platformSetId": "22222222-2222-4222-8222-222222222222",
"status": "pending",
"connectUrl": "https://ampost.io/connect/11111111-1111-4111-8111-111111111111#token=<one-time-token>",
"createdAt": "2026-07-14T12:00:00.000Z",
"expiresAt": "2026-07-14T12:10:00.000Z"
}
}/api/v1/accounts/connect/:connectRequestIdRead the owner-scoped safe status. Another active key for the same owner may poll it; other owners receive 404.
{
"connectRequest": {
"id": "11111111-1111-4111-8111-111111111111",
"platform": "instagram",
"platformSetId": "22222222-2222-4222-8222-222222222222",
"status": "connected",
"connectionId": "33333333-3333-4333-8333-333333333333",
"error": null,
"createdAt": "2026-07-14T12:00:00.000Z",
"expiresAt": "2026-07-14T12:10:00.000Z",
"completedAt": "2026-07-14T12:02:14.000Z",
"updatedAt": "2026-07-14T12:02:14.000Z"
}
}/api/v1/accountsList connected social accounts. Supports platform and platformSetId filters.
/api/v1/accounts/:idGet details for a single connected account.
Media Upload
Media files are uploaded inline through the public versioned post creation endpoint. Send a multipart/form-data request to /api/v1/posts with a data field (the same JSON body documented for post creation) and one or more files fields (media files). The legacy /api/posts route remains compatible for existing integrations.
/api/v1/postsAccepted MIME types: image/jpeg, image/png, image/webp, video/mp4, video/quicktime. Max file size: 200 MB per file.
curl -X POST https://api.ampost.io/api/v1/posts \
-H "Authorization: Bearer amp_live_YOUR_KEY" \
-F 'data={
"content":{
"text":"TikTok launch post",
"media":[{
"url":"https://cdn.example.com/launch.mp4",
"type":"video",
"filename":"launch.mp4",
"mimeType":"video/mp4",
"sizeBytes":18432000,
"width":1080,
"height":1920,
"durationSeconds":24
}],
"linkUrl":null,
"platformOverrides":{
"tiktok":{"settings":{"privacyLevel":"SELF_ONLY","disableComment":true}}
}
},
"platforms":["tiktok"],
"scheduledFor":null,
"platformSetId":"set_uuid"
}' \
-F "files=@launch.mp4"Scheduled Instagram, Facebook, Threads, TikTok, and LinkedIn media posts use the same endpoint. For JSON requests, TikTok should always be sent as explicit content.media objects. LinkedIn strongly prefers explicit media objects as well and requires them for video. TikTok creator visibility is also launch-state sensitive: if the connected TikTok app is limited to private-only posting during audit or Direct Post review, Ampost exposes only the allowed privacy levels and surfaces provider errors instead of assuming public delivery.
LinkedIn Contract
LinkedIn supports member-auth text-only posts, image posts, article posts, and single-video posts. Use platformOverrides.linkedin.text for a LinkedIn-specific text override and platformOverrides.linkedin.settings for visibility, reshare controls, article metadata, and video title metadata. Organization posting remains intentionally gated, and analytics and comment-management APIs are not part of this launch.
Typed content.media objects are recommended for all LinkedIn media and required for video. Bare mediaUrls stay available only for legacy image posts; video-like legacy URLs are rejected because LinkedIn image and video upload flows differ.
{
"content": {
"text": "Shipping the new LinkedIn contract today.",
"media": [],
"linkUrl": null,
"platformOverrides": {
"linkedin": {
"settings": {
"visibility": "PUBLIC",
"isReshareDisabledByAuthor": true
}
}
}
},
"platforms": ["linkedin"],
"scheduledFor": null,
"platformSetId": "set_uuid"
}{
"content": {
"text": "LinkedIn image post",
"media": [
{
"id": "media-1",
"url": "https://cdn.example.com/product-shot.png",
"type": "image",
"filename": "product-shot.png",
"mimeType": "image/png",
"sizeBytes": 248120,
"width": 1600,
"height": 900,
"altText": "Product dashboard with the LinkedIn publish flow open."
}
],
"linkUrl": null,
"platformOverrides": {
"linkedin": {
"settings": {
"visibility": "CONNECTIONS"
}
}
}
},
"platforms": ["linkedin"],
"scheduledFor": null,
"platformSetId": "set_uuid"
}{
"content": {
"text": "LinkedIn demo clip",
"media": [
{
"id": "media-1",
"url": "https://cdn.example.com/demo.mp4",
"type": "video",
"filename": "demo.mp4",
"mimeType": "video/mp4",
"sizeBytes": 18432000,
"width": 1920,
"height": 1080,
"durationSeconds": 38,
"thumbnailUrl": "https://cdn.example.com/demo-thumb.jpg"
}
],
"linkUrl": null,
"platformOverrides": {
"linkedin": {
"settings": {
"visibility": "PUBLIC",
"videoTitle": "Ampost LinkedIn demo"
}
}
}
},
"platforms": ["linkedin"],
"scheduledFor": null,
"platformSetId": "set_uuid"
}{
"text": "This will be rejected",
"platforms": ["linkedin"],
"scheduledFor": null,
"platformSetId": "set_uuid",
"mediaUrls": ["https://cdn.example.com/demo.mp4"]
}The invalid legacy example returns a 400 validation error because LinkedIn video posts must use explicit media metadata.
Rate Limits
Ampost enforces tier-based rate limiting to ensure fair usage. Rate limits vary by operation and plan. Exceeding a rate limit returns a 429 Too Many Requests response.
Rate limit operations
| Operation | Description |
|---|---|
| createPost | Creating new posts |
| publishPost | Publishing scheduled posts |
| connectPlatform | Adding new platform connections |
| mediaUpload | Uploading media attachments |
| apiRead | Reading posts and account data |
Quota types
In addition to rate limits, Ampost enforces monthly quotas depending on your plan:
postsPerMonthmediaUploadsPerMonthapiRequestsPerMonthmaxScheduledPostsmaxStorageBytesError Codes
The API returns standard HTTP status codes with JSON error bodies. Post-engine errors include a machine-readable code.
| Code | HTTP | Description |
|---|---|---|
VALIDATION_FAILED | 400 | Request body failed validation. |
NO_PLATFORMS_SELECTED | 400 | No platforms specified in the request. |
PLATFORM_NOT_CONNECTED | 400 | Requested platform has no connected account. |
CONTENT_TOO_LONG | 400 | Post text exceeds platform character limits. |
UNSUPPORTED_MEDIA_TYPE | 400 | Media file format is not supported. |
UNSUPPORTED_MEDIA_CONFIG | 400 | Media configuration is not supported by the platform. |
INVALID_PLACEMENT | 400 | Selected placement is invalid for the current media configuration. |
MIXED_MEDIA_NOT_SUPPORTED | 400 | Platform does not support mixing image and video media in a single post. |
PAGE_IDENTITY_CONFIRMATION_REQUIRED | 403 | Facebook requires the Page manager to complete identity confirmation in the Facebook mobile app before publishing can continue. |
POST_NOT_FOUND | 404 | The requested post does not exist. |
INVALID_STATUS_TRANSITION | 409 | Cannot transition the post to the requested status. |
RATE_LIMITED | 429 | Rate limit exceeded. Retry after the window resets. |
MEDIA_UPLOAD_FAILED | 502 | Media upload to platform failed. |
BROKER_ERROR | 502 | Platform broker encountered an internal error. |
Continue browsing
Related implementation paths
Use these nearby pages when you want product context, MCP-specific setup, or plan details alongside the raw API reference.