Post Bridge Media API

Media are media records (images, videos, etc.) that can be attached to posts. A Media record must be created before uploading the actual asset. Media assets are stored temporarily and are automatically deleted in the following scenarios: - When the associated post is published - After 24 hours if not attached to any post - When the scheduled post is deleted These endpoints support common media operations like upload, retrieval, and deletion while ensuring efficient storage management.

GitHub OpenAPI

Operations 5

GET /v1/media Get media #
GET /v1/media/{id} Get media by ID #
DELETE /v1/media/{id} Delete media by ID #
POST /v1/media/create-upload-url Media controller create upload url v1 #

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/post-bridge-com:post-bridge-com-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. 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

post-bridge-com-media-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: post bridge Media API
  description: The official API for post bridge
  version: '1.0'
  contact: {}
  termsOfService: https://www.post-bridge.com/tos
servers: []
tags:
- name: Media
  description: 'Media are media records (images, videos, etc.) that can be attached to posts. A Media record must be created before uploading the actual asset.

    Media assets are stored temporarily and are automatically deleted in the following scenarios:

    - When the associated post is published

    - After 24 hours if not attached to any post

    - When the scheduled post is deleted


    These endpoints support common media operations like upload, retrieval, and deletion while ensuring efficient storage management.'
paths:
  /v1/media:
    get:
      description: Get a paginated result for media based on the applied filters
      operationId: MediaController_getMedia_v1
      parameters:
      - name: offset
        required: false
        in: query
        description: Number of items to skip
        schema:
          default: 0
          type: number
      - name: limit
        required: false
        in: query
        description: Number of items to return
        schema:
          default: 10
          type: number
      - name: post_id
        required: false
        in: query
        description: Filter by post IDs. Multiple values imply OR logic (e.g., ?post_id=123&post_id=456).
        schema:
          type: array
          items:
            type: string
      - name: type
        required: false
        in: query
        description: Filter by media types. Multiple values imply OR logic (e.g., ?type=image&type=video).
        schema:
          type: array
          items:
            type: string
            enum:
            - image
            - video
      responses:
        '200':
          description: Paginated data set for media.
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/MediaDto'
                  meta:
                    type: object
                    properties:
                      total:
                        type: number
                        description: Total number of items available.
                      offset:
                        type: number
                        description: Number of items skipped.
                      limit:
                        type: number
                        description: Maximum number of items returned.
                      next:
                        type:
                        - string
                        - 'null'
                        description: URL to the next page of results, or null if none.
                        example: https://api.post-bridge.com/v1/items?offset=10&limit=10
                    required:
                    - total
                    - offset
                    - limit
                    - next
                required:
                - data
                - meta
        '500':
          description: Internal server error when fetching media.
      security:
      - bearer: []
      summary: Get media
      tags:
      - Media
  /v1/media/{id}:
    get:
      description: 'Returns one uploaded media item: its type, size and the URL used when posting. Media is deleted automatically once every post using it has published, after which the ID stops resolving.'
      operationId: MediaController_getMediaById_v1
      parameters:
      - name: id
        required: true
        in: path
        description: Media ID
        schema:
          type: string
      responses:
        '200':
          description: Media item retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaDto'
        '404':
          description: Media not found based on the given ID.
        '500':
          description: Internal server error when fetching the media.
      security:
      - bearer: []
      summary: Get media by ID
      tags:
      - Media
    delete:
      description: Permanently deletes an uploaded media item. Any scheduled or draft post still referencing it will fail to publish, so delete only media you know is unused.
      operationId: MediaController_deleteMedia_v1
      parameters:
      - name: id
        required: true
        in: path
        description: Media ID
        schema:
          type: string
      responses:
        '200':
          description: Media item deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteEntityResponseDto'
        '404':
          description: Media not found based on the given ID.
        '500':
          description: Internal server error when deleting the media.
      security:
      - bearer: []
      summary: Delete media by ID
      tags:
      - Media
  /v1/media/upload-link:
    post:
      description: 'To upload media to attach to your post, make a `POST` request to the `/media/create-upload-url` endpoint.


        You''ll receive the ID of your media item (which can be used anywhere that `media_id` is referenced) and will include an `upload_url` which is a signed URL of the storage location for uploading your file to.


        This URL is unique and publicly signed for a short time, so make sure to upload your files in a timely manner.


        **Example flow using JavaScript and the Fetch API:**


        **Request an upload URL**


        ```js

        // Step 1: Request an upload URL from your API

        const response = await fetch(''https://api.post-bridge.com/v1/media/create-upload-url'', {

        method: ''POST'',

        headers: {

        ''Content-Type'': ''application/json''

        },

        body: JSON.stringify({

        name: ''photo.jpg'',

        mime_type: ''image/jpeg'',

        size_bytes: 123456

        })

        });


        const { media_id, upload_url } = await response.json();

        ```


        **Upload your file to the signed URL**


        ```js

        // Step 2: Upload your file to the signed URL

        const file = /* your File or Blob object, e.g., from an */;

        await fetch(upload_url, {

        method: ''PUT'',

        headers: {

        ''Content-Type'': ''image/jpeg''

        },

        body: file

        });

        ```


        **Use the `media_id` in your post or wherever a media reference is required.**


        **Rate limit note**


        - API keys currently have a general limit of **10 requests per second per key**.

        - There is no bulk endpoint for requesting multiple upload URLs at once.

        - If you are uploading many files, keep your aggregate request rate under the limit and retry `429` responses with backoff.'
      operationId: MediaController_createUploadLink_v1
      parameters: []
      responses:
        '200':
          description: 'Upload page URL and expiry.


            Signed upload URL and media record created successfully.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUploadUrlResponseDto'
      security:
      - bearer: []
      summary: Upload media
      tags:
      - Media
  /v1/media/create-upload-url:
    post:
      operationId: MediaController_createUploadUrl_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUploadUrlDto'
      responses:
        '201':
          description: ''
      security:
      - bearer: []
      tags:
      - Media
      summary: Media controller create upload url v1
      x-summary-source: derived
