---
title: "updateOrgGroup"
---

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

# updateOrgGroup

Path: Forge API › groups

`PATCH /orgs/{org_id}/groups/{group_id}`

Rename a group, change whether it is the org's default group, or both. {"name": name} renames it, which takes manageGroups on the org. {"is_default": true} makes it the default group, which a member who joins the org in no group joins, in place of the group that was; {"is_default": false} on the default group leaves the org without one, and on any other group changes nothing. Only an org owner sends is_default.

## Path parameters

- `org_id` (`updateOrgGroup.path.org_id`; string, required)
  - pattern: `^org_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `group_id` (`updateOrgGroup.path.group_id`; string, required)
  - pattern: `^group_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Request body

_Required._

- `name` (`updateOrgGroup.name`; string, optional)
  - minLength: `1` · pattern: `^\S[\s\S]*\S$|^\S$|^$`
- `is_default` (`updateOrgGroup.is_default`; boolean, optional)

## Example request

```json
{
  "name": "string",
  "is_default": true
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url '<base-url>/orgs/<org_id>/groups/<group_id>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "is_default": true
}
'
```

### TypeScript

```typescript
const url = '<base-url>/orgs/<org_id>/groups/<group_id>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({name: 'string', is_default: true})
};

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

### Python

```python
import requests

url = "<base-url>/orgs/<org_id>/groups/<group_id>"

payload = {
    "name": "string",
    "is_default": True
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

OrgGroup

#### Example

```json
{
  "id": "string",
  "name": "string",
  "is_default": true
}
```

- `id` (`updateOrgGroup.response.200.id`; string, required)
  - pattern: `^group_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `name` (`updateOrgGroup.response.200.name`; string, required)
  - minLength: `1` · pattern: `^\S[\s\S]*\S$|^\S$|^$`
- `is_default` (`updateOrgGroup.response.200.is_default`; boolean, required)

### 400

InvalidRequest | RequestBodyTooDeep

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

Any of the following:

- `InvalidRequestEncoded`
  - `_tag` (`InvalidRequestEncoded._tag`; string, required)
    - one of `"InvalidRequest"`
  - `part` (`InvalidRequestEncoded.part`; string, required)
    - one of `"path"`, `"query"`, `"headers"`, `"body"`
  - `issues` (`InvalidRequestEncoded.issues`; array of object, required)
    - `path` (`InvalidRequestEncoded.issues.path`; array\<any of\>, required)
      - any of the following: `string`, `integer`
    - `message` (`InvalidRequestEncoded.issues.message`; string, required)
- `RequestBodyTooDeepEncoded`
  - `_tag` (`RequestBodyTooDeepEncoded._tag`; string, required)
    - one of `"RequestBodyTooDeep"`
  - `max_depth` (`RequestBodyTooDeepEncoded.max_depth`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`updateOrgGroup.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

OrgNotFound | GroupNotFound

#### Example

```json
{
  "_tag": "OrgNotFound"
}
```

Any of the following:

- `OrgNotFoundEncoded`
  - `_tag` (`OrgNotFoundEncoded._tag`; string, required)
    - one of `"OrgNotFound"`
- `GroupNotFoundEncoded`
  - `_tag` (`GroupNotFoundEncoded._tag`; string, required)
    - one of `"GroupNotFound"`

### 409

GroupNameTaken

#### Example

```json
{
  "_tag": "GroupNameTaken",
  "group_id": "string",
  "group_name": "string"
}
```

- `_tag` (`updateOrgGroup.response.409._tag`; string, required)
  - one of `"GroupNameTaken"`
- `group_id` (`updateOrgGroup.response.409.group_id`; string, required)
  - pattern: `^group_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `group_name` (`updateOrgGroup.response.409.group_name`; string, required)
  - minLength: `1`

### 413

RequestBodyTooLarge

#### Example

```json
{
  "_tag": "RequestBodyTooLarge",
  "max_bytes": -9007199254740991
}
```

- `_tag` (`updateOrgGroup.response.413._tag`; string, required)
  - one of `"RequestBodyTooLarge"`
- `max_bytes` (`updateOrgGroup.response.413.max_bytes`; integer, required)
  - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`updateOrgGroup.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

OrgFailure

#### Example

```json
{
  "_tag": "OrgFailure",
  "reason": "string"
}
```

- `_tag` (`updateOrgGroup.response.500._tag`; string, required)
  - one of `"OrgFailure"`
- `reason` (`updateOrgGroup.response.500.reason`; string, required)

### 503

SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "SessionUnavailable"
}
```

Any of the following:

- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/update-org-group/index.md
