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

# Archive campaigns

> Archives multiple campaigns by id. Ids are de-duplicated. The operation is all-or-nothing: if any id is unknown the request fails with 404 and `details.missing` lists the unknown ids.



## OpenAPI

````yaml openapi.public.yaml POST /api/v1/campaigns/archive
openapi: 3.0.3
info:
  title: Metricanic API
  version: 1.0.0
  description: >
    # Metricanic API


    Use the Metricanic REST API to manage campaigns, traffic sources, affiliate
    networks, landings, offers and rotators, and to read performance reports and
    individual events.


    Base URL: `https://panel.metricanic.com/api/v1`. Requests require an
    account-scoped Bearer key created in **Profile → API keys**. Use `read` for
    GET requests or `write` for supported mutations. Keys are intended for
    server-side integrations. Cross-origin browser writes are rejected.


    Start with the [API
    quickstart](https://docs.metricanic.com/api-reference/introduction), then
    follow the guides for
    [authentication](https://docs.metricanic.com/api-reference/authentication),
    [reports and event
    pagination](https://docs.metricanic.com/api-reference/reports-and-events),
    and [errors and retries](https://docs.metricanic.com/api-reference/errors).


    Only the operations in this specification are supported under `/api/v1`.
    Individual endpoint schemas define the request and response shapes. List
    endpoints do not all share the same pagination model. The product's OAuth
    MCP connection has separate, read-only capabilities.
  license:
    name: Proprietary
    url: https://metricanic.com/legal/terms
servers:
  - url: https://panel.metricanic.com
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Authentication and session endpoints.
  - name: Campaigns
    description: Campaign and campaign-related management endpoints.
  - name: Landings
    description: Landing page management endpoints.
  - name: Offers
    description: Offer management endpoints.
  - name: Reports
    description: Aggregated reporting and chart endpoints.
  - name: Rotators
    description: Rotator setup and routing-rule endpoints.
  - name: TrafficSources
    description: Traffic source configuration endpoints.
  - name: AffiliateNetworks
    description: Affiliate network management endpoints.
  - name: Events
    description: Raw event and error inspection endpoints.
paths:
  /api/v1/campaigns/archive:
    post:
      tags:
        - Campaigns
      summary: Archive campaigns
      description: >-
        Archives multiple campaigns by id. Ids are de-duplicated. The operation
        is all-or-nothing: if any id is unknown the request fails with 404 and
        `details.missing` lists the unknown ids.
      operationId: archiveCampaignsBulk
      requestBody:
        required: true
        content:
          application/json:
            example:
              ids:
                - 1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d
            schema:
              $ref: '#/components/schemas/IdListPayload'
      responses:
        '200':
          description: Archived
          content:
            application/json:
              example:
                ok: true
                data:
                  archived: 1
              schema:
                $ref: '#/components/schemas/BulkArchiveResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: Missing ids
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: In use
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimitedError'
        '503':
          $ref: '#/components/responses/ServiceUnavailableError'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    IdListPayload:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 200
      required:
        - ids
      additionalProperties: false
    BulkArchiveResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - true
        data:
          type: object
          properties:
            archived:
              type: integer
          required:
            - archived
          additionalProperties: false
      required:
        - ok
        - data
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
          additionalProperties: false
        requestId:
          type: string
      required:
        - ok
        - error
      additionalProperties: false
  responses:
    ForbiddenError:
      description: The authenticated caller is not allowed to perform this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimitedError:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying when available.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServiceUnavailableError:
      description: A required platform dependency is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ErrorResponse:
      description: >-
        Standard API error envelope. Common platform errors include
        authentication failures, forbidden scope or origin, billing gate, rate
        limiting, and temporary service unavailability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````