AiVideoEditor
無料で始める
メニュー

APIリファレンス

API版2026-11-09 · OpenAPI 3.1 YAMLをダウンロード

認証にはワークスペース単位のプロダクトキーを使用します: Authorization: Bearer pk_v1_…。キーは明示的なスコープとオプションのアカウント許可リストを持ちます。キーが他のキーを作成したり請求を変更したりすることは決してできません。 すべてのミューテーションには Idempotency-Key ヘッダーが必要で、編集と予約にはさらに expectedVersion が必要です。公開と予約は、宛先ごとに 1 つの配信 ID とともに 202 Accepted を返します。202 は何かが公開されたという主張では決してありません。結果は GET /posts/{id}、カスタマーウェブフック、またはバックオフ付きの上限付きポーリングで確認してください。 エラーはコントラクト v1 の正規化されたエンベロープを使用します: code、安全な message、fieldErrors、destinationErrors、retryable、retryAfterSeconds、requestId。投稿クレジットや割り当てのエラーコードは意図的に存在しません。

認証

ワークスペースの製品キーを「Authorization: Bearer pk_v1_…」として送信します。各操作に必要な権限範囲が記載されています。認証と権限をご覧ください。

GET /capabilities

許可された宛先で利用可能なフォーマットとオプション

スコープ accounts:read が必要です。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "accounts"
  ],
  "summary": "許可された宛先で利用可能なフォーマットとオプション",
  "description": "スコープ `accounts:read` が必要です。",
  "responses": {
    "200": {
      "description": "Capability list",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "capabilities",
              "requestId"
            ],
            "properties": {
              "capabilities": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Capability"
                }
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

GET /accounts

このキーから見える宛先アカウントを一覧表示します

キーのアカウント許可リストに従います。スコープ accounts:read が必要です。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "accounts"
  ],
  "summary": "このキーから見える宛先アカウントを一覧表示します",
  "description": "キーのアカウント許可リストに従います。スコープ `accounts:read` が必要です。",
  "parameters": [
    {
      "$ref": "#/components/parameters/cursor"
    },
    {
      "$ref": "#/components/parameters/limit"
    }
  ],
  "responses": {
    "200": {
      "description": "Account page",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "accounts",
              "requestId"
            ],
            "properties": {
              "accounts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Account"
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

GET /accounts/{id}/tiktok/settings

許可された接続アカウントの検証済み TikTok クリエイター設定を読み取ります

accounts:read とキーのアカウント許可リストが必要です。この読み取りが人間の公開同意を提供することは決してありません。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "accounts"
  ],
  "summary": "許可された接続アカウントの検証済み TikTok クリエイター設定を読み取ります",
  "description": "accounts:read とキーのアカウント許可リストが必要です。この読み取りが人間の公開同意を提供することは決してありません。",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Current typed creator settings; a person must confirm choices in the composer",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "settings",
              "humanConfirmationRequired",
              "requestId"
            ],
            "properties": {
              "settings": {
                "$ref": "#/components/schemas/TikTokCreatorSettings"
              },
              "humanConfirmationRequired": {
                "type": "boolean",
                "const": true
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /media/upload-intents

バイトを予約し、ダイレクトアップロードの手順を返します

スコープ media:write と Idempotency-Key が必要です。バイト列は、返された手順に従ってプライベートオブジェクトストレージへ直接 (DIRECTLY) アップロードされます。この API を経由することは決してありません。恒久的な公開メディア URL は存在しません。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "media"
  ],
  "summary": "バイトを予約し、ダイレクトアップロードの手順を返します",
  "description": "スコープ `media:write` と Idempotency-Key が必要です。バイト列は、返された手順に従ってプライベートオブジェクトストレージへ直接 (DIRECTLY) アップロードされます。この API を経由することは決してありません。恒久的な公開メディア URL は存在しません。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/UploadIntentRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Upload instructions created",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/UploadIntentResponse"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "402": {
      "$ref": "#/components/responses/PaymentRequired"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

GET /media/{id}

メディアのステータスと有効期限 (恒久的な公開 URL はありません)

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "media"
  ],
  "summary": "メディアのステータスと有効期限 (恒久的な公開 URL はありません)",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    }
  ],
  "responses": {
    "200": {
      "description": "Media status",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "media",
              "requestId"
            ],
            "properties": {
              "media": {
                "$ref": "#/components/schemas/MediaStatus"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /media/{id}/upload-parts

既存のアップロードセッションで 1〜64 個のマルチパート PUT URL を更新します

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "media"
  ],
  "summary": "既存のアップロードセッションで 1〜64 個のマルチパート PUT URL を更新します",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "fromPart",
            "toPart"
          ],
          "properties": {
            "fromPart": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "toPart": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Fresh upload URLs; toPart must be at least fromPart and at most fromPart + 63",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "sessionId",
              "parts",
              "requestId"
            ],
            "properties": {
              "sessionId": {
                "type": "string",
                "format": "uuid"
              },
              "requestId": {
                "type": "string"
              },
              "parts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "partNumber",
                    "url",
                    "expiresAt"
                  ],
                  "properties": {
                    "partNumber": {
                      "type": "integer"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /media/{id}/abandon

不完全なアップロードを放棄し、そのストレージ予約を解放します

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "media"
  ],
  "summary": "不完全なアップロードを放棄し、そのストレージ予約を解放します",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Abandoned; failed external cleanup remains durably queued",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "abandoned",
              "requestId"
            ],
            "properties": {
              "abandoned": {
                "type": "boolean",
                "const": true
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /media/{id}/finalize

アップロードされたオブジェクトを検証し、利用可能にします

スコープ media:write と Idempotency-Key が必要です。サーバーは不変の最終 (FINAL) コピーに対してサイズ/MIME と境界付きの署名を検証します。バイトの予約は正確に 1 回だけ確定します。送信するのはセッションの識別情報のみです (該当する場合はマルチパートのパートレシートも)。すべてのメタデータはサーバー自身が観察します。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "media"
  ],
  "summary": "アップロードされたオブジェクトを検証し、利用可能にします",
  "description": "スコープ `media:write` と Idempotency-Key が必要です。サーバーは不変の最終 (FINAL) コピーに対してサイズ/MIME と境界付きの署名を検証します。バイトの予約は正確に 1 回だけ確定します。送信するのはセッションの識別情報のみです (該当する場合はマルチパートのパートレシートも)。すべてのメタデータはサーバー自身が観察します。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FinalizeRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Finalized",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "media",
              "requestId"
            ],
            "properties": {
              "media": {
                "$ref": "#/components/schemas/FinalizeResult"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /posts

下書きを作成します

スコープ posts:write と Idempotency-Key が必要です。ボディはコントラクト v1 の厳格な DraftInputSchema で解析されます。重複する宛先アカウントは拒否されます。保存は寛容です。公開前に検証してください。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "posts"
  ],
  "summary": "下書きを作成します",
  "description": "スコープ `posts:write` と Idempotency-Key が必要です。ボディはコントラクト v1 の厳格な DraftInputSchema で解析されます。重複する宛先アカウントは拒否されます。保存は寛容です。公開前に検証してください。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DraftInput"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Draft created",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "post",
              "requestId"
            ],
            "properties": {
              "post": {
                "$ref": "#/components/schemas/DraftSaveResult"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

GET /posts

投稿を一覧表示します

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "posts"
  ],
  "summary": "投稿を一覧表示します",
  "parameters": [
    {
      "$ref": "#/components/parameters/cursor"
    },
    {
      "$ref": "#/components/parameters/limit"
    },
    {
      "name": "state",
      "in": "query",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Post page",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "posts",
              "requestId"
            ],
            "properties": {
              "posts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PostListItem"
                }
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

GET /posts/{id}

投稿の集約ステータスと宛先ごとのステータス

「プロバイダーに受け付けられた」は「公開済み」ではありません。ネイティブリンクは確認されたレシートの後にのみ表示されます。パーマリンクがないことは失敗の証拠ではありません。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "posts"
  ],
  "summary": "投稿の集約ステータスと宛先ごとのステータス",
  "description": "「プロバイダーに受け付けられた」は「公開済み」ではありません。ネイティブリンクは確認されたレシートの後にのみ表示されます。パーマリンクがないことは失敗の証拠ではありません。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    }
  ],
  "responses": {
    "200": {
      "description": "Post status",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "post",
              "requestId"
            ],
            "properties": {
              "post": {
                "$ref": "#/components/schemas/PostStatus"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

PATCH /posts/{id}

下書きを編集します (バージョン確認付き)

Idempotency-Key と expectedVersion が必要です。古いバージョンを指定すると、現在のバージョンを error.details.currentVersion に入れた 409 revision_conflict が返されます。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "posts"
  ],
  "summary": "下書きを編集します (バージョン確認付き)",
  "description": "Idempotency-Key と expectedVersion が必要です。古いバージョンを指定すると、現在のバージョンを `error.details.currentVersion` に入れた 409 revision_conflict が返されます。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DraftUpdateInput"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Updated draft",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "post",
              "requestId"
            ],
            "properties": {
              "post": {
                "$ref": "#/components/schemas/DraftSaveResult"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /posts/{id}/validate

構造化された宛先ごとの検証 (ミューテーションなし)

宛先に問題がある場合は validation.valid=false とともに 200 を返します (コンテンツの問題がエラーステータスになることは決してありません)。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "posts"
  ],
  "summary": "構造化された宛先ごとの検証 (ミューテーションなし)",
  "description": "宛先に問題がある場合は `validation.valid=false` とともに 200 を返します (コンテンツの問題がエラーステータスになることは決してありません)。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "expectedVersion": {
              "type": "integer",
              "minimum": 1
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Validation result",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "validation",
              "requestId"
            ],
            "properties": {
              "validation": {
                "$ref": "#/components/schemas/ValidationResult"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /posts/{id}/publish

今すぐ公開します (202)

スコープ posts:publish と Idempotency-Key が必要です。オプションの expectedVersion は、編集と同じ楽観的並行性の保証を適用します。宛先ごとに 1 つの配信 ID を返します。公開済みと主張することは決してありません。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "posts"
  ],
  "summary": "今すぐ公開します (202)",
  "description": "スコープ `posts:publish` と Idempotency-Key が必要です。オプションの `expectedVersion` は、編集と同じ楽観的並行性の保証を適用します。宛先ごとに 1 つの配信 ID を返します。公開済みと主張することは決してありません。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "expectedVersion": {
              "type": "integer",
              "minimum": 1
            }
          }
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Accepted for dispatch",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AcceptedOperation"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "402": {
      "$ref": "#/components/responses/PaymentRequired"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /posts/{id}/schedule

固定されたリビジョンを予約します (202)

スコープ posts:publish に加えて Idempotency-Key と expectedVersion が必要です。バッチ全体に対して 1 つの時刻を指定します。未来の時刻で、かつ 90 日のホライズン内でなければなりません (共有サービスが強制します)。V1 では revisionId は null でなければなりません。任意のリビジョンの選択はサポートされず、拒否されます。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "posts"
  ],
  "summary": "固定されたリビジョンを予約します (202)",
  "description": "スコープ `posts:publish` に加えて Idempotency-Key と expectedVersion が必要です。バッチ全体に対して 1 つの時刻を指定します。未来の時刻で、かつ 90 日のホライズン内でなければなりません (共有サービスが強制します)。V1 では `revisionId` は null でなければなりません。任意のリビジョンの選択はサポートされず、拒否されます。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ScheduleRequest"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Scheduled",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AcceptedOperation"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "402": {
      "$ref": "#/components/responses/PaymentRequired"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /deliveries/{id}/cancel

安全に未処理の場合に 1 つの宛先ジョブをキャンセルします

スコープ posts:publish と Idempotency-Key が必要です。すでに提出された配信は、実際の状態とともに 409 too_late_to_cancel を返します。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "deliveries"
  ],
  "summary": "安全に未処理の場合に 1 つの宛先ジョブをキャンセルします",
  "description": "スコープ `posts:publish` と Idempotency-Key が必要です。すでに提出された配信は、実際の状態とともに 409 too_late_to_cancel を返します。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "responses": {
    "200": {
      "description": "Cancellation result",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "delivery",
              "requestId"
            ],
            "properties": {
              "delivery": {
                "type": "object",
                "required": [
                  "deliveryId",
                  "canceled",
                  "state"
                ],
                "properties": {
                  "deliveryId": {
                    "type": "string"
                  },
                  "canceled": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string"
                  }
                }
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /deliveries/{id}/retry

既知の失敗した宛先を 1 つ再試行します

スコープ posts:publish と Idempotency-Key が必要です。不明な結果や成功した配信は拒否されます。再試行すると投稿が重複する可能性があります。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "deliveries"
  ],
  "summary": "既知の失敗した宛先を 1 つ再試行します",
  "description": "スコープ `posts:publish` と Idempotency-Key が必要です。不明な結果や成功した配信は拒否されます。再試行すると投稿が重複する可能性があります。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "responses": {
    "200": {
      "description": "Retry accepted",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "delivery",
              "requestId"
            ],
            "properties": {
              "delivery": {
                "type": "object",
                "required": [
                  "deliveryId",
                  "state"
                ],
                "properties": {
                  "deliveryId": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  }
                }
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

GET /usage

プラン、アカウント/シート/ストレージの使用状況、アクティビティ、レート情報

スコープ usage:read が必要です。いかなる種類の残り投稿数カウンターも含まれません (NO)。投稿はすべての有料プランで無制限です。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "usage"
  ],
  "summary": "プラン、アカウント/シート/ストレージの使用状況、アクティビティ、レート情報",
  "description": "スコープ `usage:read` が必要です。いかなる種類の残り投稿数カウンターも含まれません (NO)。投稿はすべての有料プランで無制限です。\n",
  "responses": {
    "200": {
      "description": "Usage snapshot",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "usage",
              "requestId"
            ],
            "properties": {
              "usage": {
                "$ref": "#/components/schemas/Usage"
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

POST /webhooks

カスタマーイベントの宛先を登録します

スコープ webhooks:manage と Idempotency-Key が必要です。HTTPS のみ対応です。SSRF 検証 (スキーム、資格情報、DNS 解決した境界付きアドレス) は保存前に実行されます。署名シークレットは最初 (FIRST) の作成レスポンスでのみ返されます。冪等な再生ではシークレットなしのエンドポイントが返されます。作成時にはターゲット指定された検証イベントもキューに入ります。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "webhooks"
  ],
  "summary": "カスタマーイベントの宛先を登録します",
  "description": "スコープ `webhooks:manage` と Idempotency-Key が必要です。HTTPS のみ対応です。SSRF 検証 (スキーム、資格情報、DNS 解決した境界付きアドレス) は保存前に実行されます。署名シークレットは最初 (FIRST) の作成レスポンスでのみ返されます。冪等な再生ではシークレットなしのエンドポイントが返されます。作成時にはターゲット指定された検証イベントもキューに入ります。\n",
  "parameters": [
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/CreateWebhookRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Endpoint created (secret shown once)",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "webhook",
              "requestId"
            ],
            "properties": {
              "webhook": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WebhookEndpoint"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "secret": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Present only on the first successful creation; null on replay."
                      }
                    }
                  }
                ]
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "422": {
      "$ref": "#/components/responses/Validation"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

GET /webhooks

イベントの宛先を一覧表示します (シークレットは含まれません)

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "webhooks"
  ],
  "summary": "イベントの宛先を一覧表示します (シークレットは含まれません)",
  "responses": {
    "200": {
      "description": "Endpoint list",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "webhooks",
              "requestId"
            ],
            "properties": {
              "webhooks": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              },
              "requestId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

DELETE /webhooks/{id}

イベントの宛先を削除します

スコープ webhooks:manage と Idempotency-Key が必要です (繰り返し実行は安全です)。

各操作にはパラメーター、リクエスト本文、レスポンス、コンポーネント参照を記載しています。参照先の定義は下に表示されます。

{
  "tags": [
    "webhooks"
  ],
  "summary": "イベントの宛先を削除します",
  "description": "スコープ `webhooks:manage` と Idempotency-Key が必要です (繰り返し実行は安全です)。",
  "parameters": [
    {
      "$ref": "#/components/parameters/id"
    },
    {
      "$ref": "#/components/parameters/idempotencyKey"
    }
  ],
  "responses": {
    "204": {
      "description": "Deleted",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/requestId"
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "409": {
      "$ref": "#/components/responses/Conflict"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    }
  }
}

共通定義

securitySchemes

productKey
{
  "type": "http",
  "scheme": "bearer",
  "bearerFormat": "pk_v1_… (product key; NOT a Supabase key)"
}

parameters

id
{
  "name": "id",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  }
}
cursor
{
  "name": "cursor",
  "in": "query",
  "schema": {
    "type": "string"
  }
}
limit
{
  "name": "limit",
  "in": "query",
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 100,
    "default": 25
  }
}
idempotencyKey
{
  "name": "Idempotency-Key",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 255
  },
  "description": "同じキー + 同じ正規化されたボディは、記録された結果を再生します。同じキー + 異なるボディは 409 idempotency_conflict を返します。\n"
}

