Help centre

PostNext API reference

Send every request to https://api-app.postnext.io with your API key in the x-api-key header. Responses are JSON.

Version 1.0.0 · 31 endpoints · OpenAPI file

Start here

  1. Copy your API key from Account settings, API keys.
  2. Add the header x-api-key: YOUR_API_KEY to every request.
  3. 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 verified
  • 401Missing 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 connections
  • 401Missing 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.

ParameterInTypeDescription
provider requiredpathone of: twitter, instagram, linkedin, threads, youtube, tiktok, bluesky
channelName requiredpathstringThe 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 active
  • 400Missing required parameters
  • 401Token expired
  • 404Connection 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.

ParameterInTypeDescription
pagequeryintegerPage number. Presence of `page` or `limit` enables pagination.
limitqueryintegerPage size (default 50 when paginating).
statusqueryone of: DRAFT, SCHEDULED, PUBLISHING, PUBLISHED, FAILED, APPROVALFilter by post status.
viewqueryone of: calendar`calendar` returns a slimmed calendar shape.
excludeContentPlanDraftsquerybooleanExclude 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 posts
  • 401Missing 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.

ParameterInTypeDescription
providers requiredbodyobjectMap keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting.
titlebodystring
descriptionbodystring
imageUrlbodystring
tagsbodyarray of string
assigneeIdbodystring
watchersbodyarray of string
timezonebodystringIANA timezone, used with recurrence.
recurrencebodyobjectOptional 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 created
  • 400Validation failed (thread order/media, first comment over cap `INVALID_FIRST_COMMENT`, or invalid recurrence `INVALID_RECURRENCE`).
  • 401Missing or invalid API key
  • 402Subscription 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.

ParameterInTypeDescription
statusqueryone of: DRAFT, SCHEDULED, PUBLISHING, PUBLISHED, FAILED, APPROVALFilter by result status (e.g. PUBLISHED, FAILED).
providerqueryone of: twitter, instagram, linkedin, threads, youtube, tiktok, blueskyFilter by platform.
pagequeryinteger
limitqueryinteger

Request

curl -X GET 'https://api-app.postnext.io/api/posts/results' \
  -H 'x-api-key: YOUR_API_KEY'

Responses

  • 200Paginated publish results
  • 400No current team selected
  • 401Missing 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).

ParameterInTypeDescription
providers requiredbodyobjectMap keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting.
titlebodystring
descriptionbodystring
imageUrlbodystring
tagsbodyarray of string
assigneeIdbodystring
watchersbodyarray of string
timezonebodystringIANA timezone, used with recurrence.
recurrencebodyobjectOptional 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 published
  • 400Validation failed (thread order/media, first comment over cap `INVALID_FIRST_COMMENT`, or invalid recurrence `INVALID_RECURRENCE`).
  • 401Missing or invalid API key
  • 402Subscription 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.

ParameterInTypeDescription
providers requiredbodyobjectMap keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting.
titlebodystring
descriptionbodystring
imageUrlbodystring
tagsbodyarray of string
assigneeIdbodystring
watchersbodyarray of string
timezonebodystringIANA timezone, used with recurrence.
recurrencebodyobjectOptional 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 requiredbodystringFuture 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 scheduled
  • 400scheduledAt missing, malformed, or in the past
  • 401Missing or invalid API key
  • 402Subscription 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

ParameterInTypeDescription
groupId requiredpathstringThe 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 posts
  • 401Missing or invalid API key
  • 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": [
      {}
    ]
  }
}

PUT/api/posts/{groupId}

Update a post

Updates content or metadata on an existing post group.

ParameterInTypeDescription
groupId requiredpathstringThe post group `id` (uuid) returned by list/get.
providers requiredbodyobjectMap keyed by provider name (for example `twitter`) or `provider:channelHandle` for multi-account posting.
titlebodystring
descriptionbodystring
imageUrlbodystring
tagsbodyarray of string
assigneeIdbodystring
watchersbodyarray of string
timezonebodystringIANA timezone, used with recurrence.
recurrencebodyobjectOptional 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

  • 200Updated
  • 400Validation failed (thread order/media, first comment over cap `INVALID_FIRST_COMMENT`, or invalid recurrence `INVALID_RECURRENCE`).
  • 401Missing or invalid API key
  • 402Subscription is inactive (payment failure). Flat shape, not the standard envelope.
  • 403No permission to update this post
  • 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": [
      {}
    ]
  }
}

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.

ParameterInTypeDescription
groupId requiredpathstringThe 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

  • 200Deleted
  • 401Missing or invalid API key
  • 404Post not found or access denied
Example 200 response
{
  "success": true,
  "data": {
    "message": "Post deleted successfully"
  }
}

