# Update Opportunity

PUT https://services.leadconnectorhq.com/opportunities/{id}

Update Opportunity

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `opportunities.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | Yes | Opportunity Id |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/opportunities/{id}": {
      "put": {
        "summary": "Update Opportunity",
        "operationId": "updateOpportunity",
        "description": "Update Opportunity",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Opportunity Id",
            "schema": {
              "example": "yWQobCRIhRguQtD2llvk",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOpportunityDtoV3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPostOpportunitySuccessfulResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "opportunities.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "UpdateOpportunityDtoV3": {
        "type": "object",
        "properties": {
          "pipelineId": {
            "type": "string",
            "description": "pipeline Id",
            "example": "bCkKGpDsyPP4peuKowkG"
          },
          "name": {
            "type": "string",
            "description": "Name of the opportunity",
            "example": "First Opps"
          },
          "pipelineStageId": {
            "type": "string",
            "description": "Identifier of the pipeline stage",
            "example": "7915dedc-8f18-44d5-8bc3-77c04e994a10"
          },
          "status": {
            "type": "string",
            "description": "Current status of the opportunity",
            "enum": [
              "open",
              "won",
              "lost",
              "abandoned",
              "all"
            ],
            "example": "open"
          },
          "monetaryValue": {
            "type": "number",
            "description": "Monetary value of the opportunity",
            "example": 220
          },
          "forecastExpectedCloseDate": {
            "type": "string",
            "description": "Expected close date. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, or ISO 8601",
            "example": "2026-04-23"
          },
          "forecastProbability": {
            "type": "number",
            "description": "Forecast probability",
            "example": 20
          },
          "assignedTo": {
            "type": "string",
            "description": "Identifier of the user the opportunity is assigned to",
            "example": "082goXVW3lIExEQPOnd3"
          },
          "customFields": {
            "type": "array",
            "description": "Update custom fields to opportunities.",
            "example": [
              {
                "id": "6dvNaf7VhkQ9snc5vnjJ",
                "fieldValue": "9039160788"
              }
            ],
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "6dvNaf7VhkQ9snc5vnjJ",
                      "description": "Pass either `id` or `key` of custom field"
                    },
                    "key": {
                      "type": "string",
                      "example": "my_custom_field",
                      "description": "Pass either `id` or `key` of custom field"
                    },
                    "fieldValue": {
                      "type": "string",
                      "description": "Value of the custom field",
                      "example": "9039160788"
                    }
                  },
                  "title": "customFieldsInputStringSchemaV3"
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Pass either `id` or `key` of custom field",
                      "example": "6dvNaf7VhkQ9snc5vnjJ"
                    },
                    "key": {
                      "type": "string",
                      "description": "Pass either `id` or `key` of custom field",
                      "example": "my_custom_field"
                    },
                    "fieldValue": {
                      "description": "Value of the custom field",
                      "example": [
                        "test",
                        "test2"
                      ],
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "title": "customFieldsInputArraySchemaV3"
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Pass either `id` or `key` of custom field",
                      "example": "6dvNaf7VhkQ9snc5vnjJ"
                    },
                    "key": {
                      "type": "string",
                      "description": "Pass either `id` or `key` of custom field",
                      "example": "my_custom_field"
                    },
                    "fieldValue": {
                      "type": "object",
                      "description": "Value of the custom field",
                      "example": {
                        "url": "https://example.com/file.pdf",
                        "size": 1024
                      }
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "title": "customFieldsInputObjectSchemaV3"
                }
              ]
            }
          }
        },
        "title": "UpdateOpportunityDtoV3"
      },
      "GetPostOpportunitySuccessfulResponseDto": {
        "type": "object",
        "properties": {
          "opportunity": {
            "description": "The created or retrieved opportunity object",
            "example": {},
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the opportunity",
                    "example": "yWQobCRIhRguQtD2llvk"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the opportunity",
                    "example": "testing"
                  },
                  "monetaryValue": {
                    "type": "number",
                    "description": "Monetary value of the opportunity",
                    "example": 500
                  },
                  "pipelineId": {
                    "type": "string",
                    "description": "Identifier of the pipeline the opportunity belongs to",
                    "example": "VDm7RPYC2GLUvdpKmBfC"
                  },
                  "pipelineStageId": {
                    "type": "string",
                    "description": "Identifier of the pipeline stage the opportunity is in",
                    "example": "e93ba61a-53b3-45e7-985a-c7732dbcdb69"
                  },
                  "assignedTo": {
                    "type": "string",
                    "description": "Identifier of the user the opportunity is assigned to",
                    "example": "zT46WSCPbudrq4zhWMk6"
                  },
                  "status": {
                    "type": "string",
                    "description": "Current status of the opportunity",
                    "example": "open"
                  },
                  "source": {
                    "type": "string",
                    "description": "Source of the opportunity",
                    "example": ""
                  },
                  "lastStatusChangeAt": {
                    "type": "string",
                    "description": "ISO 8601 timestamp of the last status change",
                    "example": "2021-08-03T04:55:17.355Z"
                  },
                  "lastStageChangeAt": {
                    "type": "string",
                    "description": "ISO 8601 timestamp of the last stage change",
                    "example": "2021-08-03T04:55:17.355Z"
                  },
                  "lastActionDate": {
                    "type": "string",
                    "description": "ISO 8601 timestamp of the last action on the opportunity",
                    "example": "2021-08-03T04:55:17.355Z"
                  },
                  "indexVersion": {
                    "type": "string",
                    "description": "Index version of the opportunity record",
                    "example": 1
                  },
                  "createdAt": {
                    "type": "string",
                    "description": "ISO 8601 timestamp when the opportunity was created",
                    "example": "2021-08-03T04:55:17.355Z"
                  },
                  "updatedAt": {
                    "type": "string",
                    "description": "ISO 8601 timestamp when the opportunity was last updated",
                    "example": "2021-08-03T04:55:17.355Z"
                  },
                  "forecastExpectedCloseDate": {
                    "type": "string",
                    "description": "Expected close date for the forecast (YYYY-MM-DD)",
                    "example": "2026-05-20"
                  },
                  "forecastOriginalCloseDate": {
                    "type": "string",
                    "description": "Original forecast close date before any slippage (YYYY-MM-DD)",
                    "example": "2026-05-01"
                  },
                  "forecastSlippageCount": {
                    "type": "number",
                    "description": "Number of times the close date has slipped",
                    "example": 2
                  },
                  "forecastDaysSlipped": {
                    "type": "number",
                    "description": "Total days the close date has slipped",
                    "example": 19
                  },
                  "forecastLastSlippedAt": {
                    "type": "string",
                    "description": "ISO 8601 timestamp of the last close-date slip",
                    "example": "2026-05-22T10:30:00.000Z"
                  },
                  "forecastProbability": {
                    "type": "number",
                    "description": "Forecast win probability percentage (0–100)",
                    "example": 20
                  },
                  "effectiveProbability": {
                    "type": "number",
                    "description": "Effective win probability after stage and forecast adjustments (0–100)",
                    "example": 40
                  },
                  "contactId": {
                    "type": "string",
                    "description": "Identifier of the contact linked to the opportunity",
                    "example": "zT46WSCPbudrq4zhWMk6"
                  },
                  "locationId": {
                    "type": "string",
                    "description": "Identifier of the location (sub-account) the opportunity belongs to",
                    "example": "zT46WSCPbudrq4zhW"
                  },
                  "contact": {
                    "description": "Contact details associated with the opportunity",
                    "example": {},
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the contact",
                            "example": "byMEV0NQinDhq8ZfiOi2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Full name of the contact",
                            "example": "John Deo"
                          },
                          "companyName": {
                            "type": "string",
                            "description": "Company name associated with the contact",
                            "example": "Tesla Inc"
                          },
                          "email": {
                            "type": "string",
                            "description": "Email address of the contact",
                            "example": "john@deo.com"
                          },
                          "phone": {
                            "type": "string",
                            "description": "Phone number of the contact",
                            "example": "+1202-555-0107"
                          },
                          "tags": {
                            "description": "Tags associated with the contact",
                            "example": [
                              "lead",
                              "vip"
                            ],
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "title": "SearchOpportunitiesContactResponseSchema"
                      }
                    ]
                  },
                  "notes": {
                    "description": "Notes attached to the opportunity",
                    "example": [],
                    "type": "array",
                    "items": {
                      "type": "array"
                    }
                  },
                  "tasks": {
                    "description": "Tasks attached to the opportunity",
                    "example": [],
                    "type": "array",
                    "items": {
                      "type": "array"
                    }
                  },
                  "calendarEvents": {
                    "description": "Calendar events attached to the opportunity",
                    "example": [],
                    "type": "array",
                    "items": {
                      "type": "array"
                    }
                  },
                  "lostReasonId": {
                    "type": "string",
                    "description": "Identifier of the lost reason if the opportunity was marked lost",
                    "example": "zT46WSCPbudrq4zhWMk6"
                  },
                  "customFields": {
                    "description": "Custom fields associated with the opportunity",
                    "example": [],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Unique identifier of the custom field",
                          "example": "MgobCB14YMVKuE4Ka8p1"
                        },
                        "fieldValue": {
                          "description": "The value of the custom field",
                          "example": "custom field value",
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "fieldValue"
                      ],
                      "title": "CustomFieldResponseSchema"
                    }
                  },
                  "followers": {
                    "description": "User IDs following this opportunity",
                    "example": [
                      "sx6wyHhbFdRXh302Lunr"
                    ],
                    "type": "array",
                    "items": {
                      "type": "array"
                    }
                  },
                  "externalObjectId": {
                    "type": "string",
                    "description": "External object identifier for integrations",
                    "example": "ext_obj_12345"
                  }
                },
                "title": "SearchOpportunitiesResponseSchema"
              }
            ]
          }
        },
        "title": "GetPostOpportunitySuccessfulResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## HighLevel SDK Examples

**Node.js** (`@gohighlevel/api-client`)

```javascript
import HighLevel from '@gohighlevel/api-client';

