> ## Documentation Index
> Fetch the complete documentation index at: https://docs.utage-system.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ページ作成

> ステップに新しいページを作成します。

`content_type` で2つの形式を選択できます。
- **elements**（デフォルト）: 要素の階層構造（section > row > col > コンテンツ要素）で作成
- **raw_html**: HTML直接入力で作成（html/head/bodyタグ必須、最大4MB）

elements形式の場合は、先に要素タイプ定義（GET /element-types/funnel）を取得して要素構造を確認してください。


`POST`

```
https://api.utage-system.com/v1/funnels/{funnel_id}/steps/{step_id}/pages
```


## OpenAPI

````yaml POST /funnels/{funnel_id}/steps/{step_id}/pages
openapi: 3.0.3
info:
  title: UTAGE API
  description: |
    UTAGEのパブリックAPIです。ファネル、配信アカウント、シナリオ、メディアなどのリソースをプログラムから操作できます。

    ## 認証
    すべてのリクエストにAPIキーによるBearer認証が必要です（要素タイプエンドポイントを除く）。

    ```
    Authorization: Bearer {api_key}
    ```

    APIキーはUTAGE管理画面から発行できます。

    ## レート制限
    リクエスト数には以下の制限があります。

    | 分間上限 | 日間上限 |
    |----------|----------|
    | 60リクエスト/分 | 10,000リクエスト/日 |

    レスポンスヘッダーで現在の使用状況を確認できます。

    | ヘッダー | 説明 |
    |----------|------|
    | X-RateLimit-Limit | 分間の上限値 |
    | X-RateLimit-Remaining | 分間の残りリクエスト数 |
    | X-RateLimit-Reset | 制限がリセットされるUNIXタイムスタンプ |

    上限を超えた場合は `429 Too Many Requests` が返されます。

    ## エラーレスポンス
    エラー時は以下の形式で返されます。

    ```json
    {
      "error": {
        "code": "error_code",
        "message": "エラーメッセージ"
      }
    }
    ```
  version: '1.0'
  contact:
    name: UTAGE サポート
servers:
  - url: https://api.utage-system.com/v1
    description: UTAGE API
security:
  - BearerAuth: []
tags:
  - name: ファネル
    description: ファネルの作成・更新・一覧取得
  - name: ステップ
    description: ファネル内のステップの作成・更新・並び替え
  - name: ページ
    description: ステップ内のページの作成・更新・取得・削除
  - name: 配信アカウント
    description: 配信アカウントの作成・一覧取得
  - name: シナリオ
    description: シナリオの作成・一覧取得
  - name: メディア
    description: 動画・音声・通常メディアの一覧取得とアップロード
  - name: 要素タイプ
    description: ファネルページ・HTMLメールの要素タイプ定義、LINEメッセージタイプ・配信条件タイプの取得（認証不要）
  - name: ファネル統計
    description: ファネルの集計データ・登録者・登録経路の取得（プレビュー）
  - name: 配信メッセージ
    description: 配信メッセージの作成・更新・テスト送信・配信統計、置き換え文字の取得（プレビュー）
  - name: 読者
    description: 読者の作成・更新・取得、ラベル・配信履歴・開封/クリック履歴の取得（プレビュー）
  - name: LINE
    description: LINE友だち・カスタム送信者・1対1チャット・テンプレートの操作（プレビュー）
  - name: ラベル・共通読者・登録経路
    description: ラベル・共通読者・アクション・登録経路の操作（プレビュー）
