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

# Update Campaign Name

> Updates the name of an existing campaign by ID.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/voice-agents/campaigns/{id}
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/voice-agents/campaigns/{id}:
    patch:
      summary: Update a campaign's name
      description: Updates the name of an existing campaign by ID.
      parameters:
        - in: path
          name: id
          required: true
          description: UUID of the campaign.
          schema:
            type: string
            format: uuid
            example: a8f7656f-098b-4c43-b165-7cfd2cc8ac50
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCampaignResponse'
        '400':
          description: Validation/Bad request error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Campaign not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateCampaignRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: The new campaign name (1-100 characters).
          example: Updated Campaign Name
          maxLength: 100
          minLength: 1
    UpdateCampaignResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Campaign updated successfully
        messageKey:
          type: string
          example: CAMPAIGN_UPDATED_SUCCESSFULLY
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: a8f7656f-098b-4c43-b165-7cfd2cc8ac50
            name:
              type: string
              example: Q1 Customer Outreach
            status:
              type: string
              enum:
                - SCHEDULED
                - RUNNING
                - PAUSED
                - COMPLETED
                - CANCELLED
              example: SCHEDULED
            sendType:
              type: string
              enum:
                - NOW
                - SCHEDULED
              example: NOW
            scheduledDate:
              type: string
              format: date-time
              example: '2025-12-01T09:00:00Z'
              nullable: true
            scheduledTimezone:
              type: string
              example: America/New_York
              nullable: true
            timeRange:
              type: object
              nullable: true
              properties:
                days:
                  type: array
                  items:
                    type: string
                    enum:
                      - MONDAY
                      - TUESDAY
                      - WEDNESDAY
                      - THURSDAY
                      - FRIDAY
                      - SATURDAY
                      - SUNDAY
                  example:
                    - MONDAY
                    - TUESDAY
                    - WEDNESDAY
                startCallingTime:
                  type: string
                  example: '09:00'
                endCallingTime:
                  type: string
                  example: '17:00'
            reservedConcurrency:
              type: integer
              example: 10
            webhookUrl:
              type: string
              example: https://example.com/webhook
              nullable: true
            projectId:
              type: string
              format: uuid
              example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
            userId:
              type: string
              format: uuid
              example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
            voiceAgentId:
              type: string
              format: uuid
              example: 68f7656f-098b-4c43-b165-7cfd2cc8ac40
            phoneNumberId:
              type: string
              format: uuid
              example: 48f7656f-098b-4c43-b165-7cfd2cc8ac30
            createdAt:
              type: string
              format: date-time
              example: '2025-12-06T10:00:00.000Z'
            updatedAt:
              type: string
              format: date-time
              example: '2025-12-06T10:00:00.000Z'
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````