Skip to main content
PATCH
/
organizations
/
{org_id}
Rename organization
curl --request PATCH \
  --url https://api.diversion.dev/v0/organizations/{org_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "New Organization Name"
}'
{
  "id": "org_123456",
  "name": "Example Organization",
  "description": "This is an example organization.",
  "owner_id": "user_123456",
  "total_storage": 1000000,
  "members": [
    {
      "id": "member_123456",
      "user_id": "user_123456",
      "organization_id": "org_123456",
      "role": "READ"
    }
  ],
  "invites": [
    {
      "id": "invite_123456",
      "organization_id": "org_123456",
      "inviting_user_id": "user_123456",
      "invited_email": "jsmith@example.com",
      "status": "PENDING",
      "created": "2023-01-01T00:00:00Z",
      "expires": "2023-01-31T00:00:00Z"
    }
  ],
  "in_warning_group": true
}

Authorizations

Authorization
string
header
required

This API uses OAuth 2 with the implicit grant flow

Path Parameters

org_id
string
required

An ID of an organization

Body

application/json
name
string
required

New name for the organization

Required string length: 1 - 128
Example:

"New Organization Name"

Response

Organization renamed successfully

id
string
required

Unique identifier for the organization

Example:

"org_123456"

name
string
required

Name of the organization

Example:

"Example Organization"

owner_id
string
required

ID of the user who owns the organization

Example:

"user_123456"

total_storage
integer
required

Total storage allocated to the organization

Example:

1000000

description
string

Description of the organization

Example:

"This is an example organization."

members
object[]

List of members in the organization

invites
object[]

List of invites sent by the organization

in_warning_group
boolean

Whether the organization is in the warning group

Example:

true