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

# Create Single Campaign

> Create an Sms / Call / WhatsApp Campaign for a single Contact



## OpenAPI

````yaml POST /v1/campaigns/createCampaign/{workspaceId}
openapi: 3.0.1
info:
  title: OpenAPI Voice API
  description: >-
    A sample API that uses a voice API to demonstrate outbound call
    functionality
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://catalystapi.superdashhq.com/api/
security: []
paths:
  /v1/campaigns/createCampaign/{workspaceId}:
    post:
      description: >-
        Use this API endpoint to immediately initiate a call or SMS to a
        specified number.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: Your workspace ID
          schema:
            type: string
      requestBody:
        description: Details required to initiate the communication
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                campaignType:
                  type: string
                  description: The type of campaign
                  enum:
                    - sms
                    - call
                    - whatsapp
                assistantId:
                  type: string
                  description: The ID of the assistant
                fromNumber:
                  type: string
                  description: Sender's number
                toNumber:
                  type: string
                  description: Recipient's number
                triggerType:
                  type: string
                  description: The type of trigger to initiate the communication
                  enum:
                    - triggerImmediately
                    - triggerBasedOnCampaign
                ignorePreviousCampaigns:
                  type: boolean
                  description: >-
                    Ignore the previous campaign history of a contact and reach
                    out again
                message:
                  type: string
                  description: The message content (Required for SMS)
                  nullable: true
                templateName:
                  type: string
                  description: >-
                    Name of the approved WhatsApp template (Required for
                    WHATSAPP)
                  nullable: true
                templateLanguage:
                  type: string
                  description: Language of the template (Required for WHATSAPP)
                  nullable: true
                attributes:
                  type: object
                  description: Additional attributes for the communication
                  properties:
                    customField1:
                      type: string
                      description: >-
                        Any value you want to dynamically access while placing
                        the call or sending the SMS, like first name, last name,
                        company name, etc.
                    customField2:
                      type: string
                      description: >-
                        Any value you want to dynamically access while placing
                        the call or sending the SMS, like first name, last name,
                        company name, etc.
                    customField3:
                      type: string
                      description: >-
                        Any value you want to dynamically access while placing
                        the call or sending the SMS, like first name, last name,
                        company name, etc.
              required:
                - fromNumber
                - toNumber
                - triggerType
                - campaignType
                - assistantId
      responses:
        '200':
          description: Communication initiated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Confirmation message indicating the call or SMS was placed
                example:
                  message: 'Campaign created/updated with id: {campaignID}'
        '400':
          description: Bad request due to invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code for the error
                  code:
                    type: integer
                    description: Application-specific error code
                  moreInfo:
                    type: string
                    description: URL with more information about the error
                example:
                  message: Error message
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code for the error
                example:
                  message: API key is not valid
        '402':
          description: Payment error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code for the error
                example:
                  message: Please upgrade your account to continue
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code for the error
                example:
                  message: API key is not valid
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code for the error
                example:
                  message: Server Error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````