Update Organization
Updates an organization with the given ID. This is a complete update, meaning that all fields must be provided, even if they are meant to be unchanged. Otherwise, all missing fields will be removed from the organization.
Example of update without specifying some fields
Organization Before Update
{
"id": "10",
"name": "Tech Solutions Inc",
"website": "www.techsolutions.com",
"description": "A leading technology solutions provider",
"location": "US",
"logoUrl": "https://example.com/logo.png",
"note": "VIP client - handle with priority",
"domains": ["techsolutions.com", "tech-solutions.org"],
"phones": ["+1-555-0123", "+1-555-0124"],
"brandColor": "#0066CC"
}
Update Request (Only some fields provided)
{
"name": "Tech Solutions International",
"website": "www.techsolutions-intl.com",
"domains": [
"techsolutions.com"
]
}
Organization After Update
{
"id": "10",
"name": "Tech Solutions International",
"website": "www.techsolutions-intl.com",
"description": null,
"location": null,
"logoUrl": "https://example.com/logo.png",
"note": null,
"domains": ["techsolutions.com"],
"phones": [],
"brandColor": null
}
Notice how:
name
andwebsite
were updated with the new valuesdescription
,location
,note
, andbrandColor
were cleared (set tonull
)domains
was replaced by a new array (now only the first domain is present)phones
array was cleared (set to an empty array)logoUrl
andid
remain unchanged as they are not part of the update request
Request
PUT /v2/organizations/10 HTTP/1.1
Authorization: Bearer oauth_token
Content-Type: application/json
{
"name" : "Updated Company Name",
"website" : "www.updated-example.com",
"description" : "Updated Description",
"location" : "CA",
"brandColor" : "#FF0000",
"note" : "Updated Note",
"phones" : [ "+1 555 1234", "+1 555 5678" ],
"domains" : [ "one.com", "two.com" ]
}
Response
HTTP/1.1 204 No Content