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

# Get campaigns

> このエンドポイントでは、指定された入力データに基づいてキャンペーンをバッチで読み取り、関連付けられているアセットと一緒にキャンペーンを返します。
バッチ要求に含まれる項目の最大数は50個です。
 レスポンスに含まれるキャンペーンは要求で指定された順序と同じになるとは限りません。
要求で重複するキャンペーンIDが指定されている場合、重複は無視されます。レスポンスには固有IDのみが含まれ、重複なしで返されます。


export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

export const SupportedProducts = ({marketing, sales, service, cms, marketingLevel, salesLevel, serviceLevel, cmsLevel}) => {
  const translations = {
    header: "サポートされる製品",
    description: "次のいずれかの製品またはそれ以上が必要です。",
    productNames: {
      marketing: "Marketing Hub",
      sales: "Sales Hub",
      service: "Service Hub",
      cms: "Content Hub"
    },
    tiers: {
      free: "無料ツール",
      starter: "Starter",
      professional: "Professional",
      enterprise: "Enterprise"
    }
  };
  const translateTier = tier => {
    if (!tier) return '';
    const lowerTier = tier.toLowerCase();
    return translations.tiers[lowerTier] || tier;
  };
  const products = [{
    name: marketing ? translations.productNames.marketing : '',
    level: translateTier(marketingLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/marketing-bolt.svg",
    alt: "Marketing Hub"
  }, {
    name: sales ? translations.productNames.sales : '',
    level: translateTier(salesLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/sales-star.svg",
    alt: "Sales Hub"
  }, {
    name: service ? translations.productNames.service : '',
    level: translateTier(serviceLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/service-heart.svg",
    alt: "Service Hub"
  }, {
    name: cms ? translations.productNames.cms : '',
    level: translateTier(cmsLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/content-play.svg",
    alt: "Content Hub"
  }].filter(product => product.name && product.level);
  if (products.length === 0) return null;
  return <div>
      <div className="text-sm mb-2">{translations.description}</div>
      <div className={`grid ${products.length === 1 ? 'grid-cols-1' : 'grid-cols-2'} gap-1.5`}>
        {products.map((product, index) => <div key={index} style={{
    display: 'flex',
    alignItems: 'center'
  }}>
            <img src={product.icon} alt={product.alt} className="w-3.5 h-3.5 mr-1.5 mt-2.5 mb-2.5 flex-shrink-0 align-middle" />
            <span className="font-medium mr-1 text-sm">{product.name} -</span>
            <span className="text-sm">{product.level}</span>
          </div>)}
      </div>
    </div>;
};

<AccordionGroup>
  <Accordion title="Supported products" defaultOpen="true" icon="cubes">
    <SupportedProducts marketing={true} sales={true} service={true} cms={true} marketingLevel="PROFESSIONAL" salesLevel="FREE" serviceLevel="FREE" cmsLevel="FREE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'marketing.campaigns.read'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/2026-03/marketing-campaigns-public-api-v2026-03.json POST /marketing/campaigns/2026-03/batch/read
openapi: 3.0.1
info:
  title: Marketing Campaigns Public Api
  description: Basepom for all HubSpot Projects
  version: 2026-03
  x-hubspot-product-tier-requirements:
    marketing: PROFESSIONAL
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Assets
  - name: Basic
  - name: Batch
  - name: Budget
  - name: Metrics
  - name: Spend
paths:
  /marketing/campaigns/2026-03/batch/read:
    post:
      tags:
        - Batch
      summary: キャンペーンをバッチ読み取り
      description: "このエンドポイントでは、指定された入力データに基づいてキャンペーンをバッチで読み取り、関連付けられているアセットと一緒にキャンペーンを返します。\nバッチ要求に含まれる項目の最大数は50個です。\n\_レスポンスに含まれるキャンペーンは要求で指定された順序と同じになるとは限りません。\n要求で重複するキャンペーンIDが指定されている場合、重複は無視されます。レスポンスには固有IDのみが含まれ、重複なしで返されます。\n"
      operationId: post-/marketing/campaigns/2026-03/batch/read
      parameters:
        - name: endDate
          in: query
          description: >-
            アセット測定指標を取得する終了日で、形式はYYYY-MM-DDとなります。この日付は指定された期間のアセットに関連付けられている測定指標の取得に使用されます。指定しない場合、アセット測定指標は取得されません。

            例：2024-01-27
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: properties
          in: query
          description: >-
            レスポンスで返されるプロパティーのカンマ区切りリスト。指定されたプロパティーのいずれかに要求されたオブジェクトの空の値が含まれる場合は無視され、レスポンスで返されません。このパラメーターが空の場合、レスポンスには空のプロパティーマップが含まれます。

            例：hs_name, hs_campaign_status, hs_notes
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: startDate
          in: query
          description: >-
            アセット測定指標を取得する開始日で、形式はYYYY-MM-DDとなります。この日付は指定された期間のアセットに関連付けられている測定指標の取得に使用されます。指定されない場合、アセット測定指標は取得されません。

            例：2023-01-20
          required: false
          style: form
          explode: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchInputPublicCampaignReadInput'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponsePublicCampaignWithAssets'
        '207':
          description: multiple statuses
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BatchResponsePublicCampaignWithAssetsWithErrors
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - marketing.campaigns.read
components:
  schemas:
    BatchInputPublicCampaignReadInput:
      required:
        - inputs
      type: object
      properties:
        inputs:
          type: array
          description: >-
            PublicCampaignReadInputオブジェクトの配列。各オブジェクトには、読み取るキャンペーンのIDが含まれます。このプロパティーは必須です。
          items:
            $ref: '#/components/schemas/PublicCampaignReadInput'
    BatchResponsePublicCampaignWithAssets:
      required:
        - completedAt
        - results
        - startedAt
        - status
      type: object
      properties:
        completedAt:
          type: string
          description: バッチ要求処理が完了した時点のタイムスタンプ。
          format: date-time
        links:
          type: object
          additionalProperties:
            type: string
          description: 関連するリソースやドキュメントにリンクしているURLのコレクション。
        requestedAt:
          type: string
          description: バッチ要求が最初に行われた時点のタイムスタンプ。
          format: date-time
        results:
          type: array
          description: バッチ操作の結果の配列。各結果は、アセットを含む公開キャンペーンを表します。
          items:
            $ref: '#/components/schemas/PublicCampaignWithAssets'
        startedAt:
          type: string
          description: バッチ要求の処理が開始された時点のタイムスタンプ。
          format: date-time
        status:
          type: string
          description: 次の値を取り得る、バッチ処理の現在の処理ステータス：CANCELED、COMPLETE、PENDING、PROCESSING。
          enum:
            - CANCELED
            - COMPLETE
            - PENDING
            - PROCESSING
    BatchResponsePublicCampaignWithAssetsWithErrors:
      required:
        - completedAt
        - results
        - startedAt
        - status
      type: object
      properties:
        completedAt:
          type: string
          description: バッチ処理が完了した日時。
          format: date-time
        errors:
          type: array
          description: >-
            バッチに含まれる失敗した個々のキャンペーン読み取りのエラーのリスト（例：キャンペーンが見つからなかった、アクセス権が拒否されたなど）。空でない場合にのみ含まれます。  
          items:
            $ref: '#/components/schemas/StandardError'
        links:
          type: object
          additionalProperties:
            type: string
          description: バッチ処理に関連付けられたリンクのコレクション。
        numErrors:
          type: integer
          description: バッチ処理中に発生したエラーの数。
          format: int32
        requestedAt:
          type: string
          description: バッチ処理が要求された日時。
          format: date-time
        results:
          type: array
          description: 関連付けられたアセットとともに正常に取得されたキャンペーンのリスト。
          items:
            $ref: '#/components/schemas/PublicCampaignWithAssets'
        startedAt:
          type: string
          description: バッチ処理が開始された日時。
          format: date-time
        status:
          type: string
          description: バッチ処理の現在のステータス（CANCELED、COMPLETE、PENDING、PROCESSINGを取り得る）。
          enum:
            - CANCELED
            - COMPLETE
            - PENDING
            - PROCESSING
    PublicCampaignReadInput:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: キャンペーンの固有ID。
    PublicCampaignWithAssets:
      required:
        - assets
        - businessUnits
        - createdAt
        - id
        - properties
        - updatedAt
      type: object
      properties:
        assets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CollectionResponsePublicCampaignAsset'
          description: キャンペーンに関連付けられたアセットが含まれ、それぞれキャンペーンアセットのコレクションとして表されます。
        businessUnits:
          type: array
          description: >-
            キャンペーンに関連付けられているビジネスユニットの配列。各ビジネスユニットはPublicBusinessUnitオブジェクトで表されます。
          items:
            $ref: '#/components/schemas/PublicBusinessUnit'
        createdAt:
          type: string
          description: 日付-時刻文字列として書式設定される、キャンペーンが作成された日時。
          format: date-time
        id:
          type: string
          description: キャンペーンの固有ID。
        properties:
          type: object
          additionalProperties:
            type: string
          description: キャンペーンのプロパティーを表す、キーと値のペアの対応付け。
        updatedAt:
          type: string
          description: 日付-時刻文字列として書式設定される、キャンペーンが最後に更新された日時。
          format: date-time
    StandardError:
      required:
        - category
        - context
        - errors
        - links
        - message
        - status
      type: object
      properties:
        category:
          type: string
          description: エラーの種類を分類する文字列。
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: エラーに関する追加のコンテキストを含むオブジェクト。キーはコンテキスト名、値は文字列の配列です。
        errors:
          type: array
          description: 発生した各エラーに関する詳細情報を提供するErrorDetailオブジェクトの配列。
          items:
            $ref: '#/components/schemas/ErrorDetail'
        id:
          type: string
          description: エラーの一意の識別子を表す文字列。
        links:
          type: object
          additionalProperties:
            type: string
          description: エラーに関するドキュメントまたは修復手順を含む、リンク名と関連URIをマッピングするオブジェクト。
        message:
          type: string
          description: エラーを説明する人間が判読可能なメッセージを含む文字列。
        status:
          type: string
          description: エラーのステータスを示す文字列。
        subCategory:
          type: object
          properties: {}
          description: エラーカテゴリに関するより具体的な詳細を提供するオブジェクト。
      description: Ye olde error
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: エラーカテゴリー
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: エラー条件に関する背景状況
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: リクエストの固有ID。エラー報告またはサポートチケットには必ずこの値を含めてください
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: エラーに関する詳細情報
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: エラーまたは推奨の修正手順に関するドキュメントが含まれる関連付けられたURIへのリンク名の対応付け
        message:
          type: string
          description: エラーと修正手順（該当する場合）を記した、人が理解できるメッセージ
          example: An error occurred
        subCategory:
          type: string
          description: エラーに関する具体的な詳細が含まれる特定のカテゴリー
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    CollectionResponsePublicCampaignAsset:
      required:
        - results
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/Paging'
        results:
          type: array
          description: 公開キャンペーンアセットの配列。配列の各項目は、キャンペーンアセットを表すオブジェクトです。
          items:
            $ref: '#/components/schemas/PublicCampaignAsset'
    PublicBusinessUnit:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          description: 整数で表されるビジネスユニットの固有ID。
          format: int64
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: エラーの詳細に関連付けられているステータスコード
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: エラー条件に関する背景状況
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: エラーが見つかったフィールドまたはパラメーターの名前。
        message:
          type: string
          description: エラーと修正手順（該当する場合）を記した、人が理解できるメッセージ
        subCategory:
          type: string
          description: エラーに関する具体的な詳細が含まれる特定のカテゴリー
    Paging:
      type: object
      properties:
        next:
          $ref: '#/components/schemas/NextPage'
        prev:
          $ref: '#/components/schemas/PreviousPage'
    PublicCampaignAsset:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: キャンペーンアセットの固有ID。
        metrics:
          type: object
          additionalProperties:
            type: number
          description: キーと値のペアで表される、キャンペーンアセットに関連付けられた測定指標のコレクション。
        name:
          type: string
          description: キャンペーンアセットの名前。
    NextPage:
      required:
        - after
      type: object
      properties:
        after:
          type: string
          description: 結果の次のページを取得するためのカーソルとして使用される文字列トークン。
        link:
          type: string
          description: 結果の次のページへのリンクを提供するURL文字列。
      description: >-
        Specifies the paging information needed to retrieve the next set of
        results in a paginated API response
    PreviousPage:
      required:
        - before
      type: object
      properties:
        before:
          type: string
          description: 現在の結果ページより前のリスト内の位置を示す文字列トークン。
        link:
          type: string
          description: 結果の前のページへのURLリンクを含む文字列。
      description: >-
        specifies the paging information needed to retrieve the previous set of
        results in a paginated API response
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.hubspot.com/oauth/authorize
          tokenUrl: https://api.hubapi.com/oauth/v1/token
          scopes:
            marketing.campaigns.read: ''
            marketing.campaigns.revenue.full.read: ''
            marketing.campaigns.revenue.read: ''
            marketing.campaigns.write: ''

````