---
title: "Updates an Opportunity State"
method: PUT
path: "/Opportunities/{id}/StateChange"
tags: ["Opportunities"]
---

# Updates an Opportunity State

`PUT /Opportunities/{id}/StateChange`

## Request

- Base URL: `https://api.insightly.com/v3.1`
- URL: `https://api.insightly.com/v3.1/Opportunities/{id}/StateChange`
- Auth: none declared. Required headers: `Authorization`

## Path parameters

- `id` integer, required

## Headers

- `Authorization` string, required

## Request body

- APIOpportunityState
  - `OPPORTUNITY_ID` integer
  - `DATE_CHANGED_UTC` string, date-time
  - `FOR_OPPORTUNITY_STATE` string
  - `STATE_REASON_ID` integer
  - `STATE_REASON` string

## Response `200`

Request succeeded.

- APIOpportunityState
  - `OPPORTUNITY_ID` integer
  - `DATE_CHANGED_UTC` string, date-time
  - `FOR_OPPORTUNITY_STATE` string
  - `STATE_REASON_ID` integer
  - `STATE_REASON` string

## Other responses

- `400`: Data validation error.
- `401`: Authentication failed.
- `403`: API User does not have access to Opportunity.
- `404`: Opportunity not found.

---

[API](https://skmtc.dev/insightly/apis/insightly-api-v3-1.md) - [All operations](https://skmtc.dev/insightly/apis/insightly-api-v3-1/llms.txt) - [OpenAPI document](https://skmtc.dev/insightly/apis/insightly-api-v3-1/revisions/e7df0c3b65fb?raw)
