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

# Cancel Campaign

> Stop for good; contacts not yet called become canceled.



## OpenAPI

````yaml POST /campaigns/{id}/cancel
openapi: 3.1.0
info:
  title: RevRing Voice AI API
  description: >-
    RevRing Voice AI platform API for managing AI voice agents, phone calls, SIP
    trunks, and analytics. Build intelligent voice applications that can handle
    inbound and outbound phone calls with AI-powered conversational agents.
  version: 1.0.0
  contact:
    name: RevRing Support
    url: https://revring.ai
servers:
  - url: https://api.revring.ai/v1
    description: Production API
security:
  - apiKeyAuth: []
tags:
  - name: Messaging Connections
    description: Connect messaging providers so agents can send text messages
  - name: Messages
    description: Send text messages and read your message log
  - name: Conversations
    description: List and clear managed conversation threads
  - name: SIP Trunks
    description: Manage SIP trunks for connecting agents to the phone network
  - name: Agents
    description: Manage AI voice agents and their configuration
  - name: Agent Folders
    description: Organize agents into folders for dashboard navigation
  - name: Calls
    description: Manage and query phone calls
  - name: Analytics
    description: Get analytics and metrics about your calls
  - name: Knowledge Bases
    description: >-
      Manage knowledge bases and sources for agent retrieval-augmented
      generation
  - name: Test Suites
    description: Manage test suites, test cases, and test runs for agent evaluation
  - name: Voices
    description: Browse the voices available to your organization for agent speech
  - name: Webhooks
    description: Webhook delivery settings for your organization
paths:
  /campaigns/{id}/cancel:
    post:
      tags:
        - Campaigns
      summary: Cancel Campaign
      description: Stop for good; contacts not yet called become canceled.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Campaign
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Campaign'
        '400':
          description: no_contacts, agent_missing_trunk, from_number_not_on_trunk
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '409':
          description: invalid_transition
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
components:
  schemas:
    Campaign:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
            - draft
            - running
            - paused
            - completed
            - canceled
        agentId:
          type: string
        agentName:
          type: string
          nullable: true
        fromNumber:
          type: string
          description: Caller ID; must be on the agent's SIP trunk
        environment:
          type: string
          nullable: true
        startAt:
          type: string
          format: date-time
          nullable: true
          description: Don't dial before this time
        callingWindow:
          type: object
          description: Calling window. A contact's own timezone wins over the campaign's.
          properties:
            start:
              type: string
              example: '09:00'
              description: 24h HH:MM
            end:
              type: string
              example: '18:00'
              description: >-
                24h HH:MM (exclusive); may be earlier than start to cross
                midnight
            days:
              type: array
              items:
                type: integer
                minimum: 0
                maximum: 6
              description: 0 = Sunday. Default Monday to Friday
            timezone:
              type: string
              example: America/New_York
          required:
            - start
            - end
            - timezone
          nullable: true
        retryPolicy:
          type: object
          properties:
            maxAttempts:
              type: integer
              minimum: 1
              maximum: 10
              default: 3
            retryDelayMinutes:
              type: integer
              minimum: 1
              maximum: 10080
              default: 60
            retryOn:
              type: array
              items:
                type: string
                enum:
                  - no_answer
                  - busy
                  - voicemail
                  - declined
                  - failed
              default:
                - no_answer
                - busy
                - failed
          nullable: true
        maxConcurrency:
          type: integer
          minimum: 1
          nullable: true
        callsPerSecond:
          type: number
          minimum: 0.1
          maximum: 10
          default: 1
        voicemailStrategy:
          type: string
          enum:
            - agent
            - last_attempt
          default: agent
          description: >-
            `last_attempt`: hang up on voicemail and retry; leave the message
            only on the final attempt
        defaultVariables:
          type: object
          additionalProperties: true
        progress:
          type: object
          properties:
            total:
              type: integer
            done:
              type: integer
            contacts:
              type: object
              additionalProperties:
                type: integer
              description: Contacts per status
            outcomes:
              type: object
              additionalProperties:
                type: integer
              description: Contacts per outcome
        startedAt:
          type: string
          nullable: true
        completedAt:
          type: string
          nullable: true
        createdAt:
          type: string
        updatedAt:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Generate API keys from the RevRing
        dashboard.

````

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