POST/api/posts/{postId}/schedule

Schedule an existing post

ParameterInTypeDescription
postId requiredpathstringThe post group `id` (uuid).
scheduledAt requiredbodystringFuture ISO 8601 datetime.
timezonebodystringIANA 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

  • 200Scheduled
  • 400scheduledAt missing, malformed, or in the past
  • 401Missing or invalid API key
  • 402Subscription 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.

ParameterInTypeDescription
postId requiredpathstringThe 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 key
  • 402Subscription 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.

ParameterInTypeDescription
postId requiredpathstringThe 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 cancelled
  • 401Missing or invalid API key
  • 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": [
      {}
    ]
  }
}

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.

ParameterInTypeDescription
file requiredbodystringThe image or video file.
userId requiredbodystringYour account uniqueId (required by the server).
displayNamebodystring
descriptionbodystring
widthbodyinteger
heightbodyinteger
folderIdbodystring
sourcebodyone 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

  • 201Uploaded
  • 400No file, or missing userId/teamId
  • 401Missing or invalid API key
  • 403Storage 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.

ParameterInTypeDescription
imageUrl requiredbodystringSource image URL.
userId requiredbodystringYour account uniqueId (required by the server).
displayNamebodystring
descriptionbodystring
folderIdbodystring
sourcebodyone 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 stored
  • 400Missing imageUrl or userId
  • 401Missing or invalid API key
  • 403Storage 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.

ParameterInTypeDescription
filename requiredbodystring
contentType requiredbodyone of: image/jpeg, image/png, image/webp, image/gif, video/mp4, video/webm
sizeBytes requiredbodyintegerDeclared 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 issued
  • 400No current team selected, unsupported contentType, or invalid sizeBytes
  • 401Missing or invalid API key
  • 402Storage limit reached or file exceeds remaining storage
  • 413Declared 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).

ParameterInTypeDescription
uploadId requiredbodystring

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 created
  • 400uploadId is required
  • 401Missing or invalid API key
  • 404Session not found/expired, or no uploaded object
  • 413Uploaded object is larger than the declared sizeBytes; re-issue create-url with the correct size
  • 415Uploaded 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

ParameterInTypeDescription
pagequeryinteger
limitqueryinteger
folderIdquerystringOmit 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 assets
  • 400Invalid pagination parameters
  • 401Missing 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.

ParameterInTypeDescription
assetId requiredpathstring

Request

curl -X GET 'https://api-app.postnext.io/api/assets/{assetId}' \
  -H 'x-api-key: YOUR_API_KEY'

Responses

  • 200Asset metadata
  • 401Missing or invalid API key
  • 404Asset 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.

ParameterInTypeDescription
assetId requiredpathstring

Request

curl -X DELETE 'https://api-app.postnext.io/api/assets/{assetId}' \
  -H 'x-api-key: YOUR_API_KEY'

Responses

  • 200Deleted
  • 400Missing assetId/teamId
  • 401Missing 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 counts
  • 401Missing 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

ParameterInTypeDescription
channelquerystringChannel/provider id to filter by. Omit or "all" for no filter.
periodqueryone 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 period
  • 401Missing or invalid API key
  • 403Caller 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

ParameterInTypeDescription
channelquerystringChannel/provider id to filter by. Omit or "all" for no filter.
periodqueryone of: 7d, 30d, 90d, all
sortqueryone 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 rows
  • 401Missing or invalid API key
  • 403Caller 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).

ParameterInTypeDescription
daysqueryinteger

Request

curl -X GET 'https://api-app.postnext.io/api/v1/analytics/daily' \
  -H 'x-api-key: YOUR_API_KEY'

Responses

  • 200Daily count series
  • 401Missing 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

ParameterInTypeDescription
channelquerystringChannel/provider id to filter by. Omit or "all" for no filter.
periodqueryone 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 series
  • 401Missing or invalid API key
  • 403Caller 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.

ParameterInTypeDescription
channelquerystringChannel/provider id to filter by. Omit or "all" for no filter.
periodqueryone 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 series
  • 401Missing or invalid API key
  • 403Caller 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.

ParameterInTypeDescription
platform requiredqueryone of: twitter, instagram, linkedin, threads, youtube, tiktok, bluesky
timezonequerystringIANA timezone for the returned hours.
topNqueryinteger

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 recommendations
  • 401Missing 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 summary
  • 401Missing or invalid API key
  • 403Caller 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.

ParameterInTypeDescription
postId requiredpathstring

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 post
  • 401Missing or invalid API key
  • 403Caller 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.

ParameterInTypeDescription
postId requiredpathstring

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 deltas
  • 401Missing or invalid API key
  • 403Caller 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.