---
title: "Change client"
method: PUT
path: "/workspaces/{workspace_id}/clients/{client_id}"
tags: ["clients"]
---

# Change client

`PUT /workspaces/{workspace_id}/clients/{client_id}`

## Request

- Base URL: `https://localhost:8080/api/v9`
- URL: `https://localhost:8080/api/v9/workspaces/{workspace_id}/clients/{client_id}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/toggl/apis/toggl-api/docs/workspaces/:workspace_id/clients/:client_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update workspace client.

Note: use /workspaces/{workspace_id}/clients/{client_id}/archive to archive the client and /workspaces/{workspace_id}/clients/{client_id}/restore to restore it.

## Path parameters

- `workspace_id` integer, required
- `client_id` integer, required

## Request body

- ClientPayload
  - `name` string: Client name
  - `wid` integer: Workspace ID

## Response `200`

Successful operation.

- ModelsClient
  - `archived` boolean: IsArchived is true if the client is archived
  - `at` string: When was the last update
  - `creator_id` integer: CreatorID is the ID of the user who created the client
  - `guid` string: GUID is a unique identifier for the client
  - `id` integer: Client ID
  - `name` string: Name of the client
  - `permissions` string: List of authorization permissions for this client.
  - `server_deleted_at` string: When was deleted, null if not deleted
  - `wid` integer: Workspace ID

## Other responses

- `400`: Possible error messages: * Client name maximum length is {max\_client\_length} * Client name cannot be empty
- `403`: Forbidden
- `404`: Client doesn't exist in the workspace.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/toggl/apis/toggl-api.md) - [All operations](https://skmtc.dev/toggl/apis/toggl-api/llms.txt) - [OpenAPI document](https://skmtc.dev/toggl/apis/toggl-api/revisions/3085aee16990?raw)
