> ## 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.

# Delete campaigns

> Dieser Endpunkt löscht einen Batch mit Kampagnen. 
Die maximale Anzahl von Elementen in einer Batch-Anfrage beträgt 50.
Die Antwort lautet immer „204 No Content“, unabhängig davon, ob die Kampagnen vorhanden sind oder nicht, ob sie erfolgreich gelöscht wurden oder nicht oder ob nur einige der Kampagnen im Batch gelöscht wurden.

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="PROFESSIONAL" salesLevel="FREE" serviceLevel="FREE" cmsLevel="FREE" />
  </Accordion>

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


## OpenAPI

````yaml specs/legacy/v3/marketing-campaigns-public-api-v3.json POST /marketing/v3/campaigns/batch/archive
openapi: 3.0.1
info:
  title: Marketing Campaigns Public Api
  description: Basepom for all HubSpot Projects
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: PROFESSIONAL
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
  x-hubspot-related-documentation:
    - name: Campaigns
      url: https://developers.hubspot.com/docs/guides/api/marketing/campaigns
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Assets
  - name: Basic
  - name: Batch
  - name: Budget
  - name: Metrics
  - name: Spend
paths:
  /marketing/v3/campaigns/batch/archive:
    post:
      tags:
        - Batch
      summary: Einen Batch mit Kampagnen löschen
      description: >-
        Dieser Endpunkt löscht einen Batch mit Kampagnen. 

        Die maximale Anzahl von Elementen in einer Batch-Anfrage beträgt 50.

        Die Antwort lautet immer „204 No Content“, unabhängig davon, ob die
        Kampagnen vorhanden sind oder nicht, ob sie erfolgreich gelöscht wurden
        oder nicht oder ob nur einige der Kampagnen im Batch gelöscht wurden.
      operationId: post-/marketing/v3/campaigns/batch/archive
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchInputPublicCampaignDeleteInput'
        required: true
      responses:
        '204':
          description: No content
          content: {}
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - marketing.campaigns.write
components:
  schemas:
    BatchInputPublicCampaignDeleteInput:
      required:
        - inputs
      type: object
      properties:
        inputs:
          type: array
          description: >-
            Ein Array von PublicCampaignDeleteInput-Objekten, die jeweils eine
            zu löschende Kampagne angeben. Jedes Objekt muss die eindeutige
            Kennung der Kampagne enthalten.
          items:
            $ref: '#/components/schemas/PublicCampaignDeleteInput'
    PublicCampaignDeleteInput:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Die eindeutige ID für die zu löschende Kampagne.
    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:
            marketing.campaigns.read: ''
            marketing.campaigns.revenue.full.read: ''
            marketing.campaigns.revenue.read: ''
            marketing.campaigns.write: ''

````