Cost CentersUpdate Cost Center

Update Cost Center

Updates the name of an existing cost center. Use this endpoint to fix typos or reflect an internal reorganization — for example, renaming "Marketing" to "Digital Marketing".

Rules:

  • The name field is required and cannot be empty.
  • Cannot update to a name already used by another cost center in the company.
  • Returns 404 if the cost center is not found.
curl -X PATCH "https://api-sandbox.contasimples.com/cost-centers/v1/cost-centers/fdafbfa7-5eeb-4d96-84aa-82b7c2e1b0ff" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "Updated Marketing"
}'
{
  "id": "fdafbfa7-5eeb-4d96-84aa-82b7c2e1b0ff",
  "companyId": "7c61b3f6-7353-46aa-80ef-3e27d95150ab",
  "name": "Updated Marketing"
}
PATCH
/cost-centers/v1/cost-centers/{id}
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}

Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}
path
idstring
Required

Unique identifier (UUID) of the cost center.

Format: uuid
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Required

New cost center name. Must be unique per company.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}

Path Parameters

idstring
Required

Unique identifier (UUID) of the cost center.

Example:
fdafbfa7-5eeb-4d96-84aa-82b7c2e1b0ff

Body

application/json
namestring
Required

New cost center name. Must be unique per company.

Example:
Updated Marketing

Responses

idstring
Required

Unique identifier of the cost center.

companyIdstring
Required

Identifier of the company that owns the cost center.

namestring
Required

Name of the cost center.