Skip to content

Update an Opportunity

PUT https://api.copper.com/developer_api/v1/opportunities/{{example_opportunity_id}}

Note that this endpoint is eligible to return computed custom field values, click here for more information.

Updates are only applied to fields explicitly specified in the request body. For example, if an update request is made with an empty body, no updates will be made. To remove the value from a field, the request body must specify the target field value as 'null'.

Connect fields

If your integration reads a record and sends it back as an update, be careful with connect fields. They appear in custom_fields as [] on read, so sending that back deletes their connections. Send only the fields you're changing, and add or remove connections through the connect field endpoints. See Updating records that have connect fields.

Request body

{
  "details":"This is an update"
}

Example Requests

Update Opportunity

curl --location --request PUT "https://api.copper.com/developer_api/v1/opportunities/{{example_opportunity_id}}" \
  --header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
  --header "X-PW-Application: developer_api" \
  --header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
  --header "Content-Type: application/json" \
  --data "{
  \"details\":\"This is an update\"
}"
{
  "id": 2827698,
  "name": "8 New Copy Machines (sample)",
  "assignee_id": null,
  "close_date": "1/23/2017",
  "company_id": 9607580,
  "company_name": "Dunder Mifflin (sample)",
  "customer_source_id": 331241,
  "details": "This is an update",
  "loss_reason_id": null,
  "pipeline_id": 213214,
  "pipeline_is_revenue": false,
  "pipeline_stage_id": 987790,
  "pipeline_type": "opportunity",
  "primary_contact_id": null,
  "priority": "None",
  "status": "Open",
  "tags": [],
  "interaction_count": 0,
  "monetary_value": 250000,
  "win_probability": 5,
  "date_created": 1483988829,
  "date_modified": 1496776255,
  "custom_fields": [
    {
      "custom_field_definition_id": 100764,
      "value": null
    },
    {
      "custom_field_definition_id": 103481,
      "value": null
    }
  ]
}