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

# Generate subscription links

> Generieren Sie Links für Kommunikationseinstellungen für einen Abonnenten. Dieser Endpunkt ermöglicht es Ihnen, URLs zur Verwaltung von Einstellungen und zum Abbestellen zu erstellen, die auf einen bestimmten Abonnenten angepasst sind. Dies ist nützlich für die Integration der Verwaltung von Kommunikationseinstellungen in Ihre Anwendungen.

export const ScopesList = ({scopes = [], description = "Diese API erfordert einen der folgenden Bereiche:"}) => {
  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: "Unterstützte Produkte",
    description: "Erfordert eines der folgenden Produkte oder höher.",
    productNames: {
      marketing: "Marketing Hub",
      sales: "Sales Hub",
      service: "Service Hub",
      cms: "Content Hub"
    },
    tiers: {
      free: "Kostenlos",
      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="STARTER" salesLevel="FREE" serviceLevel="FREE" cmsLevel="FREE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'communication_preferences.read',
  'communication_preferences.write',
  'communication_preferences.read_write'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/2026-03/communication-preferences-subscriptions-v2026-03.json POST /communication-preferences/2026-03/links/generate
openapi: 3.0.1
info:
  title: Communication Preferences Subscriptions
  description: Basepom for all HubSpot Projects
  version: 2026-03
  x-hubspot-product-tier-requirements:
    marketing: STARTER
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Batch
  - name: Definitions
  - name: Status
paths:
  /communication-preferences/2026-03/links/generate:
    post:
      tags:
        - Status
      summary: Abonnement-Links generieren
      description: >-
        Generieren Sie Links für Kommunikationseinstellungen für einen
        Abonnenten. Dieser Endpunkt ermöglicht es Ihnen, URLs zur Verwaltung von
        Einstellungen und zum Abbestellen zu erstellen, die auf einen bestimmten
        Abonnenten angepasst sind. Dies ist nützlich für die Integration der
        Verwaltung von Kommunikationseinstellungen in Ihre Anwendungen.
      operationId: >-
        post-/communication-preferences/2026-03/links/generate_/communication-preferences/v4/links/generate
      parameters:
        - name: channel
          in: query
          description: >-
            Der Kommunikationskanal, für den die Links generiert werden. Muss
            „EMAIL“ sein.
          required: true
          style: form
          explode: true
          schema:
            type: string
            enum:
              - EMAIL
        - name: businessUnitId
          in: query
          description: >-
            Die ID des Unternehmensbereichs. Standardmäßig 0, wenn nicht
            angegeben.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int64
            default: 0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkGenerationRequest'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkGenerationResponse'
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - communication_preferences.read
            - communication_preferences.write
        - oauth2:
            - communication_preferences.read_write
components:
  schemas:
    LinkGenerationRequest:
      required:
        - subscriberIdString
      type: object
      properties:
        language:
          type: string
          description: >-
            Die Sprache, in der der generierte Link angezeigt werden soll, als
            Zeichenfolge dargestellt.
        subscriberIdString:
          type: string
          description: >-
            Eine Zeichenfolge, die die eindeutige ID des Abonnenten darstellt.
            Diese Eigenschaft ist erforderlich.
        subscriptionId:
          type: integer
          description: >-
            Die eindeutige ID für das Abonnement, dargestellt als Ganzzahl im
            int64-Format.
          format: int64
    LinkGenerationResponse:
      required:
        - managePreferencesUrl
        - subscriberIdString
        - unsubscribeAllUrl
      type: object
      properties:
        managePreferencesUrl:
          type: string
          description: >-
            Die URL, unter der der Abonnent seine Kommunikationspräferenzen
            verwalten kann.
        subscriberIdString:
          type: string
          description: Eine Zeichenfolge, die die eindeutige ID des Abonnenten darstellt.
        unsubscribeAllUrl:
          type: string
          description: >-
            Eine Zeichenfolge, die die URL zum Abmelden von jeglicher
            Kommunikation für den Abonnenten enthält.
        unsubscribeSingleUrl:
          type: string
          description: >-
            Eine Zeichenfolge, die die URL zum Abmelden von einer einzelnen
            Kommunikation enthält.
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: Die Fehlerkategorie
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Kontext zur Fehlerbedingung
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            Eine eindeutige ID für die Anfrage. Berücksichtigen Sie diesen Wert
            in Fehlerberichten oder Support-Tickets.
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: Weitere Informationen zum Fehler
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            Eine Zuordnung der Namen von Links zu zugeordneten URIs mit einer
            Dokumentation zum Fehler oder empfohlenen Abhilfemaßnahmen
        message:
          type: string
          description: >-
            Eine für Menschen lesbare Nachricht mit einer Beschreibung des
            Fehlers und ggf. Abhilfemaßnahmen
          example: An error occurred
        subCategory:
          type: string
          description: Eine spezifische Kategorie, die genauere Details zum Fehler enthält
      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
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: Der Statuscode, der dem Fehlerdetail zugeordnet ist
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Kontext zur Fehlerbedingung
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: >-
            Der Name des Felds oder Parameters, in dem der Fehler gefunden
            wurde.
        message:
          type: string
          description: >-
            Eine für Menschen lesbare Nachricht mit einer Beschreibung des
            Fehlers und ggf. Abhilfemaßnahmen
        subCategory:
          type: string
          description: Eine spezifische Kategorie, die genauere Details zum Fehler enthält
  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:
            communication_preferences.read_write: ''
            communication_preferences.statuses.batch.read: ''
            communication_preferences.statuses.batch.write: ''

````