> ## 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 email subscription types for a Hub ID

> Returns all email subscription types that have been created in the given Hub 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>;
};

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


## OpenAPI

````yaml specs/legacy/v1/marketing-subscriptions-v1.json GET /email/public/v1/subscriptions
openapi: 3.0.0
info:
  title: Subscriptions preferences API - V1
  version: 1.0.0
  description: >-
    The subscription preferences APIs allow you to retrieve and manage data on
    the communications that a contact has opted into.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
security: []
paths:
  /email/public/v1/subscriptions:
    get:
      summary: Get email subscription types for a Hub ID
      description: >-
        Returns all email subscription types that have been created in the given
        Hub ID.
      operationId: getEmailSubscriptionTypes
      parameters:
        - name: portalId
          in: query
          required: true
          description: >-
            The HubSpot Portal ID for the portal that you're making the call
            for.
          schema:
            type: integer
      responses:
        '200':
          description: Email subscription types retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionTypesResponse'
              example:
                subscriptionDefinitions:
                  - active: true
                    portalId: 12345
                    description: >-
                      The default unsubscribe list that all emails in your hub
                      will use
                    id: 7
                    name: Default
                  - active: true
                    portalId: 12345
                    description: >-
                      Our weekly newsletter informing you about our new
                      happenings
                    id: 146
                    name: Weekly Newsletter
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SubscriptionTypesResponse:
      type: object
      properties:
        subscriptionDefinitions:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionDefinition'
    Error:
      type: object
      properties:
        status:
          type: string
          description: HTTP status code
        message:
          type: string
          description: Error message
        correlationId:
          type: string
          description: Request correlation ID for debugging
    SubscriptionDefinition:
      type: object
      properties:
        active:
          type: boolean
          description: Whether the subscription type is active
        portalId:
          type: integer
          description: The portal ID
        description:
          type: string
          description: Description of the subscription type
        id:
          type: integer
          description: Unique identifier for the subscription type
        name:
          type: string
          description: Name of the subscription type

````