headers

requestId
{
  "description": "リクエストごとの相関 ID。エラーエンベロープにもエコーされます。",
  "schema": {
    "type": "string"
  }
}
retryAfter
{
  "description": "次のレート制限ウィンドウまでの秒数。",
  "schema": {
    "type": "integer"
  }
}

responses

Unauthorized
{
  "description": "欠落、不正、不明、期限切れ、または失効したプロダクトキー。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}
Forbidden
{
  "description": "キーに必要なスコープがないか、リソースが別のワークスペースに属しています。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}
PaymentRequired
{
  "description": "契約 (エンタイトルメント) の問題 (サブスクリプション無効、トライアル期限切れ、アカウント/シート/ストレージの制限)。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}
NotFound
{
  "description": "リソースが呼び出し元のワークスペースに存在しません。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}
Conflict
{
  "description": "バージョン/冪等性/キャンセル/同意/配信状態の競合。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}
Validation
{
  "description": "リクエストボディまたは宛先コンテンツが検証に失敗しました。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}
RateLimited
{
  "description": "ワークスペースごとの技術的なレート制限。速度制御のみです。投稿の割り当てでは決してありません。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    },
    "Retry-After": {
      "$ref": "#/components/headers/retryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}
ServerError
{
  "description": "安全な 5XX (プロバイダー利用不可または予期しない内部エラー)。生の診断情報は決して含まれません。",
  "headers": {
    "x-request-id": {
      "$ref": "#/components/headers/requestId"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}

schemas

Error
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "code",
        "message",
        "requestId"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "unauthenticated",
            "forbidden_scope",
            "account_not_allowed",
            "account_limit",
            "seat_limit",
            "storage_limit",
            "subscription_inactive",
            "trial_expired",
            "validation_failed",
            "unsupported_format",
            "consent_required",
            "reconnect_required",
            "destination_identity_changed",
            "revision_conflict",
            "idempotency_conflict",
            "too_late_to_cancel",
            "media_expired",
            "media_deleting",
            "rate_limited",
            "provider_unavailable",
            "submission_unknown",
            "destination_conflict",
            "not_found",
            "internal_error"
          ]
        },
        "message": {
          "type": "string"
        },
        "fieldErrors": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "field",
              "code",
              "message"
            ],
            "properties": {
              "field": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        },
        "destinationErrors": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "accountId",
              "code",
              "message"
            ],
            "properties": {
              "accountId": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfterSeconds": {
          "type": "integer"
        },
        "details": {
          "type": "object",
          "additionalProperties": true,
          "description": "Machine-readable extras, e.g. currentVersion for revision_conflict."
        },
        "requestId": {
          "type": "string"
        },
        "requiresAction": {
          "type": "object",
          "description": "Session UI handoff for human consent; never contains credentials or grants access.",
          "required": [
            "type",
            "url",
            "accountIds"
          ],
          "properties": {
            "type": {
              "type": "string",
              "const": "human_consent"
            },
            "url": {
              "type": "string",
              "format": "uri-reference"
            },
            "accountIds": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "workspaceId": {
              "type": "string",
              "format": "uuid",
              "description": "Verified key workspace; the browser must verify membership before switching its selected workspace."
            }
          }
        }
      }
    }
  }
}
Account
{
  "type": "object",
  "required": [
    "id",
    "network",
    "destinationType",
    "displayName",
    "connectionState"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "network": {
      "type": "string",
      "example": "instagram"
    },
    "destinationType": {
      "type": "string",
      "example": "professional_account"
    },
    "displayName": {
      "type": "string"
    },
    "connectionState": {
      "type": "string",
      "example": "connected"
    },
    "capabilityVersion": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
Capability
{
  "type": "object",
  "required": [
    "accountId",
    "network"
  ],
  "properties": {
    "accountId": {
      "type": "string"
    },
    "network": {
      "type": "string"
    },
    "networkEnabled": {
      "type": "boolean"
    },
    "accountConnected": {
      "type": "boolean"
    },
    "capabilityVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "formats": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "text",
              "single_image",
              "image_set",
              "video"
            ]
          },
          "maxMediaCount": {
            "type": "integer"
          },
          "maxBytes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "requiredFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "eligibleVisibility": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "requiresActionReasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "verifiedAt": {
      "type": "string"
    }
  }
}
UploadIntentRequest
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "filename",
    "declaredMime",
    "declaredBytes"
  ],
  "properties": {
    "filename": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "declaredMime": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "example": "image/jpeg"
    },
    "declaredBytes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 524288000
    },
    "width": {
      "type": "number",
      "minimum": 0
    },
    "height": {
      "type": "number",
      "minimum": 0
    },
    "durationMs": {
      "type": "number",
      "minimum": 0
    }
  }
}
UploadIntent
{
  "type": "object",
  "required": [
    "assetId",
    "sessionId",
    "objectKey",
    "method",
    "expiresAt",
    "maxBytes"
  ],
  "description": "50 MB 未満のファイルは、短期間の `uploadUrl` と必要な `headers` とともに `method: presigned_put` を返します。50 MB 以上のファイルは、`partSizeBytes` と presign されたパート URL の `parts` 配列とともに `method: multipart_initiated` を返します。各パートをアップロードし、その後すべてのパートの ETag レシートで確定してください。\n",
  "properties": {
    "assetId": {
      "type": "string",
      "format": "uuid"
    },
    "sessionId": {
      "type": "string"
    },
    "objectKey": {
      "type": "string",
      "description": "Opaque storage key; never a public URL"
    },
    "method": {
      "type": "string",
      "enum": [
        "presigned_put",
        "multipart_initiated"
      ]
    },
    "uploadUrl": {
      "type": "string",
      "description": "Short-lived; upload bytes directly with the documented method"
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Required request headers for the presigned PUT (e.g. content-type)"
    },
    "partSizeBytes": {
      "type": "integer",
      "description": "Required part size for multipart uploads"
    },
    "parts": {
      "type": "array",
      "description": "Presigned part URLs (multipart_initiated only); request fresh pages when they expire",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "partNumber",
          "url",
          "expiresAt"
        ],
        "properties": {
          "partNumber": {
            "type": "integer",
            "minimum": 1
          },
          "url": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        }
      }
    },
    "expiresAt": {
      "type": "string"
    },
    "maxBytes": {
      "type": "integer"
    }
  }
}
UploadIntentResponse
{
  "allOf": [
    {
      "$ref": "#/components/schemas/UploadIntent"
    },
    {
      "type": "object",
      "required": [
        "requestId"
      ],
      "properties": {
        "requestId": {
          "type": "string"
        }
      }
    }
  ]
}
TikTokCreatorSettings
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "privacyLevels",
    "maxDurationSeconds",
    "allowComments",
    "allowDuet",
    "allowStitch",
    "directPublishingAllowed",
    "inboxAllowed",
    "nativeAccountId"
  ],
  "properties": {
    "privacyLevels": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "PUBLIC_TO_EVERYONE",
          "MUTUAL_FOLLOW_FRIENDS",
          "FOLLOWER_OF_CREATOR",
          "SELF_ONLY"
        ]
      }
    },
    "maxDurationSeconds": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "allowComments": {
      "type": "boolean"
    },
    "allowDuet": {
      "type": "boolean"
    },
    "allowStitch": {
      "type": "boolean"
    },
    "directPublishingAllowed": {
      "type": "boolean"
    },
    "inboxAllowed": {
      "type": "boolean"
    },
    "nativeAccountId": {
      "type": "string"
    },
    "creatorName": {
      "type": "string"
    },
    "creatorAvatarUrl": {
      "type": "string",
      "format": "uri"
    }
  }
}
MediaStatus
{
  "type": "object",
  "required": [
    "id",
    "originalName",
    "mimeType",
    "bytes",
    "uploadState",
    "createdAt",
    "deletionState"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "originalName": {
      "type": "string"
    },
    "mimeType": {
      "type": "string"
    },
    "bytes": {
      "type": "integer"
    },
    "uploadState": {
      "type": "string",
      "enum": [
        "pending",
        "uploading",
        "finalized",
        "rejected"
      ]
    },
    "createdAt": {
      "type": "string"
    },
    "deleteAfter": {
      "type": [
        "string",
        "null"
      ],
      "description": "Dynamic deletion date, or null while kept for scheduled posts."
    },
    "deletionState": {
      "type": "string",
      "enum": [
        "active",
        "deleting",
        "deleted"
      ]
    }
  }
}
FinalizeRequest
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sessionId"
  ],
  "description": "呼び出し元が主張する観察事実 (バイト/MIME/チェックサム) は受け付けられません (NOT accepted)。サーバー自身が不変の最終 (FINAL) コピーを検査します。マルチパートアップロードには、すべてのパートの ETag レシートを含める必要があります。\n",
  "properties": {
    "sessionId": {
      "type": "string",
      "format": "uuid"
    },
    "multipart": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "parts"
      ],
      "properties": {
        "parts": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "partNumber",
              "etag"
            ],
            "properties": {
              "partNumber": {
                "type": "integer",
                "minimum": 1
              },
              "etag": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            }
          }
        }
      }
    }
  }
}
FinalizeResult
{
  "type": "object",
  "required": [
    "assetId",
    "finalizeOperationId",
    "bytes"
  ],
  "properties": {
    "assetId": {
      "type": "string",
      "format": "uuid"
    },
    "finalizeOperationId": {
      "type": "string"
    },
    "bytes": {
      "type": "integer"
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
DraftInput
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "caption",
    "destinations"
  ],
  "properties": {
    "caption": {
      "type": "string",
      "maxLength": 70000
    },
    "mediaIds": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "default": []
    },
    "brandFolderId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "default": null
    },
    "destinations": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "$ref": "#/components/schemas/DraftDestination"
      }
    }
  }
}
DraftDestination
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "accountId",
    "format"
  ],
  "properties": {
    "accountId": {
      "type": "string",
      "format": "uuid"
    },
    "format": {
      "type": "string",
      "enum": [
        "text",
        "single_image",
        "image_set",
        "video"
      ]
    },
    "overrides": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "caption": {
          "type": "string"
        },
        "mediaIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        "title": {
          "type": "string"
        },
        "options": {
          "type": "object",
          "additionalProperties": true,
          "description": "Validated against an allowlisted per-network schema; never a raw vendor bag."
        }
      }
    }
  }
}
DraftUpdateInput
{
  "allOf": [
    {
      "$ref": "#/components/schemas/DraftInput"
    },
    {
      "type": "object",
      "required": [
        "expectedVersion"
      ],
      "properties": {
        "expectedVersion": {
          "type": "integer",
          "minimum": 1
        }
      }
    }
  ]
}
DraftSaveResult
{
  "type": "object",
  "required": [
    "postId",
    "version",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "postId": {
      "type": "string",
      "format": "uuid"
    },
    "version": {
      "type": "integer"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  }
}
PostListItem
{
  "type": "object",
  "required": [
    "postId",
    "version",
    "status",
    "updatedAt"
  ],
  "properties": {
    "postId": {
      "type": "string"
    },
    "version": {
      "type": "integer"
    },
    "status": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  }
}
ValidationResult
{
  "type": "object",
  "required": [
    "valid",
    "revisionVersion",
    "destinationResults"
  ],
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "revisionVersion": {
      "type": "integer"
    },
    "destinationResults": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "accountId",
          "valid",
          "requiresAction"
        ],
        "properties": {
          "accountId": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          },
          "requiresAction": {
            "type": "boolean",
            "description": "True when the network requires an explicit human/consent step."
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
AcceptedOperation
{
  "type": "object",
  "required": [
    "revisionId",
    "version",
    "operationId",
    "deliveryIds",
    "scheduledAt",
    "timezone",
    "requestId"
  ],
  "properties": {
    "revisionId": {
      "type": "string"
    },
    "version": {
      "type": "integer"
    },
    "operationId": {
      "type": "string"
    },
    "deliveryIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scheduledAt": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "warnings": {
      "type": "array",
      "description": "Non-blocking notices preserved on replay, including key_expires_before_schedule when a key expires at or before dispatch.",
      "items": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
ScheduleRequest
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "scheduledAt",
    "timezone",
    "expectedVersion"
  ],
  "properties": {
    "scheduledAt": {
      "type": "string",
      "format": "date-time",
      "example": "2027-01-12T15:00:00Z"
    },
    "timezone": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "example": "America/Indiana/Indianapolis"
    },
    "expectedVersion": {
      "type": "integer",
      "minimum": 1
    },
    "revisionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be null in V1 (schedules the current revision); non-null is rejected."
    }
  }
}
PostStatus
{
  "type": "object",
  "required": [
    "postId",
    "version",
    "status",
    "deliveries"
  ],
  "properties": {
    "postId": {
      "type": "string"
    },
    "version": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "scheduled",
        "in_progress",
        "published",
        "partially_published",
        "needs_attention",
        "canceled"
      ]
    },
    "deliveries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "dueAt": {
            "type": "string"
          },
          "nativePostUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only after a confirmed result."
          },
          "unresolvedExternalOutcome": {
            "type": "boolean"
          },
          "cancelRequestedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "retryCount": {
            "type": "integer"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
