# Update a company — API reference

> Updates the Company name, settings or slug, with optional slug regeneration from the new name.

Source: https://upfour.io/docs/api/organization/update-a-company

[Developers](https://upfour.io/docs/api.md)/[Organization](https://upfour.io/docs/api/organization.md)

Updates the Company name, settings or slug, with optional slug regeneration from the new name.

PUT https://app.upfour.io/v1/organization

scope organization.write stable returns 200

## Body

`application/json` required 4 fields

All other fields4 fields

namestring

Empty keeps the current name.

settingsobjectfree-form keys

Replaces the whole settings object; omitted leaves it unchanged. Checked keys: timezone (IANA name), date_format (day_month_year, month_day_year or iso), default_language (en or de) and incident_screenshots_default (boolean). default_language, incident_screenshots_default and the audit drain keep their stored value when not sent; the report identity is only changed through /organization/report-branding.

slugstring

Empty keeps the current slug. A new slug has to derive from the Company name or from a verified domain of the Company.

slug_from_nameboolean

Lets a slug that was generated from the old name follow the new name. Ignored when slug is sent.

## Returns

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

Response fields 1 top-level fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | Organization | |
| Organization · 8 fields FieldTypeDescription `created_at` string (date-time) `id` uuid `name` string `owner_id` uuid `settings` object  · nullable free-form keys Company settings, for example timezone, date_format (day_month_year, month_day_year or iso), default_language (en or de) and incident_screenshots_default. The audit drain secret is never returned. `slug` string `updated_at` string (date-time) `deleted_at` string (date-time) | | |

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

[PreviousCreate a company](https://upfour.io/docs/api/organization/create-a-company.md) [NextDelete a company](https://upfour.io/docs/api/organization/delete-a-company.md)

## Request

### cURL

```bash
curl -s -X PUT "https://app.upfour.io/v1/organization" \
  -H "Authorization: Bearer $UP4_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme GmbH"
  }'
```

### JavaScript

```javascript
const res = await fetch("https://app.upfour.io/v1/organization", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UP4_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Acme GmbH",
  }),
});
console.log(res.status, await res.json());
```

### Python

```python
import os
import requests

res = requests.put(
    "https://app.upfour.io/v1/organization",
    headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
    json={
        "name": "Acme GmbH",
    },
)
print(res.status_code, res.json())
```

### Go

```go
package main

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

func main() {
	payload := strings.NewReader(`{
  "name": "Acme GmbH"
}`)
	req, _ := http.NewRequest("PUT", "https://app.upfour.io/v1/organization", 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'
{
  "name": "Acme GmbH"
}
JSON;

$ch = curl_init("https://app.upfour.io/v1/organization");
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": {
    "created_at": "2026-10-27T09:00:00Z",
    "id": "00000000-0000-4000-8000-000000000001",
    "name": "Acme GmbH",
    "owner_id": "00000000-0000-4000-8000-000000000002",
    "settings": {
      "allow_ai_features": true
    },
    "slug": "acme-gmbh",
    "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_…"
  }
}
```
