# PATCH /event-schedules/:schedule_id

**Resource:** [Auto Schedules](./auto-schedules.md)  
**MCP tool:** `update_auto_schedule`  
**Scopes:** `schedules:write`  
**Write operation:** yes

Update an event schedule.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `schedule_id` | path | string | yes |  |
| `name` | body | string | no |  |
| `cron_expression` | body | string | no |  |
| `time_of_day` | body | string | no |  |
| `timezone` | body | string | no |  |
| `source_kind` | body | string | no | 'audience' (default), 'external_feed', or 'static'. |
| `audience_type` | body | string | no |  |
| `audience_filter` | body | object | no | Optional audience filter (shape depends on audience_type). Notably metadata_date_within = { field_id, min_days?, max_days? } targets contacts/deals whose custom datetime field (<entity>.metadata.<field_id>) falls between today+min_days and today+max_days. See create_auto_schedule for the full per-type filter shape. |
| `source_config` | body | object | no | Config for external_feed/static sources. See create_auto_schedule for the full shape. |
| `is_active` | body | boolean | no |  |
| `end_at` | body | string | no |  |
| `max_runs` | body | number | no |  |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/event-schedules/:schedule_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","cron_expression":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`