# Change any part of a client; fields left out stay as they are

`PATCH /org/{orgId}/clients/{id}` · Rivier · workspace

Change any part of a client; fields left out stay as they are.

- Scope: workspace:write
- Mcp: rivier_clients_update
- Graphql: Mutation.workspaceOrgClientUpdate
- Sdk: workspace.orgClient.update
- Cli: clients update

## Parameters

- `orgId` (path, required), string
- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "legalName": {
      "type": "string",
      "maxLength": 200,
      "default": ""
    },
    "email": {
      "anyOf": [
        {
          "type": "string",
          "format": "email",
          "maxLength": 254
        },
        {
          "type": "string",
          "const": ""
        }
      ],
      "default": ""
    },
    "phone": {
      "type": "string",
      "maxLength": 60,
      "default": ""
    },
    "address": {
      "type": "string",
      "maxLength": 1000,
      "default": ""
    },
    "country": {
      "type": "string",
      "maxLength": 2,
      "pattern": "^([A-Za-z]{2})?$",
      "default": ""
    },
    "taxId": {
      "type": "string",
      "maxLength": 60,
      "default": ""
    },
    "registration": {
      "type": "string",
      "maxLength": 60,
      "default": ""
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[a-z]{3}$"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "language": {
      "type": "string",
      "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
      "maxLength": 20,
      "default": "en"
    },
    "paymentDays": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 365
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "notes": {
      "type": "string",
      "maxLength": 4000,
      "default": ""
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 20,
      "default": []
    },
    "projectId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PATCH 'https://api.rivier.ai/org/{orgId}/clients/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "legalName": "",
  "email": "",
  "phone": "",
  "address": "",
  "country": "",
  "taxId": "",
  "registration": ""
}'
```
