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

# Update Campaign

> Update Campaign.

<Note>Actual endpoint: `PATCH https://api.ravan.ai/api/v1/campaigns/{id}/`</Note>

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Path Parameters

<ParamField path="id" type="string" required placeholder="019ebc12-3fb2-7169-bd9c-d98c1d1a82a4">
  The unique ID of the campaign to update. Use the `id` returned by the List or Create Campaign endpoint.
</ParamField>

***

### Body

<ParamField body="id" type="string" placeholder="019ebbef-48d7-7ebc-a751-4a10362a3bbf">
  The campaign ID (can be included in the body).
</ParamField>

<ParamField body="name" type="string" placeholder="test agent harsh fixed name">
  The internal name of the campaign.
</ParamField>

<ParamField body="agentId" type="string" placeholder="019e92f8-f032-7fb7-b294-508f4167618e">
  The unique ID of the agent assigned to this campaign.
</ParamField>

<ParamField body="phoneNumberId" type="string" placeholder="019e92f4-097d-7a52-b5e5-fa7e0dd0761f">
  The phone number record ID to use for this campaign.
</ParamField>

<ParamField body="fromPhoneNumber" type="string" placeholder="+918035088113">
  The caller ID used for outbound calls, in E.164 format.
</ParamField>

<ParamField body="status" type="string" placeholder="active">
  Campaign status: `draft`, `active`, `paused`, `completed`.
</ParamField>

<ParamField body="executionStatus" type="string" placeholder="draft">
  Execution state: `draft`, `running`, `paused`, `completed`.
</ParamField>

<ParamField body="schedule" type="object">
  Campaign schedule settings.

  <Expandable title="schedule">
    <ParamField body="start" type="string" placeholder="">
      Campaign start datetime.
    </ParamField>

    <ParamField body="end" type="string" placeholder="">
      Campaign end datetime.
    </ParamField>

    <ParamField body="windowStart" type="string" placeholder="11:00">
      Daily calling window start time in `HH:mm` 24-hour format.
    </ParamField>

    <ParamField body="windowEnd" type="string" placeholder="19:00">
      Daily calling window end time in `HH:mm` 24-hour format.
    </ParamField>

    <ParamField body="windowDays" type="integer[]" placeholder="[1, 2, 3]">
      Active days of the week (1=Monday … 7=Sunday).
    </ParamField>

    <ParamField body="timezone" type="string" placeholder="Asia/Kolkata">
      IANA timezone for the schedule.
    </ParamField>

    <ParamField body="maxConcurrent" type="integer" placeholder="1">
      Maximum number of concurrent calls.
    </ParamField>

    <ParamField body="retryAttempts" type="integer" placeholder="2">
      Maximum retry attempts per contact.
    </ParamField>

    <ParamField body="retryGapMin" type="integer" placeholder="30">
      Wait time in minutes between retries.
    </ParamField>
  </Expandable>
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message. Example: `Campaign updated successfully`
</ResponseField>

<ResponseField name="data" type="object">
  Updated campaign object.

  <Expandable title="data">
    <ResponseField name="id" type="string">
      Campaign UUID. Example: `019ebc12-3fb2-7169-bd9c-d98c1d1a82a4`
    </ResponseField>

    <ResponseField name="organizationId" type="string">
      Organization UUID. Example: `95a4e479-03a7-4f1b-834d-8705756e8e59`
    </ResponseField>

    <ResponseField name="name" type="string">
      Campaign name. Example: `test agent harsh fixed name`
    </ResponseField>

    <ResponseField name="agentId" type="string">
      Assigned agent UUID. Example: `019e92f8-f032-7fb7-b294-508f4167618e`
    </ResponseField>

    <ResponseField name="phoneNumberId" type="string">
      Phone number UUID. Example: `019e92f4-097d-7a52-b5e5-fa7e0dd0761f`
    </ResponseField>

    <ResponseField name="fromPhoneNumber" type="string">
      Caller ID in E.164 format. Example: `+918035088113`
    </ResponseField>

    <ResponseField name="status" type="string">
      Campaign status: `draft`, `active`, `paused`, `completed`.
    </ResponseField>

    <ResponseField name="executionStatus" type="string">
      Execution state: `draft`, `running`, `paused`, `completed`.
    </ResponseField>

    <ResponseField name="schedule" type="object">
      Campaign scheduling configuration.

      <Expandable title="schedule">
        <ResponseField name="start" type="string">
          Campaign start datetime.
        </ResponseField>

        <ResponseField name="end" type="string">
          Campaign end datetime.
        </ResponseField>

        <ResponseField name="windowStart" type="string">
          Daily calling window start time. Example: `11:00`
        </ResponseField>

        <ResponseField name="windowEnd" type="string">
          Daily calling window end time. Example: `19:00`
        </ResponseField>

        <ResponseField name="windowDays" type="integer[]">
          Active days of the week (1=Monday … 7=Sunday). Example: `[1, 2, 3]`
        </ResponseField>

        <ResponseField name="timezone" type="string">
          Timezone for the schedule. Example: `Asia/Kolkata`
        </ResponseField>

        <ResponseField name="maxConcurrent" type="integer">
          Maximum concurrent calls. Example: `1`
        </ResponseField>

        <ResponseField name="retryAttempts" type="integer">
          Number of retry attempts. Example: `2`
        </ResponseField>

        <ResponseField name="retryGapMin" type="integer">
          Gap in minutes between retries. Example: `30`
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="contactStats" type="object">
      Aggregated contact-level statistics.

      <Expandable title="contactStats">
        <ResponseField name="total" type="integer">Total contacts.</ResponseField>
        <ResponseField name="contacted" type="integer">Contacts successfully reached.</ResponseField>
        <ResponseField name="successful" type="integer">Contacts with a successful outcome.</ResponseField>
        <ResponseField name="failed" type="integer">Contacts that failed.</ResponseField>
        <ResponseField name="noAnswer" type="integer">Contacts that did not answer.</ResponseField>
        <ResponseField name="pending" type="integer">Contacts yet to be called.</ResponseField>
        <ResponseField name="inProgress" type="integer">Contacts currently being called.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="startedAt" type="string">
      Timestamp when the campaign started (ISO 8601).
    </ResponseField>

    <ResponseField name="completedAt" type="string">
      Timestamp when the campaign completed (ISO 8601).
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      Creation timestamp. Example: `2026-06-12T13:42:53Z`
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      Last updated timestamp. Example: `2026-06-12T13:58:05Z`
    </ResponseField>

    <ResponseField name="outboundMaxConcurrent" type="integer">
      Maximum concurrent outbound calls limit. Example: `0`
    </ResponseField>

    <ResponseField name="outboundMaxCps" type="integer">
      Maximum outbound calls per second. Example: `0`
    </ResponseField>
  </Expandable>
</ResponseField>
