# PATCH /opportunities/:opportunity_id

**Resource:** [Opportunities](./opportunities.md)  
**MCP tool:** `update_opportunity`  
**Scopes:** `opportunities:write`  
**Write operation:** yes

Update one or more fields on an opportunity. Pass only the fields you want to change. Set archived=true to archive (hide from active lists, pipeline, and dashboard counts) or archived=false to restore. The next_action_* fields set the opportunity's reminder, which appears on its card and on the calendar.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `opportunity_id` | path | string | yes |  |
| `name` | body | string | no |  |
| `value` | body | number | no |  |
| `currency` | body | string | no |  |
| `value_is_manual` | body | boolean | no | Whether this opportunity's value is set manually (locked) or summed automatically from its products. Setting value also sets this to true, so products stop overwriting it. Pass false to revert to auto — the value is immediately recomputed from the products. |
| `status` | body | string | no |  |
| `owner_id` | body | string | no |  |
| `expected_close` | body | string | no |  |
| `notes` | body | string | no |  |
| `contact_id` | body | string | no |  |
| `customer_id` | body | string | no |  |
| `archived` | body | boolean | no | true = archive, false = restore. Archived opportunities stay searchable and API-accessible but drop out of active lists, the pipeline board, and dashboard counts. |
| `next_action_name` | body | string | no | Title of the opportunity's next action, e.g. "Follow-up call". Shows on the opportunity card and on the calendar at https://app.trustpager.com/tasks/calendar. |
| `next_action_date` | body | string | no | Date of the next action as ISO "YYYY-MM-DD". Pass null to clear the reminder. |
| `next_action_time` | body | string | no | Time of the next action as a UTC wall time, "HH:MM" or "HH:MM:SS". Paired with next_action_date — a date with no time renders as an untimed reminder. |
| `next_action_duration` | body | number | no | Length of the next action in minutes. Drives the end time shown on the calendar and the block height in Day view. Omit for a point-in-time reminder: with no duration the calendar shows a start time only and never invents an end time. |
| `next_action_type` | body | string | no | "next_action" = a plain reminder. "google_meeting" = a Google Meet (a meeting URL is generated on save). A custom event type id is also accepted. |
| `next_action_description` | body | string | no | Longer notes for the next action, shown in the reminder editor. |
| `next_action_color` | body | string | no | Colour of the calendar chip: blue, red, green, purple, orange, teal, pink, yellow, indigo, or gray. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/opportunities/:opportunity_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","value":"...","currency":"..."}'
```

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