# Update a client — API reference

> Updates a Client's name, portal access, branding, language, timezone, or slug.

Source: https://upfour.io/docs/api/clients/update-a-client

[Developers](https://upfour.io/docs/api.md)/[Clients (agency mode)](https://upfour.io/docs/api/clients.md)

Updates a Client's name, portal access, branding, language, timezone, or slug.

PUT https://app.upfour.io/v1/clients/{clientID}

scope client.write stable returns 200

## Parameters

| Field | Type | Description |
| --- | --- | --- |
| `clientID` required | uuid | path parameter |

## Body

`application/json` required 8 fields

namestring (required)

In the app: **Client name**

All other fields11 fields

allow_loginboolean

Lets the client's own staff sign in to the client portal. The update replaces all fields: an omitted value turns it off.

In the app: **Let this client sign in**

contact_emailstring

languagestring · nullable

The language of mails and documents for this client; null or empty inherits the company default. The update replaces all fields: an omitted language resets it to inherit.

ende

In the app: **Communication language**

logoClientLogo · nullable

Logo images. Omitted keeps the stored logo.

Nested fields 4 fields

| Field | Type | Description |
| --- | --- | --- |
| `background` optional | string one of`light` `dark` `transparent` | The background the logo is made for. |
| `dark` optional | string | Same as standard, for dark backgrounds. Needs a standard logo. |
| `icon` optional | string | Same as standard, for compact places. Needs a standard logo. |
| `standard` optional | string | Request: a PNG as data:image/png;base64,... of at most 192 KiB, or the value the client already has to keep that image; empty removes it. Response: the path of the stored image. |

logo_urlstring

A hosted logo, http:// or https://. Saving a standard logo clears it.

slugstring

Lowercase letters, digits and hyphens; derived from the name when empty.

timezonestring

IANA timezone name; empty resets it to UTC.

## Returns

A successful request returns `200` with application/json.

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | Client | |
| Client · 20 fields FieldTypeDescription `allow_login` boolean `contact_email` string `created_at` string (date-time) `id` uuid `language` string  · nullable one of`en` `de` `logo` StoredClientLogo StoredClientLogo · 4 fields FieldTypeDescription `background` string one of`light` `dark` `transparent` The background the logo is made for. `dark` string Same as standard, for dark backgrounds. Needs a standard logo. `icon` string Same as standard, for compact places. Needs a standard logo. `standard` string Request: a PNG as data:image/png;base64,... of at most 192 KiB, or the value the client already has to keep that image; empty removes it. Response: the path of the stored image. `logo_url` string A hosted logo; empty once a standard logo is stored. `name` string `organization_id` uuid `slug` string `timezone` string `updated_at` string (date-time) `archived_at` string (date-time) Set while the client is archived. `effective_language` string one of`en` `de` Only in the answer for one client: the language the client actually gets, its own or the company default. `monitor_count` integer Only in lists, omitted when zero. `open_incidents` integer Only in lists, omitted when zero. | | |

## Errors

Only the errors this operation can return. Every error uses the [same envelope](https://upfour.io/docs/api/responses.md).

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | [bad_request](https://upfour.io/docs/api/errors#code-bad_request) | The request is malformed or fails validation. |
| 400 | [file_empty](https://upfour.io/docs/api/errors#code-file_empty) | The uploaded logo file is empty. **When:** Uploading a logo or image with no content. **Fix:** Upload a file that has content. Stable codes next to the English message when a logo is refused: `file_empty`, `file_type_unsupported` (`error.details.formats` lists the accepted ones), `image_invalid` (damaged or unreadable), `image_dimensions_too_large` (`error.details.max_pixels`), `svg_unsafe`. |
| 413 | [file_too_large](https://upfour.io/docs/api/errors#code-file_too_large) | The logo file exceeds its size limit; `error.details.max_bytes` gives the limit. **When:** Uploading a logo or image larger than details.max_bytes. **Fix:** Reduce the file size and upload again. `file_too_large`: the file is over its limit (`error.details.max_bytes`). A proxy in front of the API may answer 413 with a plain HTML body and no code. |
| 400 | [file_type_unsupported](https://upfour.io/docs/api/errors#code-file_type_unsupported) | The uploaded logo file type is unsupported; `error.details.formats` lists accepted formats. **When:** Uploading a file whose type is not one of the formats the operation accepts; details.formats lists them. **Fix:** Upload a file in one of details.formats. |
| 400 | [image_dimensions_too_large](https://upfour.io/docs/api/errors#code-image_dimensions_too_large) | The logo image exceeds the allowed dimensions; `error.details.max_pixels` gives the limit. **When:** Uploading an image with more pixels than details.max_pixels. **Fix:** Scale the image down and upload it again. |
| 400 | [image_invalid](https://upfour.io/docs/api/errors#code-image_invalid) | The uploaded logo image is damaged or unreadable. **When:** Uploading a file with an image type that cannot be decoded. **Fix:** Export the image again and upload the new file. |
| 400 | [logo_fetch_failed](https://upfour.io/docs/api/errors#code-logo_fetch_failed) | The logo could not be fetched from the address given. **When:** Importing a client logo from a URL that cannot be reached or that does not return an acceptable image. **Fix:** Check the URL, or upload the logo file instead. |
| 404 | [not_found](https://upfour.io/docs/api/errors#code-not_found) | The requested resource does not exist or is outside the caller's scope. |
| 403 | [permission_denied](https://upfour.io/docs/api/errors#code-permission_denied) | The credentials do not permit this action. |
| 400 | [svg_unsafe](https://upfour.io/docs/api/errors#code-svg_unsafe) | The SVG logo contains unsafe content. **When:** Uploading an SVG that contains a script, a foreignObject, a javascript: URL, an event-handler attribute or an external href. **Fix:** Remove those parts from the SVG, or upload a PNG or JPEG. |
| 400 | [upload_invalid](https://upfour.io/docs/api/errors#code-upload_invalid) | The upload could not be read as a multipart form. **When:** A body that is not a valid multipart form, or whose file cannot be parsed. **Fix:** Send a well-formed multipart/form-data request. |
| 400 | [upload_no_file](https://upfour.io/docs/api/errors#code-upload_no_file) | The multipart request has no file part. **When:** An upload request without a file field. **Fix:** Send the file as multipart/form-data in the field the operation names. |

Every call can also return `unauthorized` (401), `rate_limit_exceeded` (429) or `internal_error` (500 / 502). See [Responses and errors](https://upfour.io/docs/api/responses.md).

[PreviousGet a client](https://upfour.io/docs/api/clients/get-a-client.md) [NextImport a client logo](https://upfour.io/docs/api/clients/import-a-client-logo.md)

## Request

### cURL

```bash
curl -s -X PUT "https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001" \
  -H "Authorization: Bearer $UP4_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_email": "anna@example.com",
    "language": "en",
    "name": "Globex Corporation",
    "slug": "globex",
    "timezone": "Europe/Berlin"
  }'
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    contact_email: "anna@example.com",
    language: "en",
    name: "Globex Corporation",
    slug: "globex",
    timezone: "Europe/Berlin",
  }),
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.put(
    "https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
    json={
        "contact_email": "anna@example.com",
        "language": "en",
        "name": "Globex Corporation",
        "slug": "globex",
        "timezone": "Europe/Berlin",
    },
)
print(res.status_code, res.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	payload := strings.NewReader(`{
  "contact_email": "anna@example.com",
  "language": "en",
  "name": "Globex Corporation",
  "slug": "globex",
  "timezone": "Europe/Berlin"
}`)
	req, _ := http.NewRequest("PUT", "https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001", payload)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(out))
}
```

### PHP

```php
<?php
$payload = <<<'JSON'
{
  "contact_email": "anna@example.com",
  "language": "en",
  "name": "Globex Corporation",
  "slug": "globex",
  "timezone": "Europe/Berlin"
}
JSON;

$ch = curl_init("https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("UP4_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
```

## Response

### 200

```json
{
  "data": {
    "allow_login": false,
    "contact_email": "anna@example.com",
    "created_at": "2026-10-27T09:00:00Z",
    "effective_language": "en",
    "id": "00000000-0000-4000-8000-000000000001",
    "language": "en",
    "logo": {
      "background": "light",
      "dark": "",
      "icon": "",
      "standard": ""
    },
    "logo_url": "",
    "name": "Globex Corporation",
    "organization_id": "00000000-0000-4000-8000-000000000002",
    "slug": "globex",
    "timezone": "Europe/Berlin",
    "updated_at": "2026-10-27T09:00:00Z"
  }
}
```

### 400

```json
{
  "error": {
    "code": "bad_request",
    "message": "The request is malformed or fails validation.",
    "request_id": "req_…"
  }
}
```

### 403

```json
{
  "error": {
    "code": "permission_denied",
    "message": "The credentials do not permit this action.",
    "request_id": "req_…"
  }
}
```

### 404

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource does not exist or is outside the caller's scope.",
    "request_id": "req_…"
  }
}
```

### 413

```json
{
  "error": {
    "code": "file_too_large",
    "message": "The logo file exceeds its size limit; error.details.max_bytes gives the limit.",
    "request_id": "req_…"
  }
}
```
