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

# Update Campaign

> Update an existing campaign's configuration and customer records.

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication (e.g., `Bearer <your_token>`).
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>The Campaign Id to update details for (e.g., `camp_abc123`).</ParamField>

### Body Parameters

<ParamField body="name" type="string">The name of the campaign.</ParamField>

<ParamField body="description" type="string">A brief description of the campaign's purpose.</ParamField>

<ParamField body="campaignType" type="string">
  The type of campaign (e.g., `emi`, `edi`, `lead`).

  <Expandable title="options">
    * `emi`
    * `edi`
    * `lead`
  </Expandable>
</ParamField>

<ParamField body="startDate" type="string">Start date in `YYYY-MM-DD` format.</ParamField>

<ParamField body="startTime" type="string">Start time in `HH:MM` format (24-hour).</ParamField>

<ParamField body="endDate" type="string">End date in `YYYY-MM-DD` format.</ParamField>

<ParamField body="endTime" type="string">End time in `HH:MM` format (24-hour).</ParamField>

<ParamField body="languages" type="array">
  List of languages supported in this campaign.

  <Expandable title="options">
    * `hindi`
    * `english`
    * `bengali`
    * `telugu`
    * `marathi`
    * `tamil`
    * `gujarati`
    * `kannada`
    * `malayalam`
    * `punjabi`
    * `odia`
    * `assamese`
  </Expandable>
</ParamField>

<ParamField body="region" type="string">
  Target region for the campaign.

  <Expandable title="options">
    * `north`
    * `south`
    * `east`
    * `west`
    * `central`
  </Expandable>
</ParamField>

<ParamField body="tags" type="array">
  Tags for categorization (e.g., `["priority", "revised"]`).
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates if the update was successful.
</ResponseField>

<ResponseField name="message" type="string">
  A confirmation message.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      The ID of the updated campaign.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="error" type="string">
  The error type or code (Error responses only).
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
  	"success": true,
  	"message": "Campaign updated successfully",
  	"updatedFields": [
  		"name", ...
  	]
  }

  ```

  ```json 400 Bad Request theme={null}
  {
    "success": false,
    "error": "ValidationError",
    "message": "Invalid date format provided"
  }

  ```

  ```json 401 Unauthorized theme={null}
  {
    "success": false,
    "error": "Unauthorized",
    "message": "Missing or invalid authorization header"
  }

  ```

  ```json 404 Not Found theme={null}
  {
    "success": false,
    "error": "NotFound",
    "message": "Campaign not found"
  }

  ```

  ```json 500 Server Error theme={null}
  {
    "success": false,
    "error": "InternalServerError",
    "message": "An unexpected error occurred"
  }

  ```
</ResponseExample>