paths:
  /funnels/{funnel_id}/steps/{step_id}/pages:
    post:
      tags:
        - ページ
      summary: ページ作成
      description: |
        ステップに新しいページを作成します。

        `content_type` で2つの形式を選択できます。
        - **elements**（デフォルト）: 要素の階層構造（section > row > col > コンテンツ要素）で作成
        - **raw_html**: HTML直接入力で作成（html/head/bodyタグ必須、最大4MB）

        elements形式の場合は、先に要素タイプ定義（GET /element-types/funnel）を取得して要素構造を確認してください。
      operationId: createPage
      parameters:
        - $ref: '#/components/parameters/FunnelId'
        - $ref: '#/components/parameters/StepId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PageCreateRequest'
      responses:
        '201':
          description: 作成されたページ
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PageDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
components:
  parameters:
    FunnelId:
      name: funnel_id
      in: path
      required: true
      description: ファネルID
      schema:
        type: string
    StepId:
      name: step_id
      in: path
      required: true
      description: ステップID
      schema:
        type: string
  schemas:
    PageCreateRequest:
      type: object
      required:
        - title
      properties:
        content_type:
          type: string
          enum:
            - elements
            - raw_html
          default: elements
          description: 'コンテンツタイプ（elements: 要素の階層構造、raw_html: HTML直接入力）'
        title:
          type: string
          maxLength: 255
          description: 管理名称（管理画面の一覧に表示される名前）
        html_source:
          type: string
          description: >-
            HTML文字列（content_type=raw_html時に必須、最大4MB）。html/head/bodyタグ必須、DOCTYPEは任意
        page_title:
          type: string
          description: ページタイトル（ブラウザのtitleタグに表示。content_type=elementsのみ）
        elements:
          type: array
          description: >
            要素の配列（content_type=elements時に必須）。section > row > col >
            コンテンツ要素のchildren階層構造。


            ```json

            [{
              "type": "section",
              "children": [{
                "type": "row",
                "children": [{
                  "type": "col",
                  "children": [{
                    "type": "text",
                    "content": "<p>テキスト</p>"
                  }]
                }]
              }]
            }]

            ```
          items:
            type: object
        meta_title:
          type: string
          maxLength: 255
          description: タイトル（SNSシェア時に表示されるタイトル）
        meta_description:
          type: string
          maxLength: 500
          description: 説明（SNSシェア時の説明）
        meta_og_image:
          type: string
          format: uri
          description: OG画像(og:image)URL（SNSシェア時のサムネイル）
        is_no_index:
          type: boolean
          description: '検索エンジン設定（false: 検索エンジンに許可、true: インデックスさせない）'
        pc_width:
          type: integer
          minimum: 100
          maximum: 1920
          description: >-
            ページ幅(PC)。100=全幅(100%)、640-1200=ピクセル指定(10刻み)。LP向けは600-800px、通常ページは1000-1200pxが一般的
        border_type:
          type: string
          enum:
            - shadow
            - border
            - none
          description: 'ページ枠(PC)（shadow: 影、border: 枠線、none: なし）'
        swipe_type:
          type: string
          enum:
            - none
            - vertical
            - horizontal
          description: ページスワイプ（pc_width=100の場合は使用不可）
        background_color:
          type: string
          maxLength: 20
          description: ページ全体の背景色（#RRGGBB形式推奨）。pc_width=100（全幅）の場合のみ指定すること
        background_image_src:
          type: string
          maxLength: 2048
          description: ページ全体の背景画像URL（HTTPS）
        background_image_style:
          type: string
          maxLength: 30
          description: >-
            背景画像スタイル（cover_fixed: 全体に表示(スクロール時固定)、w100: 幅100%、h100:
            高さ100%、no_repeat: 拡大なし繰り返しなし、repeat: 拡大なし繰り返し を推奨）
        js_head:
          type: string
          description: head内に挿入するJavaScript（GTMタグ等）
        js_body_top:
          type: string
          description: body直後に挿入するJavaScript
        js_body:
          type: string
          description: body末尾に挿入するJavaScript
        css:
          type: string
          description: カスタムCSS（ページ固有のスタイル調整）
        use_popup:
          type: boolean
          description: ポップアップ使用
        popup_action:
          type: string
          enum:
            - exit
            - exit_all
          description: 'イグジットポップアップ（exit: ページ離脱時、exit_all: 全ページ離脱時）'
        popup_width:
          type: integer
          minimum: 600
          maximum: 1000
          description: ポップアップ幅（600-1000px）
        popup_background_color:
          type: string
          maxLength: 20
          description: ポップアップ背景色（#RRGGBB形式推奨）
        popup_vertical_align:
          type: string
          enum:
            - top
            - centered
          description: '表示位置（top: 上部、centered: 中央）'
        popup_elements:
          type: array
          description: ポップアップ要素の配列（elementsと同じ構造）
          items:
            type: object
        is_high_speed_mode:
          type: boolean
          description: 高速表示モード
    PageDetail:
      type: object
      properties:
        id:
          type: string
          description: ページID
        title:
          type: string
          description: 管理名称
        content_type:
          type: string
          enum:
            - elements
            - raw_html
          description: コンテンツタイプ
        page_title:
          type: string
          nullable: true
          description: ブラウザのtitleタグに表示されるタイトル（elements時のみ）
        html_source:
          type: string
          nullable: true
          description: HTML文字列（raw_html時のみ）
        elements:
          type: array
          nullable: true
          description: 要素の配列（elements時のみ）。section > row > col > コンテンツ要素の階層構造
          items:
            type: object
        meta_title:
          type: string
          nullable: true
          description: タイトル（SNSシェア時に表示）
        meta_description:
          type: string
          nullable: true
          description: 説明（SNSシェア時に表示）
        meta_og_image:
          type: string
          nullable: true
          description: OG画像(og:image)URL（SNSシェア時のサムネイル）
        is_no_index:
          type: boolean
          description: 検索エンジン設定（trueの場合は検索エンジンにインデックスさせない）
        pc_width:
          type: integer
          nullable: true
          description: 'ページ幅(PC)（100: 全幅、640-1200: ピクセル指定）'
        border_type:
          type: string
          enum:
            - shadow
            - border
            - none
          description: 'ページ枠(PC)（shadow: 影、border: 枠線、none: なし）'
        swipe_type:
          type: string
          enum:
            - none
            - vertical
            - horizontal
          description: ページスワイプ設定（pc_width=100の場合は使用不可）
        background_color:
          type: string
          nullable: true
          description: ページ全体の背景色（#RRGGBB形式。pc_width=100の場合のみ指定）
        background_image_src:
          type: string
          nullable: true
          description: ページ全体の背景画像URL
        background_image_style:
          type: string
          nullable: true
          description: >-
            背景画像スタイル（cover_fixed: 全体に表示(スクロール時固定)、w100: 幅100%、h100:
            高さ100%、no_repeat: 拡大なし繰り返しなし、repeat: 拡大なし繰り返し）
        js_head:
          type: string
          nullable: true
          description: head内に挿入するJavaScript
        js_body_top:
          type: string
          nullable: true
          description: body直後に挿入するJavaScript
        js_body:
          type: string
          nullable: true
          description: body末尾に挿入するJavaScript
        css:
          type: string
          nullable: true
          description: カスタムCSS
        use_popup:
          type: boolean
          description: ポップアップ使用（trueの場合は有効）
        popup_action:
          type: string
          nullable: true
          enum:
            - exit
            - exit_all
          description: 'イグジットポップアップ（exit: ページ離脱時、exit_all: 全ページ離脱時）'
        popup_width:
          type: integer
          nullable: true
          description: ポップアップ幅（600-1000px）
        popup_background_color:
          type: string
          nullable: true
          description: ポップアップ背景色（#RRGGBB形式）
        popup_vertical_align:
          type: string
          nullable: true
          enum:
            - top
            - centered
          description: '表示位置（top: 上部、centered: 中央）'
        popup_elements:
          type: array
          nullable: true
          description: ポップアップ要素の配列（elementsと同じ構造）
          items:
            type: object
        is_high_speed_mode:
          type: boolean
          description: 高速表示モード（trueの場合は有効。有効時はCSS事前生成により表示速度が向上）
        order:
          type: integer
          description: ステップ内の表示順
        is_archived:
          type: boolean
          description: アーカイブ済みかどうか
        created_at:
          type: string
          description: 作成日時
        updated_at:
          type: string
          description: 更新日時
        step_url:
          type: string
          description: ステップの公開URL
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード
            message:
              type: string
              description: エラーメッセージ
            details:
              type: object
              nullable: true
              description: エラーの補足情報（retry_afterやフィールド別エラー等）。エラー種別により含まれる場合があります。
  responses:
    Unauthorized:
      description: 認証エラー。APIキーが無効または未指定。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: 認証に失敗しました
    NotFound:
      description: 指定されたリソースが見つかりません。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: リソースが見つかりません
    ValidationError:
      description: バリデーションエラー。リクエストパラメータが不正。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: validation_error
              message: バリデーションエラーが発生しました
    RateLimitExceeded:
      description: レート制限超過。時間を空けて再試行してください。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: リクエスト上限を超えました。しばらく時間を空けて再試行してください
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: APIキーをBearerトークンとして指定

````