PostNext Posts API

Create, schedule, publish and manage posts

GitHub OpenAPI

Operations 11

POST /api/posts Create a draft post #
GET /api/posts List posts #
GET /api/posts/results List publish results #
POST /api/posts/publish Create and publish a post now #
POST /api/posts/schedule Create and schedule a post #
GET /api/posts/{groupId} Get a post #
PUT /api/posts/{groupId} Update a post #
DELETE /api/posts/{groupId} Delete a post #
POST /api/posts/{postId}/schedule Schedule an existing post #
POST /api/posts/{postId}/publish Publish an existing post now #
POST /api/posts/{postId}/cancel-schedule Cancel a scheduled post #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/postnext-io:postnext-io-posts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

postnext-io-posts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostNext Public Posts API
  version: 1.0.0
  description: '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.


    ```bash

    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`.'
servers:
- url: https://api-app.postnext.io
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Posts
  description: Create, schedule, publish and manage posts
paths:
  /api/posts:
    post:
      tags:
      - Posts
      summary: Create a draft post
      description: '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.'
      operationId: createPost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePostRequest'
      responses:
        '201':
          description: Draft created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostGroupEnvelope'
        '400':
          $ref: '#/components/responses/PostValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/PostsLimit'
    get:
      tags:
      - Posts
      summary: List posts
      description: '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.'
      operationId: getPosts
      parameters:
      - name: page
        in: query
        schema:
          type: integer
          minimum: 1
        description: Page number. Presence of `page` or `limit` enables pagination.
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
        description: Page size (default 50 when paginating).
      - name: status
        in: query
        schema:
          $ref: '#/components/schemas/PostStatus'
        description: Filter by post status.
      - name: view
        in: query
        schema:
          type: string
          enum:
          - calendar
        description: '`calendar` returns a slimmed calendar shape.'
      - name: excludeContentPlanDrafts
        in: query
        schema:
          type: boolean
        description: Exclude ungenerated content-plan scaffold drafts.
      responses:
        '200':
          description: Paginated list of posts
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PostGroup'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/posts/results:
    get:
      tags:
      - Posts
      summary: List publish results
      description: '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.'
      operationId: getPostResults
      parameters:
      - name: status
        in: query
        schema:
          $ref: '#/components/schemas/PostStatus'
        description: Filter by result status (e.g. PUBLISHED, FAILED).
      - name: provider
        in: query
        schema:
          $ref: '#/components/schemas/ProviderName'
        description: Filter by platform.
      - name: page
        in: query
        schema:
          type: integer
          default: 1
          minimum: 1
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 100
      responses:
        '200':
          description: Paginated publish results
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/PublishResultRow'
                      pagination:
                        type: object
                        properties:
                          total:
                            type: integer
                          page:
                            type: integer
                          limit:
                            type: integer
                          totalPages:
                            type: integer
        '400':
          description: No current team selected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/posts/publish:
    post:
      tags:
      - Posts
      summary: Create and publish a post now
      description: '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).'
      operationId: createAndPublishPost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePostRequest'
      responses:
        '201':
          description: Created and published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishEnvelope'
        '400':
          $ref: '#/components/responses/PostValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/PostsLimit'
  /api/posts/schedule:
    post:
      tags:
      - Posts
      summary: Create and schedule a post
      description: 'Creates a post group and schedules it. `scheduledAt` is required and must

        be a future ISO 8601 datetime. `timezone` only affects `recurrence`.'
      operationId: createAndSchedulePost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/CreatePostRequest'
              - type: object
                required:
                - scheduledAt
                properties:
                  scheduledAt:
                    type: string
                    format: date-time
                    description: Future ISO 8601 datetime.
      responses:
        '201':
          description: Created and scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostGroupEnvelope'
        '400':
          $ref: '#/components/responses/ScheduleValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/PostsLimit'
  /api/posts/{groupId}:
    get:
      tags:
      - Posts
      summary: Get a post
      operationId: getPost
      parameters:
      - $ref: '#/components/parameters/GroupId'
      responses:
        '200':
          description: The post group with its provider posts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDetailEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/PostNotFound'
    put:
      tags:
      - Posts
      summary: Update a post
      description: Updates content or metadata on an existing post group.
      operationId: updatePost
      parameters:
      - $ref: '#/components/parameters/GroupId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePostRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDetailEnvelope'
        '400':
          $ref: '#/components/responses/PostValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          description: No permission to update this post
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          $ref: '#/components/responses/PostNotFound'
    delete:
      tags:
      - Posts
      summary: Delete a post
      description: '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.'
      operationId: deletePost
      parameters:
      - $ref: '#/components/parameters/GroupId'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Post deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/PostNotFound'
  /api/posts/{postId}/schedule:
    post:
      tags:
      - Posts
      summary: Schedule an existing post
      operationId: schedulePostById
      parameters:
      - $ref: '#/components/parameters/PostId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - scheduledAt
              properties:
                scheduledAt:
                  type: string
                  format: date-time
                  description: Future ISO 8601 datetime.
                timezone:
                  type: string
                  description: IANA timezone, used for recurrence only.
      responses:
        '200':
          description: Scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDetailEnvelope'
        '400':
          $ref: '#/components/responses/ScheduleValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          $ref: '#/components/responses/PostNotFound'
  /api/posts/{postId}/publish:
    post:
      tags:
      - Posts
      summary: Publish an existing post now
      description: '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.'
      operationId: publishPost
      parameters:
      - $ref: '#/components/parameters/PostId'
      responses:
        '200':
          description: Published (may be partial, or handed to the worker for YouTube)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          $ref: '#/components/responses/PostNotFound'
  /api/posts/{postId}/cancel-schedule:
    post:
      tags:
      - Posts
      summary: Cancel a scheduled post
      description: Returns the post to draft. Not subscription-gated.
      operationId: cancelScheduledPost
      parameters:
      - $ref: '#/components/parameters/PostId'
      responses:
        '200':
          description: Schedule cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDetailEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/PostNotFound'
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            message:
              type: string
        code:
          type: string
          description: Present on some endpoints only.
    PostGroupEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/PostGroup'
    PublishResult:
      type: object
      properties:
        status:
          type: string
        publishedAt:
          type: string
          format: date-time
        url:
          type: string
          format: uri
        tweetId:
          type: string
        postId:
          type: string
        error:
          type: string
        attempts:
          type: integer
    PaymentRequiredError:
      type: object
      description: Flat 402 shape (not the standard envelope).
      properties:
        error:
          type: string
          example: PAYMENT_REQUIRED
        code:
          type: string
          example: SUBSCRIPTION_INACTIVE
        status:
          type: string
        currency:
          type: string
        actions:
          type: object
          properties:
            retryUrl:
              type: string
            updateCardUrl:
              type: string
            downgradeUrl:
              type: string
    ProviderResponse:
      type: object
      properties:
        providerId:
          type: string
        channelName:
          type: string
        content:
          $ref: '#/components/schemas/PostContent'
        firstComment:
          type: string
        publishResult:
          $ref: '#/components/schemas/PublishResult'
    ThreadPost:
      type: object
      required:
      - order
      properties:
        order:
          type: integer
          description: 1-based sequential position, no gaps.
        text:
          type: string
        media:
          type: array
          items:
            $ref: '#/components/schemas/MediaItem'
        hashtags:
          type: array
          items:
            type: string
        assetIds:
          type: array
          items:
            type: string
    PostGroup:
      type: object
      properties:
        id:
          type: string
          description: Post group uuid.
        _id:
          type: string
          description: Mongo ObjectId.
        userId:
          type: string
        teamId:
          type: string
        title:
          type: string
        description:
          type: string
        imageUrl:
          type: string
          format: uri
        providers:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ProviderResponse'
        tags:
          type: array
          items:
            type: string
        scheduledTime:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/PostStatus'
        assigneeId:
          type: string
        watchers:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
        limit:
          type: integer
        total:
          type: integer
        totalPages:
          type: integer
        hasNextPage:
          type: boolean
        hasPrevPage:
          type: boolean
    PostStatus:
      type: string
      enum:
      - DRAFT
      - SCHEDULED
      - PUBLISHING
      - PUBLISHED
      - FAILED
      - APPROVAL
    LegacyPostContent:
      type: object
      description: Single-post content (an object).
      properties:
        text:
          type: string
        mediaUrls:
          type: array
          items:
            type: string
            format: uri
        mediaType:
          type: string
          enum:
          - IMAGE
          - VIDEO
          - GIF
          - CAROUSEL
        hashtags:
          type: array
          items:
            type: string
        assetIds:
          type: array
          items:
            type: string
        instagramPostType:
          type: string
          enum:
          - feed
          - post
          - story
          - reel
    PublishResultRow:
      type: object
      properties:
        postGroupId:
          type: string
        provider:
          type: string
          example: instagram
        channelName:
          type:
          - string
          - 'null'
        status:
          $ref: '#/components/schemas/PostStatus'
        publishedAt:
          type:
          - string
          - 'null'
          format: date-time
        url:
          type:
          - string
          - 'null'
          description: Public URL of the published post.
        platformPostId:
          type:
          - string
          - 'null'
        error:
          type:
          - string
          - 'null'
          description: Failure message when status is FAILED.
        attempts:
          type: integer
    PostContent:
      description: 'Either a single LegacyPostContent object, or an array of ThreadPost for a

        multi-part thread (twitter/threads).

        '
      oneOf:
      - $ref: '#/components/schemas/LegacyPostContent'
      - type: array
        items:
          $ref: '#/components/schemas/ThreadPost'
    PublishEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            group:
              $ref: '#/components/schemas/PostGroup'
            providerPosts:
              type: array
              items:
                type: object
            queuedProviders:
              type: array
              items:
                type: string
              description: 'The YouTube channels (provider keys) handed to the publishing worker

                and still uploading. YouTube uploads asynchronously, so these are

                neither published nor failed yet.

                '
            publishStatus:
              type: object
              properties:
                success:
                  type: boolean
                partial:
                  type: boolean
                successfulPublishes:
                  type: integer
                queuedPublishes:
                  type: integer
                  description: 'Channels handed to the publishing worker (YouTube uploads

                    asynchronously), counted in neither `successfulPublishes` nor

                    `failures`.

                    '
                totalPublishes:
                  type: integer
                failures:
                  type: array
                  items:
                    type: object
    MediaItem:
      type: object
      required:
      - url
      - type
      properties:
        url:
          type: string
          format: uri
        type:
          type: string
          enum:
          - IMAGE
          - VIDEO
          - GIF
        assetId:
          type: string
        thumbnail:
          type: string
          format: uri
    ProviderEntry:
      type: object
      required:
      - channelName
      - content
      properties:
        channelName:
          type: string
        providerId:
          type: string
          description: SocialAccount uniqueId. Required for publishing.
        content:
          $ref: '#/components/schemas/PostContent'
        firstComment:
          type: string
          description: Honored only for instagram and linkedin channels.
    PostDetailEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            group:
              $ref: '#/components/schemas/PostGroup'
            providerPosts:
              type: array
              items:
                type: object
    CreatePostRequest:
      type: object
      required:
      - providers
      description: '`userId` and `teamId` are derived from the API key and must not be sent.

        '
      properties:
        providers:
          type: object
          description: 'Map keyed by provider name (for example `twitter`) or

            `provider:channelHandle` for multi-account posting.

            '
          additionalProperties:
            $ref: '#/components/schemas/ProviderEntry'
        title:
          type: string
        description:
          type: string
        imageUrl:
          type: string
          format: uri
        tags:
          type: array
          items:
            type: string
        assigneeId:
          type: string
        watchers:
          type: array
          items:
            type: string
        timezone:
          type: string
          description: IANA timezone, used with recurrence.
        recurrence:
          type:
          - object
          - 'null'
          description: '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).

            '
      example:
        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
    ProviderName:
      type: string
      enum:
      - twitter
      - instagram
      - linkedin
      - threads
      - youtube
      - tiktok
      - bluesky
  parameters:
    PostId:
      name: postId
      in: path
      required: true
      schema:
        type: string
      description: The post group `id` (uuid).
    GroupId:
      name: groupId
      in: path
      required: true
      schema:
        type: string
      description: The post group `id` (uuid) returned by list/get.
  responses:
    ScheduleValidationError:
      description: scheduledAt missing, malformed, or in the past
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PostsLimit:
      description: Posting not allowed on the current plan, or monthly quota reached
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PostValidationError:
      description: 'Validation failed (thread order/media, first comment over cap

        `INVALID_FIRST_COMMENT`, or invalid recurrence `INVALID_RECURRENCE`).

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: 'Subscription is inactive (payment failure). Flat shape, not the standard

        envelope.

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredError'
    PostNotFound:
      description: Post not found or access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key