const ghl = new HighLevel({
  privateIntegrationToken: '<PRIVATE_INTEGRATION_TOKEN>'
});

const body = {
  "pipelineId": "bCkKGpDsyPP4peuKowkG",
  "name": "First Opps",
  "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
  "status": "open",
  "monetaryValue": 220,
  "forecastExpectedCloseDate": "2026-04-23",
  "forecastProbability": 20,
  "assignedTo": "082goXVW3lIExEQPOnd3",
  "customFields": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "fieldValue": "9039160788"
    }
  ]
};

const response = await ghl.opportunities.updateOpportunity('<ID>', body);
console.log(response);
```

**Python** (`gohighlevel-api-client`)

```python
from highlevel import HighLevel

client = HighLevel(
    private_integration_token='<PRIVATE_INTEGRATION_TOKEN>'
)

body = {
    "pipelineId": "bCkKGpDsyPP4peuKowkG",
    "name": "First Opps",
    "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
    "status": "open",
    "monetaryValue": 220,
    "forecastExpectedCloseDate": "2026-04-23",
    "forecastProbability": 20,
    "assignedTo": "082goXVW3lIExEQPOnd3",
    "customFields": [
        {
            "id": "6dvNaf7VhkQ9snc5vnjJ",
            "fieldValue": "9039160788"
        }
    ]
}

