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

# Update WhatsApp campaign

> Update WhatsApp campaign settings and replace template mappings

Updates configuration fields for a WhatsApp campaign. If `templates` array is provided in the request payload, the entire set of template mappings is replaced wholesale.

### Path parameters

<ParamField path="id" type="string" required>
  The unique UUID of the WhatsApp campaign.
</ParamField>

### Body parameters

<ParamField body="name" type="string">
  Updated campaign name.
</ParamField>

<ParamField body="phoneNumberId" type="string">
  Updated Meta phone number ID.
</ParamField>

<ParamField body="isActive" type="boolean">
  Enable or disable the campaign.
</ParamField>

<ParamField body="templates" type="object[]">
  New array of template mappings (replaces existing mappings).

  <Expandable title="Template Mapping">
    <ParamField body="templateName" type="string" required>
      Name of the approved Meta WhatsApp template.
    </ParamField>

    <ParamField body="languageCode" type="string" default="en_US">
      Language code.
    </ParamField>

    <ParamField body="process" type="string" required>
      `INCOMING` or `OUTGOING`.
    </ParamField>

    <ParamField body="callStatus" type="string" required>
      `ANSWERED`, `UNANSWERED`, `FAILED`, `BUSY`.
    </ParamField>
  </Expandable>
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl -X PUT https://api.agentic-os.com/api/v1/whatsapp/campaigns/55555555-5555-5555-5555-555555555555 \
    -H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "isActive": true,
      "templates": [
        {
          "templateName": "call_summary_v2",
          "languageCode": "en_US",
          "process": "OUTGOING",
          "callStatus": "ANSWERED"
        }
      ]
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.put(
      "https://api.agentic-os.com/api/v1/whatsapp/campaigns/55555555-5555-5555-5555-555555555555",
      headers={
          "Authorization": f"Bearer {API_KEY}",
          "Content-Type": "application/json",
      },
      json={
          "isActive": True,
          "templates": [
              {
                  "templateName": "call_summary_v2",
                  "languageCode": "en_US",
                  "process": "OUTGOING",
                  "callStatus": "ANSWERED",
              }
          ],
      },
  )
  print(response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch(
    "https://api.agentic-os.com/api/v1/whatsapp/campaigns/55555555-5555-5555-5555-555555555555",
    {
      method: "PUT",
      headers: {
        Authorization: `Bearer ${API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        isActive: true,
        templates: [
          {
            templateName: "call_summary_v2",
            languageCode: "en_US",
            process: "OUTGOING",
            callStatus: "ANSWERED",
          },
        ],
      }),
    },
  );
  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "55555555-5555-5555-5555-555555555555",
  "tenantId": "990e8400-e29b-41d4-a716-446655440000",
  "agentId": "11111111-1111-1111-1111-111111111111",
  "name": "Post-Call Customer Follow-up",
  "phoneNumberId": "105938472910293",
  "isActive": true,
  "templates": [
    {
      "id": "template_3",
      "templateName": "call_summary_v2",
      "languageCode": "en_US",
      "process": "OUTGOING",
      "callStatus": "ANSWERED"
    }
  ],
  "createdAt": "2026-06-01T11:00:00.000Z",
  "updatedAt": "2026-06-01T11:30:00.000Z"
}
```
