株式会社キャリースルー Media API

メディアファイル(動画・画像)のアップロード

GitHub OpenAPI

Operations 1

POST /media/upload-url メディアアップロード URL を生成 #

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-mesh-com:post-mesh-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-mesh-com-media-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ポストメッシュ Media API
  description: 'ポストメッシュは、複数のSNSプラットフォームに同時投稿できるサービスです。

    この API を使って、SNS アカウントの連携管理、メディアのアップロード、投稿の作成・管理を行えます。


    ## 対応プラットフォーム


    YouTube / TikTok / Instagram / Threads / X (Twitter) / Facebook


    ## 認証


    すべての API エンドポイントには、`Authorization` ヘッダーに Bearer トークン(API キー)が必要です。


    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    API キーはポストメッシュダッシュボードから発行できます。


    ## 共通仕様


    - リクエスト・レスポンスのフィールド名はすべて **snake_case** です。

    - タイムスタンプはすべて **ISO 8601** 形式(例: `2026-02-17T10:00:00.000Z`)です。

    - 投稿一覧エンドポイントはページネーション付きで結果を返します。'
  version: 1.0.0
servers:
- url: https://post-mesh.com/api/v1
  description: 本番環境
security:
- apiKey: []
tags:
- name: Media
  description: メディアファイル(動画・画像)のアップロード
paths:
  /media/upload-url:
    post:
      tags:
      - Media
      summary: メディアアップロード URL を生成
      description: 'メディアファイル(動画・画像)アップロード用の署名付き URL を生成します。


        **対応ファイル形式:**

        - 動画: `.mp4`, `.mov`

        - 画像: `.jpg`, `.jpeg`, `.png`, `.webp`


        **サイズ上限:**

        - 動画: 最大 1 GB

        - 画像: 最大 20 MB


        **アップロード手順:**


        1. このエンドポイントで `upload_url` と `media_id` を取得

        2. `upload_url` に `PUT` リクエストでファイルをアップロード

        3. 投稿作成時に `media_id` を指定


        `PUT` リクエストには `Content-Type` ヘッダーが**必須**です。

        署名付き URL はリクエストで指定した `mime_type` で生成されるため、

        一致しない `Content-Type` を指定すると `403` エラーになります。


        ```bash

        curl -X PUT \

        -H "Content-Type: video/mp4" \

        --upload-file ./my-video.mp4 \

        "UPLOAD_URL"

        ```


        ```javascript

        await fetch(uploadUrl, {

        method: ''PUT'',

        headers: { ''Content-Type'': ''video/mp4'' },

        body: file,

        });

        ```


        アップロード URL の有効期限は **15 分**です。期限切れの場合は再度このエンドポイントを呼び出してください。'
      operationId: createMediaUploadUrl
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMediaUploadUrlRequest'
            example:
              mime_type: video/mp4
              size_bytes: 52428800
              name: my-video.mp4
      responses:
        '201':
          description: アップロード URL を生成しました
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MediaUpload'
              example:
                data:
                  media_id: media_abc123
                  upload_url: https://storage.googleapis.com/...
                  name: my-video.mp4
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/SubscriptionRequired'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Error:
      type: object
      description: エラーレスポンス
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: 'エラーコード。


                - `VALIDATION_ERROR`(400)— リクエストのバリデーションに失敗

                - `TIKTOK_PRIVACY_LEVEL_UNAVAILABLE`(400)— `POST /posts`で、そのTikTokアカウントでは選べない`tiktok_privacy_level`を指定した

                - `UNAUTHORIZED`(401)— API キーが未指定・無効・失効済み

                - `SUBSCRIPTION_REQUIRED`(403)— 有効なサブスクリプションが必要

                - `NOT_FOUND`(404)— リソースが見つからない

                - `INSIGHTS_NOT_AVAILABLE`(403)— アナリティクス機能の利用資格が無い

                - `ANALYTICS_NOT_AVAILABLE`(403)— `GET /analytics/posts`で、プロプランでない組織から呼び出した

                - `POSTING_READINESS_RECONNECT_REQUIRED`(409)— `POST /posts`で、投稿先のSNS連携が切れており再連携が必要

                - `POSTING_READINESS_UNAVAILABLE`(409)— `POST /posts`で、SNS側の一時的なエラーにより投稿準備を確認できなかった

                - `X_MONTHLY_POST_LIMIT_REACHED`(409)— `POST /posts`で、投稿予定月のXへの投稿がプランの月間上限(スタータープラン月30件、プロプラン月300件)か、プロプランのリンク付き投稿の上限(月50件)を超える(1件はXへの1ポスト。Xアカウントごと、スレッドはポストごとに数え、日本時間の月で区切る)

                - `CONFLICT`(409)— `DELETE /posts/{id}`で、処理中・キャンセル済みなどでキャンセルできない

                - `INTERNAL_ERROR`(500)— 内部サーバーエラー

                '
              enum:
              - VALIDATION_ERROR
              - TIKTOK_PRIVACY_LEVEL_UNAVAILABLE
              - UNAUTHORIZED
              - SUBSCRIPTION_REQUIRED
              - NOT_FOUND
              - INSIGHTS_NOT_AVAILABLE
              - ANALYTICS_NOT_AVAILABLE
              - POSTING_READINESS_RECONNECT_REQUIRED
              - POSTING_READINESS_UNAVAILABLE
              - X_MONTHLY_POST_LIMIT_REACHED
              - CONFLICT
              - INTERNAL_ERROR
            message:
              type: string
              description: エラーの詳細メッセージ
          required:
          - code
          - message
      required:
      - error
    CreateMediaUploadUrlRequest:
      type: object
      description: メディアアップロード URL 生成リクエスト
      properties:
        mime_type:
          type: string
          description: 'アップロードするファイルの MIME タイプ。

            対応: `video/mp4`, `video/quicktime`, `image/jpeg`, `image/png`, `image/webp`

            '
          enum:
          - video/mp4
          - video/quicktime
          - image/jpeg
          - image/png
          - image/webp
        size_bytes:
          type: integer
          minimum: 1
          description: 'ファイルサイズ(バイト)。動画は最大 1 GB、画像は最大 20 MB。

            '
        name:
          type: string
          minLength: 1
          description: ファイル名
      required:
      - mime_type
      - size_bytes
      - name
    MediaUpload:
      type: object
      description: メディアアップロード URL
      properties:
        media_id:
          type: string
          description: 投稿作成時に参照するメディア ID
        upload_url:
          type: string
          format: uri
          description: ファイルアップロード用の署名付き URL(PUT リクエストで使用)
        name:
          type: string
          description: ファイル名
      required:
      - media_id
      - upload_url
      - name
  responses:
    SubscriptionRequired:
      description: 有効なサブスクリプションが必要です
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: SUBSCRIPTION_REQUIRED
              message: Active subscription is required
    InternalError:
      description: 内部サーバーエラー
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred
    ValidationError:
      description: リクエストのバリデーションに失敗しました
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: targets must be a non-empty array
    Unauthorized:
      description: API キーが未指定または無効です
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing or invalid Authorization header
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API キーを Bearer トークンとして送ります。API キーはポストメッシュダッシュボードの「API キー」画面から発行できます。


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

        '