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

# キャンペーンイベントのエクスポートをリクエストする

> キャンペーンまたはユーザージャーニーのイベントを非同期でエクスポートします。レスポンスに含まれる`export_id`を使って結果を取得します。

> [!WARNING]
>
> **有料API**
>
> このAPIは、リクエストするデータ量に応じて課金されます。料金については、Notiflyにお問い合わせください。


## OpenAPI

````yaml /ja/api-reference/openapi.yaml post /projects/{projectId}/campaign-event-data/exports
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly APIサーバー
security: []
tags:
  - name: catalog
    x-group: カタログ
paths:
  /projects/{projectId}/campaign-event-data/exports:
    post:
      summary: create-campaign-event-export
      operationId: createCampaignEventExport
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: プロジェクトIDです。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - start
                - end
              properties:
                start:
                  type: string
                  format: date-time
                  description: 集計対象の開始時刻です。UTCの`yyyy-MM-ddTHH:mm:ss.sssZ`形式で指定します。
                end:
                  type: string
                  format: date-time
                  description: >-
                    集計対象の終了時刻です。UTCの`yyyy-MM-ddTHH:mm:ss.sssZ`形式で、開始時刻から1週間以内の値を指定します。
                isMessageDataIncluded:
                  type: boolean
                  description: メッセージデータを含めるかどうかを指定します。デフォルトは`false`です。
            example:
              start: '2025-06-01T00:00:00.000Z'
              end: '2025-06-07T23:59:59.999Z'
              isMessageDataIncluded: true
      responses:
        '200':
          description: エクスポートのリクエストを受け付けました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  export_id:
                    type: string
                    description: エクスポートのジョブIDです。
              example:
                export_id: xyz123
        '400':
          description: 日付の形式や範囲など、リクエストパラメーターが不正です。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
              example:
                error: InvalidRequest
                message: ...
        '401':
          description: 認証に失敗しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '500':
          description: サーバー内部エラーです。
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
              example:
                error: InternalServerError
                message: ...
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '`POST /authenticate`で発行したトークンをBearer形式で送信します。'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.