components:
  schemas:
    CreateUploadUrlResponseDto:
      type: object
      properties:
        media_id:
          type: string
          description: The unique media record ID
        upload_url:
          type: string
          description: The signed upload URL for the client to upload the file
        name:
          type: string
          description: The provided name of the media file
      required:
      - media_id
      - upload_url
      - name
    MediaDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the media object
        mime_type:
          type:
          - string
          - 'null'
          description: The MIME type of the media object
          examples:
          - image/jpeg
          - video/mp4
          - null
        object:
          description: The media object represents the actual media asset
          allOf:
          - $ref: '#/components/schemas/MediaObjectDto'
      required:
      - id
      - mime_type
      - object
    DeleteEntityResponseDto:
      type: object
      properties:
        success:
          type: boolean
          description: Whether or not the entity was deleted
      required:
      - success
    CreateUploadUrlDto:
      type: object
      properties:
        mime_type:
          type: string
          description: The MIME type of the media file
          enum:
          - image/png
          - image/jpeg
          - video/mp4
          - video/quicktime
          - application/pdf
          example: image/png
        size_bytes:
          type: number
          description: The size of the media file in bytes
          example: 1234567
          minimum: 1
        name:
          type: string
          description: The original name of the file (for extension)
          example: myphoto.png
      required:
      - mime_type
      - size_bytes
      - name
    MediaObjectDto:
      type: object
      properties:
        isDeleted:
          type: boolean
          description: The current state of the physical media asset
          example: false
        url:
          type:
          - string
          - 'null'
          description: The URL of the media object
          examples:
          - https://example.com/media.jpg
          - null
        size_bytes:
          type:
          - number
          - 'null'
          description: The size of the media object in bytes
          example: 1024
        name:
          type:
          - string
          - 'null'
          description: The provided name of the media object
      required:
      - isDeleted
      - url
      - size_bytes
      - name
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
    mcp-oauth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://www.post-bridge.com/authorize
          tokenUrl: https://www.post-bridge.com/api/oauth/token
          refreshUrl: https://www.post-bridge.com/api/oauth/token
          scopes:
            posts:read: Read posts, drafts and scheduled posts
            posts:write: Create, update, schedule and delete posts
            accounts:read: List connected social accounts
            media:read: List uploaded media
            media:write: Upload and delete media
            analytics:read: Read post analytics
      description: Used by MCP clients (Claude, ChatGPT, Cursor). REST API callers use the Bearer API key above instead.