PostOnce Drafts API

The Drafts API from PostOnce — 2 operation(s) for drafts.

Operations 4

GET /v1/drafts List drafts #
POST /v1/drafts Create draft #
GET /v1/drafts/{id} Get draft #
PATCH /v1/drafts/{id} Update draft #

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/postonce:postonce-drafts-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

postonce-drafts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostOnce Public Drafts API
  version: 1.0.0-alpha
  description: Public API for PostOnce paid users
servers:
- url: https://postonce.to/api/public
security:
- bearerAuth: []
tags:
- name: Drafts
paths:
  /v1/drafts:
    get:
      summary: List drafts
      description: Lists unscheduled drafts owned by the authenticated API-key profile.
      parameters:
      - $ref: '#/components/parameters/listLimit'
      - $ref: '#/components/parameters/listAfter'
      - name: after_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
        description: Stable ID tie-breaker returned as meta.next_after_id. Send it with after to avoid skipping drafts that share the same updated_at timestamp.
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - inbox
          - ready
          - archived
      responses:
        '200':
          description: Drafts returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Draft'
                  meta:
                    type: object
                    required:
                    - has_more
                    - next_after
                    - next_after_id
                    properties:
                      has_more:
                        type: boolean
                      next_after:
                        type: string
                        format: date-time
                        nullable: true
                      next_after_id:
                        type: string
                        format: uuid
                        nullable: true
        '401':
          description: Missing, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
      tags:
      - Drafts
      operationId: getV1Drafts
      x-operation-id-source: derived
    post:
      summary: Create draft
      description: Saves content and optional media or destinations without publishing or scheduling it. Reuse an Idempotency-Key when retrying.
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          type: string
          minLength: 1
          maxLength: 200
        description: Stable retry key. Reusing it with the same body returns the original draft; reusing it with a different body returns 409.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                content:
                  type: string
                candidate_angle:
                  type: string
                media:
                  type: array
                  items:
                    $ref: '#/components/schemas/DraftMediaInput'
                selected_account_ids:
                  type: array
                  uniqueItems: true
                  items:
                    type: string
                    format: uuid
                suggested_platforms:
                  type: array
                  items:
                    type: string
      responses:
        '201':
          description: Draft created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Draft'
        '400':
          description: Invalid draft or destination account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
      tags:
      - Drafts
      operationId: postV1Drafts
      x-operation-id-source: derived
  /v1/drafts/{id}:
    get:
      summary: Get draft
      description: Returns one draft owned by the authenticated API-key profile.
      parameters:
      - $ref: '#/components/parameters/draftId'
      responses:
        '200':
          description: Draft returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Draft'
        '404':
          description: Draft not found for this profile.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Drafts
      operationId: getV1DraftsById
      x-operation-id-source: derived
    patch:
      summary: Update draft
      description: Updates, archives, restores, or marks a draft ready using updated_at as a compare-and-swap version.
      parameters:
      - $ref: '#/components/parameters/draftId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - expected_updated_at
              properties:
                expected_updated_at:
                  type: string
                  format: date-time
                content:
                  type: string
                candidate_angle:
                  type: string
                media:
                  type: array
                  items:
                    $ref: '#/components/schemas/DraftMediaInput'
                selected_account_ids:
                  type: array
                  uniqueItems: true
                  items:
                    type: string
                    format: uuid
                suggested_platforms:
                  type: array
                  items:
                    type: string
                status:
                  type: string
                  enum:
                  - inbox
                  - ready
                  - archived
      responses:
        '200':
          description: Draft updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Draft'
        '409':
          description: The draft changed or the requested lifecycle transition is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Drafts
      operationId: patchV1DraftsById
      x-operation-id-source: derived
components:
  schemas:
    AuthErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            hint:
              type: string
              description: Suggested action to resolve the error.
            code:
              type: string
              example: invalid_api_key
            message:
              type: string
              example: Invalid API key.
    DraftMediaInput:
      type: object
      additionalProperties: false
      required:
      - type
      - url
      properties:
        url:
          type: string
        type:
          type: string
          enum:
          - image
          - video
        file_name:
          type: string
        mime_type:
          type: string
        width:
          type: integer
          minimum: 0
        height:
          type: integer
          minimum: 0
        size:
          type: integer
          minimum: 0
        duration:
          type: number
          minimum: 0
        thumbnail_url:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            hint:
              type: string
              description: Suggested action to resolve the error.
            code:
              type: string
              example: workflow_limit_reached
            message:
              type: string
              example: You have reached the maximum number of workflows for your plan.
    Draft:
      type: object
      properties:
        id:
          type: string
        content:
          type: string
        candidate_angle:
          type: string
        media:
          type: array
          items:
            $ref: '#/components/schemas/DraftMediaInput'
        selected_account_ids:
          type: array
          uniqueItems: true
          items:
            type: string
            format: uuid
        suggested_platforms:
          type: array
          items:
            type: string
        source_type:
          type: string
        status:
          type: string
          enum:
          - inbox
          - ready
          - scheduled
          - archived
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  parameters:
    listLimit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
      description: Maximum number of items to return.
    draftId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Draft ID.
    listAfter:
      name: after
      in: query
      required: false
      schema:
        type: string
      description: Cursor returned by a previous list response.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Scoped API key issued in PostOnce Settings. OAuth authorization grants are not currently supported.
      x-scopes:
        accounts:read: List and read connected accounts.
        accounts:write: Connect and disconnect social accounts.
        media:read: Read uploaded media.
        media:write: Upload media.
        posts:read: Read posts and unpublished drafts.
        posts:write: Create, update, publish, cancel, retry, and delete posts and drafts.
        workflows:read: List and read crossposting workflows.
        workflows:write: Create, update, and delete crossposting workflows.