response = await client.opportunities.update_opportunity('<ID>', body=body)
print(response)
```

**PHP** (`gohighlevel/api-client`)

```php
<?php
require_once 'vendor/autoload.php';

use HighLevel\HighLevel;
use HighLevel\HighLevelConfig;

$config = new HighLevelConfig([
    'privateIntegrationToken' => '<PRIVATE_INTEGRATION_TOKEN>'
]);
$ghl = new HighLevel($config);

$body = [
    'pipelineId' => 'bCkKGpDsyPP4peuKowkG',
    'name' => 'First Opps',
    'pipelineStageId' => '7915dedc-8f18-44d5-8bc3-77c04e994a10',
    'status' => 'open',
    'monetaryValue' => 220,
    'forecastExpectedCloseDate' => '2026-04-23',
    'forecastProbability' => 20,
    'assignedTo' => '082goXVW3lIExEQPOnd3',
    'customFields' => [
        [
            'id' => '6dvNaf7VhkQ9snc5vnjJ',
            'fieldValue' => '9039160788'
        ]
    ]
];

$response = $ghl->opportunities->updateOpportunity('<ID>', $body);
echo json_encode($response, JSON_PRETTY_PRINT);
```

## Code Examples

**cURL**

```bash
curl -L -X PUT 'https://services.leadconnectorhq.com/opportunities/<id>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "pipelineId": "bCkKGpDsyPP4peuKowkG",
  "name": "First Opps",
  "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
  "status": "open",
  "monetaryValue": 220,
  "forecastExpectedCloseDate": "2026-04-23",
  "forecastProbability": 20,
  "assignedTo": "082goXVW3lIExEQPOnd3",
  "customFields": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "fieldValue": "9039160788"
    }
  ]
}'
```

**Node.js**

```javascript
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "pipelineId": "bCkKGpDsyPP4peuKowkG",
      "name": "First Opps",
      "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
      "status": "open",
      "monetaryValue": 220,
      "forecastExpectedCloseDate": "2026-04-23",
      "forecastProbability": 20,
      "assignedTo": "082goXVW3lIExEQPOnd3",
      "customFields": [
        {
          "id": "6dvNaf7VhkQ9snc5vnjJ",
          "fieldValue": "9039160788"
        }
      ]
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/opportunities/<id>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/opportunities/{id}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "pipelineId": "bCkKGpDsyPP4peuKowkG",
    "name": "First Opps",
    "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
    "status": "open",
    "monetaryValue": 220,
    "forecastExpectedCloseDate": "2026-04-23",
    "forecastProbability": 20,
    "assignedTo": "082goXVW3lIExEQPOnd3",
    "customFields": [
        {
            "id": "6dvNaf7VhkQ9snc5vnjJ",
            "fieldValue": "9039160788"
        }
    ]
}

