# Update broadcast

Updates a broadcast. Fields you leave out keep their current values.

```http
PATCH https://api.pozy.ai/v1/broadcasts/{broadcastId}
```

- Area: Automations / Broadcasts
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `broadcastId` (string, required)

## Request body

Content type: `application/json`

- `name`, string
- `description`, string
- `message`, object
  - `text`, string
  - `attachments`, array of object: Up to 10 items
    - `type`, string
    - `url`, string
    - `filename`, string
  - `messageTag`, string: One of `CONFIRMED_EVENT_UPDATE`, `POST_PURCHASE_UPDATE`, `ACCOUNT_UPDATE`, `HUMAN_AGENT`
- `template`, object
  - `name`, string
  - `language`, string
  - `variableMapping`, map of object: Keys are free-form; each value has these fields
    - `field`, string: One of `name`, `phone`, `email`, `company`, `custom`
    - `customValue`, string
- `segmentFilters`, object

## Example request

```bash
curl -X PATCH "https://api.pozy.ai/v1/broadcasts/6ce1988a4c4f8bc6d3ca157a" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme",
  "description": "A short description",
  "message": {
    "text": "Hello from Pozy",
    "attachments": [
      {
        "type": "string",
        "url": "https://pozy.ai/media/example-1.jpg",
        "filename": "photo.jpg"
      }
    ],
    "messageTag": "CONFIRMED_EVENT_UPDATE"
  },
  "template": {
    "name": "Acme",
    "language": "en",
    "variableMapping": {
      "key": {
        "field": "name",
        "customValue": "string"
      }
    }
  }
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/broadcasts/6ce1988a4c4f8bc6d3ca157a", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Acme",
    description: "A short description",
    message: {
      text: "Hello from Pozy",
      attachments: [
        {
          type: "string",
          url: "https://pozy.ai/media/example-1.jpg",
          filename: "photo.jpg"
        }
      ],
      messageTag: "CONFIRMED_EVENT_UPDATE"
    },
    template: {
      name: "Acme",
      language: "en",
      variableMapping: {
        key: {
          field: "name",
          customValue: "string"
        }
      }
    }
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.patch(
    "https://api.pozy.ai/v1/broadcasts/6ce1988a4c4f8bc6d3ca157a",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "name": "Acme",
        "description": "A short description",
        "message": {
            "text": "Hello from Pozy",
            "attachments": [
                {
                    "type": "string",
                    "url": "https://pozy.ai/media/example-1.jpg",
                    "filename": "photo.jpg",
                },
            ],
            "messageTag": "CONFIRMED_EVENT_UPDATE",
        },
        "template": {
            "name": "Acme",
            "language": "en",
            "variableMapping": {
                "key": {
                    "field": "name",
                    "customValue": "string",
                },
            },
        },
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `broadcast`, object
  - `id`, string
  - `name`, string
  - `description`, string
  - `status`, string
  - `updatedAt`, string (date-time)

```json
{
  "success": true,
  "broadcast": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "name": "Acme",
    "description": "A short description",
    "status": "active",
    "updatedAt": "2026-10-02T09:00:00.000Z"
  }
}
```
