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

# Unpublish (pause) a campaign

> Moves a campaign back to draft, so it stops sending, as the app's Unpublish does. Publish it again to resume: contacts it already reached don't get it again.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/campaigns/{campaign_id}/unpublish
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/campaigns/{campaign_id}/unpublish:
    post:
      tags:
        - campaigns
      summary: Unpublish (pause) a campaign
      description: >-
        Moves a campaign back to draft, so it stops sending, as the app's
        Unpublish does. Publish it again to resume: contacts it already reached
        don't get it again.
      operationId: campaigns_unpublish
      parameters:
        - description: The campaign's id, from GET /v1/campaigns
          in: path
          name: campaign_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    Campaign:
      properties:
        audience_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Who it''s sent to: a contact view, from GET /v1/campaigns/audiences'
          title: Audience Id
        bcc_emails:
          items:
            type: string
          title: Bcc Emails
          type: array
        bcc_roles:
          items:
            $ref: '#/components/schemas/Role'
          title: Bcc Roles
          type: array
        cc_emails:
          items:
            type: string
          title: Cc Emails
          type: array
        cc_roles:
          items:
            $ref: '#/components/schemas/Role'
          title: Cc Roles
          type: array
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        end_date:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: End Date
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        reminder_days:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Survey campaigns: days before a contact who hasn't answered gets the
            survey again
          title: Reminder Days
        send_hour:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            The hour (0-23) sends start each day, in send_timezone. Set both, or
            neither (any hour)
          title: Send Hour
        send_timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Send Timezone
        sender_role:
          anyOf:
            - $ref: '#/components/schemas/Role'
            - type: 'null'
          description: >-
            Send from the person in this role on each recipient's account,
            instead of the template's or survey's sender. A recipient whose
            account has no one in the role gets the template's or survey's
            sender
        skip_weekends:
          title: Skip Weekends
          type: boolean
        start_date:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Start Date
        state:
          description: >-
            draft or published. A published campaign sends each hour, between
            its start and end dates, to the contacts in its audience it has not
            reached
          enum:
            - draft
            - published
          title: State
          type: string
        survey_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Survey campaigns: the survey, from GET /v1/surveys'
          title: Survey Id
        template_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Email campaigns: the email template, from GET /v1/templates'
          title: Template Id
        type:
          description: >-
            email sends an email template; survey sends a survey's email, with
            the recipient's link to the survey
          enum:
            - email
            - survey
          title: Type
          type: string
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Updated At
      required:
        - id
        - name
        - type
        - description
        - state
        - start_date
        - end_date
        - survey_id
        - template_id
        - audience_id
        - sender_role
        - cc_emails
        - bcc_emails
        - cc_roles
        - bcc_roles
        - reminder_days
        - skip_weekends
        - send_hour
        - send_timezone
        - created_at
        - updated_at
      title: Campaign
      type: object
    Role:
      properties:
        field_id:
          description: The role's account field id
          title: Field Id
          type: string
        name:
          title: Name
          type: string
      required:
        - field_id
        - name
      title: Role
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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