response = requests.put(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/opportunities/<id>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "pipelineId": "bCkKGpDsyPP4peuKowkG",
  "name": "First Opps",
  "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
  "status": "open",
  "monetaryValue": 220,
  "forecastExpectedCloseDate": "2026-04-23",
  "forecastProbability": 20,
  "assignedTo": "082goXVW3lIExEQPOnd3",
  "customFields": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "fieldValue": "9039160788"
    }
  ]
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .put("https://services.leadconnectorhq.com/opportunities/<id>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"pipelineId\":\"bCkKGpDsyPP4peuKowkG\",\"name\":\"First Opps\",\"pipelineStageId\":\"7915dedc-8f18-44d5-8bc3-77c04e994a10\",\"status\":\"open\",\"monetaryValue\":220,\"forecastExpectedCloseDate\":\"2026-04-23\",\"forecastProbability\":20,\"assignedTo\":\"082goXVW3lIExEQPOnd3\",\"customFields\":[{\"id\":\"6dvNaf7VhkQ9snc5vnjJ\",\"fieldValue\":\"9039160788\"}]}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/opportunities/<id>"
  payload := strings.NewReader(`{
  "pipelineId": "bCkKGpDsyPP4peuKowkG",
  "name": "First Opps",
  "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
  "status": "open",
  "monetaryValue": 220,
  "forecastExpectedCloseDate": "2026-04-23",
  "forecastProbability": 20,
  "assignedTo": "082goXVW3lIExEQPOnd3",
  "customFields": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "fieldValue": "9039160788"
    }
  ]
}`)
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/opportunities/<id>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "pipelineId": "bCkKGpDsyPP4peuKowkG",
  "name": "First Opps",
  "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
  "status": "open",
  "monetaryValue": 220,
  "forecastExpectedCloseDate": "2026-04-23",
  "forecastProbability": 20,
  "assignedTo": "082goXVW3lIExEQPOnd3",
  "customFields": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "fieldValue": "9039160788"
    }
  ]
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "pipelineId": "bCkKGpDsyPP4peuKowkG",
  "name": "First Opps",
  "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
  "status": "open",
  "monetaryValue": 220,
  "forecastExpectedCloseDate": "2026-04-23",
  "forecastProbability": 20,
  "assignedTo": "082goXVW3lIExEQPOnd3",
  "customFields": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "fieldValue": "9039160788"
    }
  ]
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/opportunities/<id>' -Method 'PUT' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
