# Update opportunity

> Change name, value, currency, source, owner, tags or custom fields.

Source: https://docs.mycrmsim.com/docs/opportunities/update-opportunity

```http
PATCH https://backend.mysmsgateway.app/api/v1/ext/opportunities/{id}
```

- Category: myCRMSIM Opportunities / Opportunities
- Auth: Bearer access token
- Scope: `opportunities.write`

To move it to another stage use Move stage; to win, lose or reopen it use Change status. Those run their own workflow triggers.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | number | yes | Opportunity id. Example: `55` |
| `name` | body | string | no | Up to 191 characters. |
| `value` | body | number | no | Deal value. |
| `currency` | body | string | no | ISO currency code. |
| `source` | body | string | no | Where it came from. |
| `owner_id` | body | number | no | The assigned user. |
| `tags` | body | array<string> | no | Replaces the tags. |
| `custom_fields` | body | object | no | Custom field values by key. |

## Request body

```json
{
  "value": 1500
}
```

## Response 200

OK

```json
{
  "success": true,
  "message": "Opportunity updated",
  "data": {
    "id": 55,
    "workspace_id": 7,
    "name": "Website redesign",
    "value": 1500,
    "currency": "USD",
    "status": "open",
    "lost_reason": null,
    "pipeline_id": 3,
    "pipeline": {
      "id": 3,
      "name": "Sales"
    },
    "stage_id": 9,
    "stage": {
      "id": 9,
      "name": "Qualified",
      "color": "#22c55e",
      "position": 1,
      "is_won": false,
      "is_lost": false
    },
    "contact_id": 1234,
    "contact": {
      "id": 1234,
      "first_name": "Ann",
      "last_name": "Lee",
      "email": "ann@example.com",
      "phone_number": "+61412345678",
      "company_name": "Lee Studio"
    },
    "owner_id": null,
    "source": "website",
    "tags": [
      "web"
    ],
    "custom_fields": {},
    "closed_at": null,
    "stage_changed_at": "2026-10-27T09:00:00.000Z",
    "last_activity_at": "2026-10-27T09:00:00.000Z",
    "created_at": "2026-10-27T09:00:00.000Z",
    "updated_at": "2026-10-27T09:00:00.000Z"
  }
}
```

## Response 400

Nothing to update

```json
{
  "success": false,
  "message": "Nothing to update — send name, value, currency, source, owner_id, tags or custom_fields."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): opportunities.write. This integration was granted: …"
}
```

## Response 404

Opportunity does not exist or is not owned by the installer

```json
{
  "success": false,
  "message": "Opportunity not found or not accessible to this token"
}
```
