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

# Delete a campaign

> Stops the campaign dialing and removes it.

Deleting a campaign:

* Stops it dialing.
* Removes it from [List campaigns](https://docs.olimi.ai/api-reference/endpoint/campaigns/list-campaigns.md) and [Get a campaign](https://docs.olimi.ai/api-reference/endpoint/campaigns/get-campaign.md).
* Keeps its calls in your call history.

Deleting a campaign that's already deleted returns `404` `campaign_not_found`.


## OpenAPI

````yaml delete /api/v2/campaigns/{id}
openapi: 3.0.1
info:
  title: Customer Management API
  description: API for managing customer lists and customers within those lists
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-eg.olimi.ai
security:
  - bearerAuth: []
paths:
  /api/v2/campaigns/{id}:
    delete:
      tags:
        - Campaigns
      summary: Delete a campaign
      description: Stops the campaign dialing and removes it.
      parameters:
        - name: id
          in: path
          required: true
          description: The campaign's `id`.
          schema:
            type: string
            format: uuid
          example: 3e8b5d21-7c4a-4f96-a1d0-6b2e9c7f4a58
      responses:
        '200':
          description: The campaign was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
              example:
                message: Campaign deleted successfully
                data: null
        '400':
          description: '`id` isn''t a valid UUID.'
        '401':
          description: The `X-API-KEY` header is missing or the key isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            `campaign_not_found`: no campaign with that `id` belongs to your
            company, or it was already deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - apiKeyAuth: []
components:
  schemas:
    DeleteResponse:
      type: object
      properties:
        message:
          type: string
          example: Deleted successfully
        data:
          type: object
          nullable: true
          example: null
    ApiError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: string
          description: Machine-readable error code.
          example: agent_not_found
        message:
          type: string
          description: Human-readable text. May change; don't match on it.
          example: Agent not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.