---
title: "Rename a workspace, or set its cost center label."
method: PATCH
path: "/v1/organizations/current/workspaces/{workspaceId}"
tags: ["organizations"]
---

# Rename a workspace, or set its cost center label.

`PATCH /v1/organizations/current/workspaces/{workspaceId}`

## Request

- Base URL: `https://api.50heads.com`
- URL: `https://api.50heads.com/v1/organizations/current/workspaces/{workspaceId}`
- Auth: HTTP bearer

Organization admins only (403 `organization_admin_required`), on a browser session with a fresh proof in the `x-50h-reauth` header (401 `reauth_required`). It needs a person: API keys, connected apps and service accounts get 403 `session_required`. Every change is written to the organization's audit. `costCenter` null removes the label. The label is printed on the workspace's invoices from then on and carried on spend reports and exports. A closed workspace cannot change (409 `workspace_closed`).

## Path parameters

- `workspaceId` string, required

## Request body

- OrganizationWorkspaceUpdateRequest
  - `name` string
  - `costCenter` string, nullable

## Response `200`

OK

- OrganizationWorkspaceUpdateResponse
  - `workspace` object, required
    - `id` string, required
    - `name` string, required
    - `ownerId` string, required
    - `ownerName` string, nullable, required
    - `ownerEmail` string, nullable, required
    - `members` integer, required
    - `pendingInvitations` integer, required
    - `costCenter` string, nullable, required
    - `isDefault` boolean, required
    - `createdAt` string, required
    - `closedAt` string, nullable, required

## Other responses

- `400`: The request is not valid; `error.details.validation` lists the fixes.
- `401`: No key or token, or it expired or was revoked.
- `403`: The key or token lacks the scope (`insufficient_scope`), or the action is not allowed.
- `404`: No such question, endpoint or delivery on this account.
- `429`: Too many requests; wait for Retry-After.

---

[API](https://skmtc.dev/50heads/apis/50heads-api.md) · [All operations](https://skmtc.dev/50heads/apis/50heads-api/llms.txt) · [OpenAPI document](https://skmtc.dev/50heads/apis/50heads-api/revisions/20175e8b00e3?raw)