Usage
{
  "type": "object",
  "description": "このスキーマのどこにも残り投稿数カウンターは存在しません。投稿はすべての有料プランで無制限です。アクティビティの数値は運用指標です。\n",
  "required": [
    "plan",
    "accounts",
    "members",
    "storage",
    "scheduling",
    "rateLimit",
    "activity"
  ],
  "properties": {
    "plan": {
      "type": "object",
      "required": [
        "id",
        "label",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "trial",
            "creator",
            "studio",
            "operator"
          ]
        },
        "label": {
          "type": "string"
        },
        "version": {
          "type": "integer"
        },
        "interval": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "month",
            "year",
            null
          ]
        },
        "status": {
          "type": "string"
        },
        "paidThrough": {
          "type": [
            "string",
            "null"
          ]
        },
        "trialEndsAt": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "accounts": {
      "type": "object",
      "required": [
        "connected",
        "reserved",
        "maxConnected"
      ],
      "properties": {
        "connected": {
          "type": "integer"
        },
        "reserved": {
          "type": "integer"
        },
        "maxConnected": {
          "type": "integer"
        }
      }
    },
    "members": {
      "type": "object",
      "required": [
        "active",
        "max"
      ],
      "properties": {
        "active": {
          "type": "integer"
        },
        "max": {
          "type": "integer"
        }
      }
    },
    "storage": {
      "type": "object",
      "required": [
        "activeBytes",
        "reservedBytes",
        "maxActiveBytes"
      ],
      "properties": {
        "activeBytes": {
          "type": "integer"
        },
        "reservedBytes": {
          "type": "integer"
        },
        "maxActiveBytes": {
          "type": "integer"
        }
      }
    },
    "scheduling": {
      "type": "object",
      "required": [
        "horizonDays"
      ],
      "properties": {
        "horizonDays": {
          "type": "integer",
          "example": 90
        }
      }
    },
    "rateLimit": {
      "type": "object",
      "required": [
        "requestsPerMinute",
        "note"
      ],
      "properties": {
        "requestsPerMinute": {
          "type": "integer",
          "example": 120
        },
        "note": {
          "type": "string",
          "example": "Technical speed limit: not a posting allowance."
        }
      }
    },
    "activity": {
      "type": "object",
      "description": "Operational metrics only; never an allowance or balance.",
      "required": [
        "deliveriesAttemptedLast30Days",
        "deliveriesPublishedLast30Days"
      ],
      "properties": {
        "deliveriesAttemptedLast30Days": {
          "type": "integer"
        },
        "deliveriesPublishedLast30Days": {
          "type": "integer"
        }
      }
    }
  }
}
CreateWebhookRequest
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "example": "https://example.com/hooks/autoposted"
    },
    "eventTypes": {
      "oneOf": [
        {
          "type": "string",
          "const": "all"
        },
        {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "Omit or \"all\" for every event; an array filters by event type."
    },
    "description": {
      "type": "string"
    }
  }
}
WebhookEndpoint
{
  "type": "object",
  "required": [
    "id",
    "url",
    "eventTypes",
    "enabled",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "eventTypes": {
      "oneOf": [
        {
          "type": "string",
          "const": "all"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "verifiedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string"
    }
  }
}