PostOnce Media API

The Media API from PostOnce — 2 operation(s) for media.

Operations 2

POST /v1/media/uploads Create upload URL #
GET /v1/media/{id} Get media #

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-media-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-media-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostOnce Public Media API
  version: 1.0.0-alpha
  description: Public API for PostOnce paid users
servers:
- url: https://postonce.to/api/public
security:
- bearerAuth: []
tags:
- name: Media
paths:
  /v1/media/uploads:
    post:
      summary: Create upload URL
      description: Creates a signed upload URL and media_id. Upload raw file bytes with PUT to data.upload.signedUrl, then call get_media with that media_id and pass the returned data.public_url as media[].url when creating a post or draft. URL creation alone does not upload bytes. Treat the signed URL as a temporary credential; do not open it in a browser.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - filename
              - content_type
              properties:
                filename:
                  type: string
                  description: Original file name including extension.
                  example: launch-image.png
                content_type:
                  type: string
                  description: MIME type of the file being uploaded.
                  enum:
                  - image/jpeg
                  - image/png
                  - image/webp
                  - video/mp4
                  - video/quicktime
                  - video/webm
                  example: image/png
            examples:
              image:
                value:
                  filename: launch-image.png
                  content_type: image/png
              video:
                value:
                  filename: teaser.mp4
                  content_type: video/mp4
      responses:
        '201':
          description: Signed upload URL created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      content_type:
                        type: string
                        enum:
                        - image/jpeg
                        - image/png
                        - image/webp
                        - video/mp4
                        - video/quicktime
                        - video/webm
                        example: image/png
                      media_id:
                        type: string
                        example: cHVibGljLWFwaS91c2VyLTEyMy8xNzQzNDM0NTY3LWxhdW5jaC1pbWFnZS5wbmc
                      path:
                        type: string
                        example: public-api/user-123/1743434567-launch-image.png
                      upload:
                        type: object
                        properties:
                          path:
                            type: string
                            example: public-api/user-123/1743434567-launch-image.png
                          token:
                            type: string
                            example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                          signedUrl:
                            type: string
                            example: https://swgrcbzlaeshsmygubik.supabase.co/storage/v1/object/upload/sign/social-media/public-api/user-123/1743434567-launch-image.png?token=...
              examples:
                imageUpload:
                  value:
                    data:
                      content_type: image/png
                      media_id: cHVibGljLWFwaS91c2VyLTEyMy8xNzQzNDM0NTY3LWxhdW5jaC1pbWFnZS5wbmc
                      path: public-api/user-123/1743434567-launch-image.png
                      upload:
                        path: public-api/user-123/1743434567-launch-image.png
                        token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                        signedUrl: https://swgrcbzlaeshsmygubik.supabase.co/storage/v1/object/upload/sign/social-media/public-api/user-123/1743434567-launch-image.png?token=...
        '400':
          description: Missing or invalid payload fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidFilename:
                  value:
                    error:
                      code: invalid_filename
                      message: filename is required.
        '401':
          description: Missing, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
      tags:
      - Media
      operationId: postV1MediaUploads
      x-operation-id-source: derived
  /v1/media/{id}:
    get:
      summary: Get media
      description: Resolves a previously returned `media_id` into its storage path and public URL.
      parameters:
      - $ref: '#/components/parameters/mediaId'
      responses:
        '200':
          description: Media resolved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Media'
        '400':
          description: Invalid media ID.
          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:
      - Media
      operationId: getV1MediaById
      x-operation-id-source: derived
components:
  schemas:
    Media:
      type: object
      properties:
        id:
          type: string
        path:
          type: string
        public_url:
          type: string
    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.
    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.
  parameters:
    mediaId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Encoded `media_id` returned by the upload endpoint.
  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.