Skip to content

Update Client

This endpoint updates an existing client by ID.

PUT /v1/clients/clients/:id

Include your API key in the x-api-key header. See Authentication.

clients:write
ParameterTypeRequiredDescription
idstringYesClient ID to update.

Send only the fields you want to change. Omitted fields keep their current values. The server does not validate the request body against a schema, so a value of the wrong type is not rejected with 400.

FieldTypeRequiredDescription
namestringNoNew client name. null is rejected by the database and returns 500.
descriptionstring | nullNoNew client description. Send null to clear it.
isArchivedbooleanNoNew archive state.
customFieldsRecord<string, string>NoReplaces the entire custom fields object. Send {} to remove all custom fields. Values are not validated, so send strings.
{
"description": "Updated description",
"customFields": {
"region": "west"
}
}
Terminal window
curl -X PUT "https://api.crewsum.com/v1/clients/clients/client-ghi123jkl4567890" \
-H "x-api-key: $CREWSUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Updated description",
"customFields": {
"region": "west"
}
}'

On success, the API returns HTTP 200 OK. The response has no data field.

{
"message": "Successfully updated client: client-ghi123jkl4567890"
}
  • Every successful update sets updatedAt to the current time.
  • Archiving a client does not archive its projects, contacts, or end customers.
  • The API does not check that the client exists. An unknown ID returns 200 with the success message, nothing is changed, and no webhook is sent.
  • After the client is updated, Crewsum attempts to send the clients.updated webhook event. A webhook failure does not change the response.
StatusMeaning
400{"message": "ClientID missing"}. The ID path segment is empty.
500{"message": "Error updating client: <id>"}. Crewsum could not update the client, for example because name is null.
500The request has no JSON body. The response uses the standard server error shape.

Authentication and scope failures are described in Errors.