Cost CentersCreate Cost Center

Create Cost Center

Creates a new cost center for the authenticated company.

Rules:

  • The name field is required and cannot be empty.
  • Two cost centers with the same name cannot exist for the same company.

After creating the cost center, use the returned id as costCenterId in PATCH /statements/v1/credit-card/{transactionId} to classify expenses.

curl -X POST "https://api-sandbox.contasimples.com/cost-centers/v1/cost-centers" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "Marketing"
}'
{
  "id": "fdafbfa7-5eeb-4d96-84aa-82b7c2e1b0ff",
  "companyId": "7c61b3f6-7353-46aa-80ef-3e27d95150ab",
  "name": "Marketing"
}
POST
/cost-centers/v1/cost-centers
POST
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}
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Required

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}

Body

application/json
namestring
Required

Cost center name. Must be unique per company.

Example:
Marketing

Responses