---
title: "Create cost center"
method: POST
path: "/cost_centers"
tags: ["Cost centers"]
---

# Create cost center

`POST /cost_centers`

## Request

- Base URL: `https://api.perk.com`
- URL: `https://api.perk.com/cost_centers`
- Auth: none declared. Required headers: `Authorization`

Creates a cost center with the specified name. You can optionally set an approver, delegate, delegate expiry date, additional approvers (owner_ids), and cost object type (`type`) when that feature is enabled for your organization.

## Headers

- `Authorization` string, required

## Request body

- object
  - `name` string, required: The name of the cost center
  - `type` string, nullable: Available only when cost object types are enabled for your organization on request, is ignored when the feature is not enabled. Cost object type name to assign on create. Non-empty string (max 256 characters). Omit or null leaves the type unset. If a type with that name already exists (case-insensitive), it is assigned; otherwise it is created. Cannot be set on Yokoy-sourced cost centers.
  - `approver_id` integer: The ID of the user to set as approver. The user must belong to one of the account's companies
  - `delegate_id` integer: The ID of the user to set as delegate. The delegate must belong to one of the account's companies
  - `delegate_expiry` string: The expiry date for the delegate in YYYY-MM-DD format
  - `erp_code` string: Identifier used to associate this cost center with a corresponding record in an external ERP system
  - `company_ids` integer[]: IDs of companies this cost center is scoped to. Must be provided together with 'all_companies'. When 'all_companies' is true, company scope is set to all companies in the account.
  - `all_companies` boolean: Whether the cost center applies to all companies in the account. Must be provided together with 'company_ids'. When true, 'company_ids' is ignored and the cost center is scoped to all companies in the account. Defaults to true when neither field is provided.
  - `owner_ids` integer[]: IDs of additional travel approvers to set on create. Users must belong to an allowed company for the cost center and must not duplicate approver_id

## Response `200`

Returns '200 OK' and the newly created cost center resource.

- object
  - `id` string: The unique ID of the cost center
  - `name` string: The name of the cost center
  - `type` string, nullable: Cost object type name, or null if unset. Available only when cost object types are enabled for your organization on request. Omitted from the response when the feature is not enabled.
  - `archived` boolean: Indicates whether the cost center is archived
  - `approver_id` integer: The ID of the approver user, or 'null' if not set
  - `approver` object: Approver user details, or 'null' if not set
    - `id` integer: The unique ID of the approver
    - `first_name` string: The approver's first name
    - `last_name` string: The approver's last name
    - `email` string: The approver's email address
  - `delegate_id` integer: The ID of the delegate user, or 'null' if not set
  - `delegate` object: Delegate user details, or 'null' if not set
    - `id` integer: The unique ID of the delegate
    - `first_name` string: The delegate's first name
    - `last_name` string: The delegate's last name
    - `email` string: The delegate's email address
  - `delegate_expiry` string: The expiry date for the delegate in YYYY-MM-DD format, or 'null' if not set
  - `users` object[]: The users assigned to this cost center
  - `count_users` integer: The number of users assigned to this cost center
  - `erp_code` string: Identifier used to associate this cost center with a corresponding record in an external ERP system
  - `all_companies` boolean: If 'true', the cost center applies to all companies in the account
  - `companies` integer[]: The IDs of companies assigned to this cost center
  - `owner_ids` integer[]: IDs of additional travel approvers
  - `owners` object[]: Additional travel approver user details (id, first_name, last_name, email)
    - `id` integer: The unique ID of the additional approver
    - `first_name` string: The additional approver's first name
    - `last_name` string: The additional approver's last name
    - `email` string: The additional approver's email address

## Other responses

- `400`: Returns '400 Bad Request' when the request body is invalid (for example missing name, invalid owner_ids, blank/overlong `type`, or setting `type` on a Yokoy-sourced cost center).

---

[API](https://skmtc.dev/perk/apis/cost-centers-api.md) - [All operations](https://skmtc.dev/perk/apis/cost-centers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/perk/apis/cost-centers-api/revisions/5b6beec99973?raw)
