# Update client portal settings — API reference

> Updates a Client's portal preset, incident visibility, report visibility and export setting.

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

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

Updates a Client's portal preset, incident visibility, report visibility and export setting.

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

scope client.write stable returns 200

## Parameters

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

## Body

The 3 fields most calls use come first; the rest are grouped below.

`application/json` required 10 fields

presetstring

compact and transparent set all switches themselves and ignore the ones sent; custom takes them as sent. Empty means compact.

compacttransparentcustom

In the app: **Portal view**

show_reportsboolean

The report views. With preset custom and this off, the report switches below are stored off.

In the app: **Reports**

allow_report_exportboolean

In the app: **Report downloads**

Incident visibility1 fields

show_incidentsboolean

In the app: **Incidents**

Report visibility4 fields

show_report_downtimeboolean

In the app: **Downtime evidence**

show_report_incidentsboolean

In the app: **Incident analytics**

show_report_response_timeboolean

In the app: **Response time**

show_report_slaboolean

In the app: **Service levels**

Request metadata2 fields

client_iduuid

Taken from the path on update.

updated_atstring (date-time)

Ignored on update.

## Returns

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

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | ClientPortalSettingsResponse | |
| ClientPortalSettingsResponse · 10 fields FieldTypeDescription `allow_report_export` boolean `client_id` uuid Taken from the path on update. `preset` string one of`compact` `transparent` `custom` compact and transparent set all switches themselves and ignore the ones sent; custom takes them as sent. Empty means compact. `show_incidents` boolean `show_report_downtime` boolean `show_report_incidents` boolean `show_report_response_time` boolean `show_report_sla` boolean `show_reports` boolean The report views. With preset custom and this off, the report switches below are stored off. `updated_at` string (date-time) Ignored on update. | | |

## 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. |
| 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. |

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 client portal settings](https://upfour.io/docs/api/clients/get-client-portal-settings.md) [NextList client teams](https://upfour.io/docs/api/clients/list-client-teams.md)

## Request

### cURL

```bash
curl -s -X PUT "https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001/portal-settings" \
  -H "Authorization: Bearer $UP4_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "allow_report_export": false,
    "preset": "compact",
    "show_incidents": true,
    "show_report_sla": true,
    "show_reports": true
  }'
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001/portal-settings", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    allow_report_export: false,
    preset: "compact",
    show_incidents: true,
    show_report_sla: true,
    show_reports: true,
  }),
});
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/portal-settings",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
    json={
        "allow_report_export": False,
        "preset": "compact",
        "show_incidents": True,
        "show_report_sla": True,
        "show_reports": True,
    },
)
print(res.status_code, res.json())
```

### Go

```go
package main

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

func main() {
	payload := strings.NewReader(`{
  "allow_report_export": false,
  "preset": "compact",
  "show_incidents": true,
  "show_report_sla": true,
  "show_reports": true
}`)
	req, _ := http.NewRequest("PUT", "https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001/portal-settings", 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'
{
  "allow_report_export": false,
  "preset": "compact",
  "show_incidents": true,
  "show_report_sla": true,
  "show_reports": true
}
JSON;

$ch = curl_init("https://app.upfour.io/v1/clients/00000000-0000-4000-8000-000000000001/portal-settings");
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_report_export": false,
    "client_id": "00000000-0000-4000-8000-000000000001",
    "preset": "compact",
    "show_incidents": false,
    "show_report_downtime": false,
    "show_report_incidents": false,
    "show_report_response_time": true,
    "show_report_sla": true,
    "show_reports": true,
    "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_…"
  }
}
```
