Start here
- Copy your API key from Account settings, API keys.
- Add the header
x-api-key: YOUR_API_KEYto every request. - Call an endpoint below on
https://api-app.postnext.io.
The PostNext public API lets you connect social channels, create, schedule and publish posts, manage media, and read analytics programmatically.
Authentication
Every request must include your API key in the x-api-key header. Each account has one key: copy it or regenerate it at https://postnext.io/account/api-keys. Regenerating it stops the old key working straight away.
curl -H "x-api-key: YOUR_KEY" https://api-app.postnext.io/api/v1/account
Response shapes
Responses are JSON. Most endpoints wrap data in { "success": true, "data": ... }, but a few return the payload at the top level for historical reasons; each operation below documents its exact shape. Errors are generally { "success": false, "error": { "message": "..." } }, with a few endpoints adding a machine-readable code (noted per operation).
Base URL
All paths are relative to https://api-app.postnext.io. Note the mixed prefix: the posts, connections and assets resources are served under /api, while account and analytics are served under /api/v1.
AI assistants use the MCP server instead of this API. Its tools are listed at MCP server tools.
Account
Identity and account state
GET/api/v1/account
Get the authenticated account
Returns identity and onboarding state for the account that owns the API key. This endpoint returns a flat object (it is NOT wrapped in the success/data envelope).
Request
curl -X GET 'https://api-app.postnext.io/api/v1/account' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Account details (flat object)400Account not found or not verified401Missing or invalid API key
Example 200 response
{
"name": "string",
"email": "string",
"user": "string",
"uniqueId": "string",
"onboardingCompleted": true,
"onboardingRole": "string",
"onboardingSteps": {
"role": true,
"connect": true,
"plan": true
},
"requiresOnboarding": true,
"locale": "en-gb"
}Connections
Connected social channels
GET/api/connections
List connected channels
Returns a bare JSON array of the caller's connected channels (NOT wrapped in the success/data envelope). Use requiresAttention (not tokenExpiry) to decide whether a channel needs re-authentication.
Request
curl -X GET 'https://api-app.postnext.io/api/connections' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Array of connections401Missing or invalid API key
Example 200 response
[
{
"channelName": "string",
"provider": "twitter",
"providerId": "string",
"createdAt": "2026-11-19T09:00:00Z",
"tokenExpiry": "2026-11-19T09:00:00Z",
"avatar": "string",
"isActive": true,
"requiresAttention": true,
"uniqueId": "string"
}
]GET/api/connections/{provider}/{channelName}/check
Check a channel connection
Verifies a single channel connection. The HTTP status mirrors the status field: active returns 200, expired returns 401, invalid returns 404. The body is a bare status object.
| Parameter | In | Type | Description |
|---|---|---|---|
provider required | path | one of: twitter, instagram, linkedin, threads, youtube, tiktok, bluesky | |
channelName required | path | string | The channel identifier you assigned when connecting. |
Request
curl -X GET 'https://api-app.postnext.io/api/connections/{provider}/{channelName}/check' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Connection is active400Missing required parameters401Token expired404Connection not found or unsupported provider
Example 200 response
{
"status": "active",
"message": "string",
"expiresAt": "2026-11-19T09:00:00Z",
"profile": {}
}Posts
Create, schedule, publish and manage posts
GET/api/posts
List posts
Lists the caller's posts, scoped to their team. Any PostGroup field passed as a query parameter is applied as an equality filter (for example status, assigneeId, contentPlanId). Pagination activates when page or limit is present.
| Parameter | In | Type | Description |
|---|---|---|---|
page | query | integer | Page number. Presence of `page` or `limit` enables pagination. |
limit | query | integer | Page size (default 50 when paginating). |
status | query | one of: DRAFT, SCHEDULED, PUBLISHING, PUBLISHED, FAILED, APPROVAL | Filter by post status. |
view | query | one of: calendar | `calendar` returns a slimmed calendar shape. |
excludeContentPlanDrafts | query | boolean | Exclude ungenerated content-plan scaffold drafts. |
Request
curl -X GET 'https://api-app.postnext.io/api/posts' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Paginated list of posts401Missing or invalid API key
Example 200 response
{
"success": true,
"data": [
{
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
],
"meta": {
"page": 0,
"limit": 0,
"total": 0,
"totalPages": 0,
"hasNextPage": true,
"hasPrevPage": true
}
}POST/api/posts
Create a draft post
Creates a draft post group. userId and teamId are resolved from the API key and must NOT be sent. Requires a current (non-delinquent) subscription and available monthly post quota.
| Parameter | In | Type | Description |
|---|---|---|---|
providers required | body | object | Map keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting. |
title | body | string | |
description | body | string | |
imageUrl | body | string | |
tags | body | array of string | |
assigneeId | body | string | |
watchers | body | array of string | |
timezone | body | string | IANA timezone, used with recurrence. |
recurrence | body | object | Optional repeat rule. On a save of an existing post (`PUT /api/posts/{groupId}`, `PUT /api/posts/{groupId}/schedule`, `PUT /api/posts/{groupId}/publish`, `POST /api/posts/{postId}/schedule`), `null` stops the post's repeat series, the same as `PATCH /api/posts/{groupId}/recurrence/stop`; posts the series already created stay. Omitted leaves the series unchanged. Sending the stored settings again keeps the series as it is (same count and status). |
Request
curl -X POST 'https://api-app.postnext.io/api/posts' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"Launch announcement","tags":["launch"],"providers":{"twitter":{"channelName":"@focusbox","providerId":"tw_9f3a1c20e5","content":{"text":"We just shipped v2. Faster, cleaner, yours.","mediaUrls":["https://cdn.postnext.io/assets/launch-hero.png"],"mediaType":"IMAGE","hashtags":["launch","v2"]}}}}'Request body (application/json)
{
"title": "Launch announcement",
"tags": [
"launch"
],
"providers": {
"twitter": {
"channelName": "@focusbox",
"providerId": "tw_9f3a1c20e5",
"content": {
"text": "We just shipped v2. Faster, cleaner, yours.",
"mediaUrls": [
"https://cdn.postnext.io/assets/launch-hero.png"
],
"mediaType": "IMAGE",
"hashtags": [
"launch",
"v2"
]
}
}
}
}Responses
201Draft created400Validation failed (thread order/media, first comment over cap `INVALID_FIRST_COMMENT`, or invalid recurrence `INVALID_RECURRENCE`).401Missing or invalid API key402Subscription is inactive (payment failure). Flat shape, not the standard envelope.403Posting not allowed on the current plan, or monthly quota reached
Example 201 response
{
"success": true,
"data": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
}GET/api/posts/results
List publish results
Flattened per-channel publish outcomes across your team's posts, so you can see which posts succeeded or failed on which channel without fetching each one individually. Team-scoped.
| Parameter | In | Type | Description |
|---|---|---|---|
status | query | one of: DRAFT, SCHEDULED, PUBLISHING, PUBLISHED, FAILED, APPROVAL | Filter by result status (e.g. PUBLISHED, FAILED). |
provider | query | one of: twitter, instagram, linkedin, threads, youtube, tiktok, bluesky | Filter by platform. |
page | query | integer | |
limit | query | integer |
Request
curl -X GET 'https://api-app.postnext.io/api/posts/results' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Paginated publish results400No current team selected401Missing or invalid API key
Example 200 response
{
"success": true,
"data": {
"results": [
{
"postGroupId": "string",
"provider": "instagram",
"channelName": "string",
"status": "DRAFT",
"publishedAt": "2026-11-19T09:00:00Z",
"url": "string",
"platformPostId": "string",
"error": "string",
"attempts": 0
}
],
"pagination": {
"total": 0,
"page": 0,
"limit": 0,
"totalPages": 0
}
}
}POST/api/posts/publish
Create and publish a post now
Creates a post group and publishes it immediately to every channel in the providers map. Partial success returns 200 with publishStatus.partial set to true (it is not an error).
| Parameter | In | Type | Description |
|---|---|---|---|
providers required | body | object | Map keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting. |
title | body | string | |
description | body | string | |
imageUrl | body | string | |
tags | body | array of string | |
assigneeId | body | string | |
watchers | body | array of string | |
timezone | body | string | IANA timezone, used with recurrence. |
recurrence | body | object | Optional repeat rule. On a save of an existing post (`PUT /api/posts/{groupId}`, `PUT /api/posts/{groupId}/schedule`, `PUT /api/posts/{groupId}/publish`, `POST /api/posts/{postId}/schedule`), `null` stops the post's repeat series, the same as `PATCH /api/posts/{groupId}/recurrence/stop`; posts the series already created stay. Omitted leaves the series unchanged. Sending the stored settings again keeps the series as it is (same count and status). |
Request
curl -X POST 'https://api-app.postnext.io/api/posts/publish' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"Launch announcement","tags":["launch"],"providers":{"twitter":{"channelName":"@focusbox","providerId":"tw_9f3a1c20e5","content":{"text":"We just shipped v2. Faster, cleaner, yours.","mediaUrls":["https://cdn.postnext.io/assets/launch-hero.png"],"mediaType":"IMAGE","hashtags":["launch","v2"]}}}}'Request body (application/json)
{
"title": "Launch announcement",
"tags": [
"launch"
],
"providers": {
"twitter": {
"channelName": "@focusbox",
"providerId": "tw_9f3a1c20e5",
"content": {
"text": "We just shipped v2. Faster, cleaner, yours.",
"mediaUrls": [
"https://cdn.postnext.io/assets/launch-hero.png"
],
"mediaType": "IMAGE",
"hashtags": [
"launch",
"v2"
]
}
}
}
}Responses
201Created and published400Validation failed (thread order/media, first comment over cap `INVALID_FIRST_COMMENT`, or invalid recurrence `INVALID_RECURRENCE`).401Missing or invalid API key402Subscription is inactive (payment failure). Flat shape, not the standard envelope.403Posting not allowed on the current plan, or monthly quota reached
Example 201 response
{
"success": true,
"data": {
"group": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
},
"providerPosts": [
{}
],
"queuedProviders": [
"string"
],
"publishStatus": {
"success": true,
"partial": true,
"successfulPublishes": 0,
"queuedPublishes": 0,
"totalPublishes": 0,
"failures": [
{}
]
}
}
}POST/api/posts/schedule
Create and schedule a post
Creates a post group and schedules it. scheduledAt is required and must be a future ISO 8601 datetime. timezone only affects recurrence.
| Parameter | In | Type | Description |
|---|---|---|---|
providers required | body | object | Map keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting. |
title | body | string | |
description | body | string | |
imageUrl | body | string | |
tags | body | array of string | |
assigneeId | body | string | |
watchers | body | array of string | |
timezone | body | string | IANA timezone, used with recurrence. |
recurrence | body | object | Optional repeat rule. On a save of an existing post (`PUT /api/posts/{groupId}`, `PUT /api/posts/{groupId}/schedule`, `PUT /api/posts/{groupId}/publish`, `POST /api/posts/{postId}/schedule`), `null` stops the post's repeat series, the same as `PATCH /api/posts/{groupId}/recurrence/stop`; posts the series already created stay. Omitted leaves the series unchanged. Sending the stored settings again keeps the series as it is (same count and status). |
scheduledAt required | body | string | Future ISO 8601 datetime. |
Request
curl -X POST 'https://api-app.postnext.io/api/posts/schedule' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"Launch announcement","tags":["launch"],"providers":{"twitter":{"channelName":"@focusbox","providerId":"tw_9f3a1c20e5","content":{"text":"We just shipped v2. Faster, cleaner, yours.","mediaUrls":["https://cdn.postnext.io/assets/launch-hero.png"],"mediaType":"IMAGE","hashtags":["launch","v2"]}}},"scheduledAt":"2026-11-19T09:00:00Z"}'Request body (application/json)
{
"title": "Launch announcement",
"tags": [
"launch"
],
"providers": {
"twitter": {
"channelName": "@focusbox",
"providerId": "tw_9f3a1c20e5",
"content": {
"text": "We just shipped v2. Faster, cleaner, yours.",
"mediaUrls": [
"https://cdn.postnext.io/assets/launch-hero.png"
],
"mediaType": "IMAGE",
"hashtags": [
"launch",
"v2"
]
}
}
},
"scheduledAt": "2026-11-19T09:00:00Z"
}Responses
201Created and scheduled400scheduledAt missing, malformed, or in the past401Missing or invalid API key402Subscription is inactive (payment failure). Flat shape, not the standard envelope.403Posting not allowed on the current plan, or monthly quota reached
Example 201 response
{
"success": true,
"data": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
}GET/api/posts/{groupId}
Get a post
| Parameter | In | Type | Description |
|---|---|---|---|
groupId required | path | string | The post group `id` (uuid) returned by list/get. |
Request
curl -X GET 'https://api-app.postnext.io/api/posts/{groupId}' \
-H 'x-api-key: YOUR_API_KEY'Responses
200The post group with its provider posts401Missing or invalid API key404Post not found or access denied
Example 200 response
{
"success": true,
"data": {
"group": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
},
"providerPosts": [
{}
]
}
}PUT/api/posts/{groupId}
Update a post
Updates content or metadata on an existing post group.
| Parameter | In | Type | Description |
|---|---|---|---|
groupId required | path | string | The post group `id` (uuid) returned by list/get. |
providers required | body | object | Map keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting. |
title | body | string | |
description | body | string | |
imageUrl | body | string | |
tags | body | array of string | |
assigneeId | body | string | |
watchers | body | array of string | |
timezone | body | string | IANA timezone, used with recurrence. |
recurrence | body | object | Optional repeat rule. On a save of an existing post (`PUT /api/posts/{groupId}`, `PUT /api/posts/{groupId}/schedule`, `PUT /api/posts/{groupId}/publish`, `POST /api/posts/{postId}/schedule`), `null` stops the post's repeat series, the same as `PATCH /api/posts/{groupId}/recurrence/stop`; posts the series already created stay. Omitted leaves the series unchanged. Sending the stored settings again keeps the series as it is (same count and status). |
Request
curl -X PUT 'https://api-app.postnext.io/api/posts/{groupId}' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"Launch announcement","tags":["launch"],"providers":{"twitter":{"channelName":"@focusbox","providerId":"tw_9f3a1c20e5","content":{"text":"We just shipped v2. Faster, cleaner, yours.","mediaUrls":["https://cdn.postnext.io/assets/launch-hero.png"],"mediaType":"IMAGE","hashtags":["launch","v2"]}}}}'Request body (application/json)
{
"title": "Launch announcement",
"tags": [
"launch"
],
"providers": {
"twitter": {
"channelName": "@focusbox",
"providerId": "tw_9f3a1c20e5",
"content": {
"text": "We just shipped v2. Faster, cleaner, yours.",
"mediaUrls": [
"https://cdn.postnext.io/assets/launch-hero.png"
],
"mediaType": "IMAGE",
"hashtags": [
"launch",
"v2"
]
}
}
}
}Responses
200Updated400Validation failed (thread order/media, first comment over cap `INVALID_FIRST_COMMENT`, or invalid recurrence `INVALID_RECURRENCE`).401Missing or invalid API key402Subscription is inactive (payment failure). Flat shape, not the standard envelope.403No permission to update this post404Post not found or access denied
Example 200 response
{
"success": true,
"data": {
"group": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
},
"providerPosts": [
{}
]
}
}DELETE/api/posts/{groupId}
Delete a post
Deletes the post from PostNext (the post group and its per-provider records) and cancels any pending schedule. This does NOT remove an already-published post from the social platform: if the post was published, it stays live on the channel and must be deleted there.
| Parameter | In | Type | Description |
|---|---|---|---|
groupId required | path | string | The post group `id` (uuid) returned by list/get. |
Request
curl -X DELETE 'https://api-app.postnext.io/api/posts/{groupId}' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Deleted401Missing or invalid API key404Post not found or access denied
Example 200 response
{
"success": true,
"data": {
"message": "Post deleted successfully"
}
}POST/api/posts/{postId}/schedule
Schedule an existing post
| Parameter | In | Type | Description |
|---|---|---|---|
postId required | path | string | The post group `id` (uuid). |
scheduledAt required | body | string | Future ISO 8601 datetime. |
timezone | body | string | IANA timezone, used for recurrence only. |
Request
curl -X POST 'https://api-app.postnext.io/api/posts/{postId}/schedule' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"scheduledAt":"2026-11-19T09:00:00Z","timezone":"string"}'Request body (application/json)
{
"scheduledAt": "2026-11-19T09:00:00Z",
"timezone": "string"
}Responses
200Scheduled400scheduledAt missing, malformed, or in the past401Missing or invalid API key402Subscription is inactive (payment failure). Flat shape, not the standard envelope.404Post not found or access denied
Example 200 response
{
"success": true,
"data": {
"group": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
},
"providerPosts": [
{}
]
}
}POST/api/posts/{postId}/publish
Publish an existing post now
Publishes (or retries) the post on its channels. YouTube uploads asynchronously: the video is handed to the publishing worker, so a 200 with publishStatus.successfulPublishes 0 and publishStatus.queuedPublishes 1 means the upload was handed to the worker, not that it failed. The channel is listed in queuedProviders and the group reads PUBLISHING until the upload ends; read the post again for its outcome.
| Parameter | In | Type | Description |
|---|---|---|---|
postId required | path | string | The post group `id` (uuid). |
Request
curl -X POST 'https://api-app.postnext.io/api/posts/{postId}/publish' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Published (may be partial, or handed to the worker for YouTube)401Missing or invalid API key402Subscription is inactive (payment failure). Flat shape, not the standard envelope.404Post not found or access denied
Example 200 response
{
"success": true,
"data": {
"group": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
},
"providerPosts": [
{}
],
"queuedProviders": [
"string"
],
"publishStatus": {
"success": true,
"partial": true,
"successfulPublishes": 0,
"queuedPublishes": 0,
"totalPublishes": 0,
"failures": [
{}
]
}
}
}POST/api/posts/{postId}/cancel-schedule
Cancel a scheduled post
Returns the post to draft. Not subscription-gated.
| Parameter | In | Type | Description |
|---|---|---|---|
postId required | path | string | The post group `id` (uuid). |
Request
curl -X POST 'https://api-app.postnext.io/api/posts/{postId}/cancel-schedule' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Schedule cancelled401Missing or invalid API key404Post not found or access denied
Example 200 response
{
"success": true,
"data": {
"group": {
"id": "string",
"_id": "string",
"userId": "string",
"teamId": "string",
"title": "string",
"description": "string",
"imageUrl": "https://example.com",
"providers": {},
"tags": [
"string"
],
"scheduledTime": "2026-11-19T09:00:00Z",
"status": "DRAFT",
"assigneeId": "string",
"watchers": [
"string"
],
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
},
"providerPosts": [
{}
]
}
}Media
Upload and manage media assets
POST/api/assets/upload/single
Upload a media file
Uploads a single image or video via multipart form data. Only image/* and video/* MIME types are accepted, up to 500 MB. The userId form field is currently required by the server.
| Parameter | In | Type | Description |
|---|---|---|---|
file required | body | string | The image or video file. |
userId required | body | string | Your account uniqueId (required by the server). |
displayName | body | string | |
description | body | string | |
width | body | integer | |
height | body | integer | |
folderId | body | string | |
source | body | one of: user_upload, unsplash, pixabay, pexels, brand_scraper, ai_generated, other |
Request
curl -X POST 'https://api-app.postnext.io/api/assets/upload/single' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'file=@photo.jpg'Responses
201Uploaded400No file, or missing userId/teamId401Missing or invalid API key403Storage limit reached or file exceeds remaining storage
Example 201 response
{
"message": "File uploaded successfully",
"asset": {
"_id": "string",
"teamId": "string",
"userId": "string",
"folderId": "string",
"name": "string",
"originalName": "string",
"type": "string",
"url": "https://example.com",
"size": 0,
"width": 0,
"height": 0,
"displayName": "string",
"source": "user_upload",
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
}POST/api/assets/upload/url
Upload media from a URL
Downloads an image from imageUrl and stores it as an asset. userId is currently required by the server.
| Parameter | In | Type | Description |
|---|---|---|---|
imageUrl required | body | string | Source image URL. |
userId required | body | string | Your account uniqueId (required by the server). |
displayName | body | string | |
description | body | string | |
folderId | body | string | |
source | body | one of: user_upload, unsplash, pixabay, pexels, brand_scraper, ai_generated, other |
Request
curl -X POST 'https://api-app.postnext.io/api/assets/upload/url' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"imageUrl":"https://example.com","userId":"string","displayName":"string","description":"string","folderId":"string","source":"user_upload"}'Request body (application/json)
{
"imageUrl": "https://example.com",
"userId": "string",
"displayName": "string",
"description": "string",
"folderId": "string",
"source": "user_upload"
}Responses
201Downloaded and stored400Missing imageUrl or userId401Missing or invalid API key403Storage limit reached or file exceeds remaining storage
Example 201 response
{
"message": "Image downloaded and uploaded successfully",
"asset": {
"_id": "string",
"teamId": "string",
"userId": "string",
"folderId": "string",
"name": "string",
"originalName": "string",
"type": "string",
"url": "https://example.com",
"size": 0,
"width": 0,
"height": 0,
"displayName": "string",
"source": "user_upload",
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
}POST/api/assets/upload/create-url
Request a direct-to-S3 upload URL
Step 1 of a 3-step direct upload (create-url -> PUT -> complete). Returns a pre-signed S3 PUT URL and an uploadId. Validates the type + declared size and pre-charges your storage quota (refunded if you never complete or the real file is smaller). Then PUT the bytes to uploadUrl with a matching Content-Type header, and call complete.
| Parameter | In | Type | Description |
|---|---|---|---|
filename required | body | string | |
contentType required | body | one of: image/jpeg, image/png, image/webp, image/gif, video/mp4, video/webm | |
sizeBytes required | body | integer | Declared byte size (<= 50MB and within remaining quota). |
Request
curl -X POST 'https://api-app.postnext.io/api/assets/upload/create-url' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"filename":"string","contentType":"image/jpeg","sizeBytes":0}'Request body (application/json)
{
"filename": "string",
"contentType": "image/jpeg",
"sizeBytes": 0
}Responses
201Upload URL issued400No current team selected, unsupported contentType, or invalid sizeBytes401Missing or invalid API key402Storage limit reached or file exceeds remaining storage413Declared size exceeds the 50MB per-upload cap
Example 201 response
{
"success": true,
"data": {
"uploadId": "string",
"uploadUrl": "string",
"key": "string",
"expiresInSeconds": 600
}
}POST/api/assets/upload/complete
Complete a direct-to-S3 upload
Step 3 of the direct upload. Verifies the uploaded object, reconciles the storage charge to the real size, moves it to a permanent location, and creates the asset. Returns the asset (reference its id in a post).
| Parameter | In | Type | Description |
|---|---|---|---|
uploadId required | body | string |
Request
curl -X POST 'https://api-app.postnext.io/api/assets/upload/complete' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"uploadId":"string"}'Request body (application/json)
{
"uploadId": "string"
}Responses
201Asset created400uploadId is required401Missing or invalid API key404Session not found/expired, or no uploaded object413Uploaded object is larger than the declared sizeBytes; re-issue create-url with the correct size415Uploaded bytes do not match the declared type
Example 201 response
{
"success": true,
"data": {
"_id": "string",
"teamId": "string",
"userId": "string",
"folderId": "string",
"name": "string",
"originalName": "string",
"type": "string",
"url": "https://example.com",
"size": 0,
"width": 0,
"height": 0,
"displayName": "string",
"source": "user_upload",
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
}GET/api/assets/mine
List my assets
| Parameter | In | Type | Description |
|---|---|---|---|
page | query | integer | |
limit | query | integer | |
folderId | query | string | Omit for all assets; the literal "null" for root-level only; otherwise a folder id. |
Request
curl -X GET 'https://api-app.postnext.io/api/assets/mine' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Paginated assets400Invalid pagination parameters401Missing or invalid API key
Example 200 response
{
"success": true,
"data": [
{
"_id": "string",
"teamId": "string",
"userId": "string",
"folderId": "string",
"name": "string",
"originalName": "string",
"type": "string",
"url": "https://example.com",
"size": 0,
"width": 0,
"height": 0,
"displayName": "string",
"source": "user_upload",
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
],
"pagination": {
"total": 0,
"page": 0,
"limit": 0,
"totalPages": 0,
"hasMore": true
}
}GET/api/assets/{assetId}
Get a media asset
Returns a single asset's metadata (JSON), scoped to your team.
| Parameter | In | Type | Description |
|---|---|---|---|
assetId required | path | string |
Request
curl -X GET 'https://api-app.postnext.io/api/assets/{assetId}' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Asset metadata401Missing or invalid API key404Asset not found
Example 200 response
{
"success": true,
"data": {
"_id": "string",
"teamId": "string",
"userId": "string",
"folderId": "string",
"name": "string",
"originalName": "string",
"type": "string",
"url": "https://example.com",
"size": 0,
"width": 0,
"height": 0,
"displayName": "string",
"source": "user_upload",
"createdAt": "2026-11-19T09:00:00Z",
"updatedAt": "2026-11-19T09:00:00Z"
}
}DELETE/api/assets/{assetId}
Delete an asset
Deletes an owned asset. Note: a missing asset currently returns 500 (not 404) because the not-found case surfaces from a generic catch.
| Parameter | In | Type | Description |
|---|---|---|---|
assetId required | path | string |
Request
curl -X DELETE 'https://api-app.postnext.io/api/assets/{assetId}' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Deleted400Missing assetId/teamId401Missing or invalid API key
Example 200 response
{
"success": true,
"message": "Asset deleted successfully"
}Analytics
Performance metrics
GET/api/v1/analytics
Account activity summary
Counts of posts, ideas and assets created in the last 7 days.
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Summary counts401Missing or invalid API key
Example 200 response
{
"success": true,
"data": {
"posts": {
"teamCount": 0,
"userCount": 0
},
"ideas": {
"teamCount": 0,
"userCount": 0
},
"assets": {
"teamCount": 0,
"userCount": 0
}
}
}GET/api/v1/analytics/overview
Performance overview
| Parameter | In | Type | Description |
|---|---|---|---|
channel | query | string | Channel/provider id to filter by. Omit or "all" for no filter. |
period | query | one of: 7d, 30d, 90d, all |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/overview' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Aggregated totals over the selected period401Missing or invalid API key403Caller is not a member of the team
Example 200 response
{
"success": true,
"data": {
"totals": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"engagementRate": 0
},
"coverage": 0,
"dataThrough": "2026-11-19T09:00:00Z",
"vsPrevious": {
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"engagementRate": 0
},
"capability": "ok"
}
}GET/api/v1/analytics/posts
Per-post performance
| Parameter | In | Type | Description |
|---|---|---|---|
channel | query | string | Channel/provider id to filter by. Omit or "all" for no filter. |
period | query | one of: 7d, 30d, 90d, all | |
sort | query | one of: engagement, impressions, likes, recent |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/posts' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Per-post metric rows401Missing or invalid API key403Caller is not a member of the team
Example 200 response
{
"success": true,
"data": {
"rows": [
{
"postId": "string",
"provider": "string",
"channelName": "string",
"publishedAt": "2026-11-19T09:00:00Z",
"impressions": 0,
"reach": 0,
"likes": 0,
"comments": 0,
"engagementRate": 0
}
],
"capability": "ok"
}
}GET/api/v1/analytics/daily
Daily activity counts
Per-day counts of posts, ideas and assets over the last N days (max 60).
| Parameter | In | Type | Description |
|---|---|---|---|
days | query | integer |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/daily' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Daily count series401Missing or invalid API key
Example 200 response
{
"success": true,
"data": [
{
"date": "2026-07-15",
"posts": {
"teamCount": 0,
"userCount": 0
},
"ideas": {
"teamCount": 0,
"userCount": 0
},
"assets": {
"teamCount": 0,
"userCount": 0
}
}
]
}GET/api/v1/analytics/audience-growth
Audience (follower) growth over time
| Parameter | In | Type | Description |
|---|---|---|---|
channel | query | string | Channel/provider id to filter by. Omit or "all" for no filter. |
period | query | one of: 7d, 30d, 90d, all |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/audience-growth' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Follower-count time series401Missing or invalid API key403Caller is not a member of the team
Example 200 response
{
"success": true,
"data": {
"series": [
{
"date": "string",
"followers": 0
}
]
}
}GET/api/v1/analytics/engagement-over-time
Engagement rate over time
Per-day engagement rate for the period. Requires a paid tier.
| Parameter | In | Type | Description |
|---|---|---|---|
channel | query | string | Channel/provider id to filter by. Omit or "all" for no filter. |
period | query | one of: 7d, 30d, 90d, all |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/engagement-over-time' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Engagement-rate time series401Missing or invalid API key403Caller is not a member of the team
Example 200 response
{
"success": true,
"data": {
"series": [
{
"date": "string",
"engagementRate": 0,
"numerator": 0,
"denominator": 0
}
],
"capability": "ok"
}
}GET/api/v1/analytics/best-time-to-post
Best time to post
Recommended posting slots for a platform, derived from your own post performance. Requires a paid subscription.
| Parameter | In | Type | Description |
|---|---|---|---|
platform required | query | one of: twitter, instagram, linkedin, threads, youtube, tiktok, bluesky | |
timezone | query | string | IANA timezone for the returned hours. |
topN | query | integer |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/best-time-to-post' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Ranked posting-time recommendations401Missing or invalid API key
Example 200 response
{
"success": true,
"data": {
"platform": "string",
"timezone": "string",
"sampleWindowDays": 0,
"sampleSize": 0,
"metricsAvailable": true,
"recommendations": [
{
"dayOfWeek": 0,
"dayLabel": "Tue",
"hour": 0,
"score": 0,
"basedOn": {
"posts": 0,
"avgEngagement": 0
}
}
]
}
}POST/api/v1/analytics/sync
Sync analytics from the platforms
Triggers an on-demand refresh of post metrics and follower counts for your team, pulling fresh numbers from the connected platforms. Bounded by per-platform call caps and rate-limited. Requires a paid tier.
Request
curl -X POST 'https://api-app.postnext.io/api/v1/analytics/sync' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Sync result summary401Missing or invalid API key403Caller is not a member of the team
Example 200 response
{
"success": true,
"data": {
"synced": true,
"summary": {
"teamId": "string",
"twitterSnapped": 0,
"instagramSnapped": 0,
"tiktokSnapped": 0,
"linkedinSnapped": 0
}
}
}GET/api/v1/analytics/post/{postId}
Analytics for a single post
Latest stored metrics for one post, one entry per provider it was published to.
| Parameter | In | Type | Description |
|---|---|---|---|
postId required | path | string |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/post/{postId}' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Latest per-provider metrics for the post401Missing or invalid API key403Caller is not a member of the team
Example 200 response
{
"success": true,
"data": {
"postId": "string",
"providers": [
{
"provider": "instagram",
"date": "2026-07-15",
"snappedAt": "2026-11-19T09:00:00Z",
"metrics": {}
}
]
}
}GET/api/v1/analytics/post/{postId}/daily
Daily analytics for a single post
Daily snapshot series plus day-over-day deltas per provider.
| Parameter | In | Type | Description |
|---|---|---|---|
postId required | path | string |
Request
curl -X GET 'https://api-app.postnext.io/api/v1/analytics/post/{postId}/daily' \
-H 'x-api-key: YOUR_API_KEY'Responses
200Daily snapshots and deltas401Missing or invalid API key403Caller is not a member of the team
Example 200 response
{
"success": true,
"data": {
"postId": "string",
"series": [
{
"provider": "instagram",
"date": "2026-07-15",
"snappedAt": "2026-11-19T09:00:00Z",
"metrics": {}
}
],
"deltas": [
{
"date": "string",
"provider": "string",
"delta": {}
}
]
}
}Still stuck?
Email contact@postnext.io. Write the email address of your PostNext account and what you tried.