> ## 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 all campaign IDs for an account

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>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['content']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/email-analytics-v1.json GET /email/public/v1/campaigns/by-id
openapi: 3.0.0
info:
  title: Email Analytics API v1
  version: 1.0.0
  description: >-
    Use the email analytics API to fetch events generated by marketing emails,
    such as sends, bounces, and clicks.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /email/public/v1/campaigns/by-id:
    get:
      summary: Get all campaign IDs for an account
      description: >-
        Return all email campaign IDs associated with the HubSpot account. The
        email campaign IDs are returned in no particular order.
      operationId: getAllCampaignIds
      parameters:
        - name: offset
          in: query
          description: A key representing which page of results you would like
          schema:
            type: string
        - name: limit
          in: query
          description: Limit the maximum number of results you would like returned.
          schema:
            type: integer
      responses:
        '200':
          description: Campaign IDs retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignListResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CampaignListResponse:
      type: object
      properties:
        hasMore:
          type: boolean
          description: Whether there are more results available
        offset:
          type: string
          description: Offset token for pagination
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/CampaignSummary'
      required:
        - hasMore
        - offset
        - campaigns
    Error:
      type: object
      properties:
        category:
          type: string
          description: The error category
        correlationId:
          type: string
          description: A unique identifier for the request
        message:
          type: string
          description: A human readable message describing the error
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        errors:
          type: array
          description: Further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        context:
          type: object
          description: Context about the error condition
        links:
          type: object
          description: A map of link names to associated URIs
      required:
        - category
        - correlationId
        - message
    CampaignSummary:
      type: object
      properties:
        id:
          type: integer
          description: The campaign ID
        appId:
          type: integer
          description: The application ID
        appName:
          type: string
          description: The application name
      required:
        - id
        - appId
        - appName
    ErrorDetail:
      type: object
      properties:
        message:
          type: string
          description: A human readable message describing the error
        in:
          type: string
          description: The name of the field or parameter in which the error was found
        code:
          type: string
          description: The status code associated with the error detail
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        context:
          type: object
          description: Context about the error condition
      required:
        - message

````