---
title: "Update the current organization"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update the current organization

Path: CloudRaker Workspace API › Organization Settings

`PATCH /organization`

Updates the organization name or assistant default name. Send assistantName:null to clear the default. The slug (tenant key) is immutable. Authorization: organization administrators only. Returns 400 on an invalid body or 404 if the organization cannot be resolved.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `name` (`updateOrganization.name`; string, optional)
  - minLength 1; example `"Acme Inc"`
- `assistantName` (`updateOrganization.assistantName`; string, optional, nullable)
  - minLength 1; maxLength 80

## Example request

```json
{
  "name": "Acme Inc",
  "assistantName": "string"
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url https://api.cloudraker.com/organization \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Acme Inc",
  "assistantName": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/organization';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({name: 'Acme Inc', assistantName: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/organization"

payload = {
    "name": "Acme Inc",
    "assistantName": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The renamed organization.

#### Example

```json
{
  "organization": {
    "id": "org_01H…",
    "name": "Acme Inc",
    "assistantName": "string",
    "slug": "acme",
    "domains": [
      "acme.com"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
```

- `organization` (`updateOrganization.response.200.organization`; object, required)
  - `id` (`updateOrganization.response.200.organization.id`; string, required)
    - example `"org_01H…"`
  - `name` (`updateOrganization.response.200.organization.name`; string, required)
    - example `"Acme Inc"`
  - `assistantName` (`updateOrganization.response.200.organization.assistantName`; any of, required)
    - any of: `string`, `null`
  - `slug` (`updateOrganization.response.200.organization.slug`; string | null, required) — Tenant key. Immutable — `PATCH /organization` only renames.
    - example `"acme"`
  - `domains` (`updateOrganization.response.200.organization.domains`; array<string>, required)
    - example `["acme.com"]`
  - `createdAt` (`updateOrganization.response.200.organization.createdAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `updatedAt` (`updateOrganization.response.200.organization.updatedAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`


Source: https://docs.cloudraker.com/workspace/api/organization-settings/update-organization/index.md
