Update a Company¶
PUT https://api.copper.com/developer_api/v1/companies/{{example_company_id}}
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 Company¶
curl --location --request PUT "https://api.copper.com/developer_api/v1/companies/{{example_company_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": 9607580,
"name": "Dunder Mifflin (sample)",
"address": {
"street": "213 West Main Street",
"city": "Scranton",
"state": "PA",
"postal_code": "18501",
"country": ""
},
"assignee_id": null,
"contact_type_id": null,
"details": "This is an update",
"email_domain": "dundermifflin.com",
"phone_numbers": [
{
"number": "4153554776",
"category": "work"
}
],
"primary_contact_id": 27140359,
"socials": [],
"tags": [],
"websites": [
{
"url": "http://www.dundermifflin.com/index.shtml",
"category": "work"
},
{
"url": "https://www.nbcstore.com/shop-by-show/the-office.html?shop_by_theme=7",
"category": "work"
},
{
"url": "http://dundermifflin.com",
"category": "work"
}
],
"custom_fields": [
{
"custom_field_definition_id": 100764,
"value": null
},
{
"custom_field_definition_id": 103481,
"value": null
}
],
"interaction_count": 0,
"date_created": 1483988828,
"date_modified": 1496708712
}