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

# Archive campaign

> **Archive a completed or paused campaign**

Archive a campaign that is in PAUSED or COMPLETED status. This is a one-way operation:
the campaign becomes view-only, stops receiving replies, and can only be deleted afterwards.

## Important Notes

- Only PAUSED or COMPLETED campaigns can be archived
- This is a permanent operation — archived campaigns cannot be reactivated
- Archived campaigns become view-only
- Use this to clean up finished campaigns and free up linked inboxes

## Example Usage

```python
import requests

campaign_id = "550e8400-e29b-41d4-a716-446655440000"

response = requests.post(
    f"https://api.coldsend.io/api/public/v1/campaigns/{campaign_id}/archive",
    headers={"X-API-Key": "your-api-key"}
)
```



## OpenAPI

````yaml /public_openapi.json post /api/public/v1/campaigns/{campaign_id}/archive
openapi: 3.0.3
info:
  title: ColdSend Public API
  description: >-
    Programmatic access to ColdSend for managing cold email campaigns and sender
    accounts.
  version: 1.0.0
  contact:
    name: ColdSend Support
    email: support@coldsend.pro
    url: https://coldsend.pro
servers:
  - url: https://api.coldsend.pro
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/public/v1/campaigns/{campaign_id}/archive:
    post:
      tags:
        - Campaigns
      summary: Archive campaign
      description: >-
        **Archive a completed or paused campaign**


        Archive a campaign that is in PAUSED or COMPLETED status. This is a
        one-way operation:

        the campaign becomes view-only, stops receiving replies, and can only be
        deleted afterwards.


        ## Important Notes


        - Only PAUSED or COMPLETED campaigns can be archived

        - This is a permanent operation — archived campaigns cannot be
        reactivated

        - Archived campaigns become view-only

        - Use this to clean up finished campaigns and free up linked inboxes


        ## Example Usage


        ```python

        import requests


        campaign_id = "550e8400-e29b-41d4-a716-446655440000"


        response = requests.post(
            f"https://api.coldsend.io/api/public/v1/campaigns/{campaign_id}/archive",
            headers={"X-API-Key": "your-api-key"}
        )

        ```
      operationId: archive_campaign_api_public_v1_campaigns__campaign_id__archive_post
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Campaign Id
      responses:
        '200':
          description: Campaign archived successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignActionResponse'
        '400':
          description: Campaign cannot be archived (not paused or completed)
        '401':
          description: Missing or invalid API key
        '403':
          description: Insufficient permissions - requires 'campaigns:archive' scope
        '404':
          description: Campaign not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CampaignActionResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
          description: Action result message
        campaign_id:
          type: string
          format: uuid
          title: Campaign Id
          description: Campaign ID
        status:
          type: string
          title: Status
          description: New campaign status
        action_timestamp:
          type: string
          format: date-time
          title: Action Timestamp
          description: When the action was performed
      type: object
      required:
        - success
        - message
        - campaign_id
        - status
        - action_timestamp
      title: CampaignActionResponse
      description: Response for campaign actions like pause/resume.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with format cs_live_xxx

````