Skip to main content
PATCH
/
orgs
/
{id}
cURL
curl --request PATCH \
  --url https://api.useanima.sh/v1/orgs/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "clerkOrgId": "<string>",
  "settings": {}
}
'
{
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "clerkOrgId": "<string>",
  "keyRotatedAt": "2023-11-07T05:31:56Z",
  "settings": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Path Parameters

id
string
required

Unique identifier of the organization to update

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Body

application/json

Request body for updating an existing organization

name
string

Updated display name

Required string length: 2 - 120
slug
string

Updated URL-friendly identifier

Required string length: 2 - 64
Pattern: ^[a-z0-9-]+$
clerkOrgId
string | null

Updated external Clerk organization ID

Required string length: 1 - 128
tier
enum<string>

Updated subscription tier

Available options:
FREE,
STARTER,
GROWTH,
SCALE,
ENTERPRISE
settings
object

Updated key-value settings

Response

200 - application/json

OK

Organization resource with full details (no secrets)

id
string
required

Unique identifier for the organization

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
name
string
required

Display name of the organization

slug
string
required

URL-friendly identifier for the organization

clerkOrgId
string | null
required

External Clerk organization ID, null if not linked

tier
enum<string>
required

Current subscription tier

Available options:
FREE,
STARTER,
GROWTH,
SCALE,
ENTERPRISE
keyRotatedAt
string<date-time> | null
required

ISO 8601 timestamp of the last master-key rotation, null if never rotated

settings
object
required

Arbitrary key-value settings for the organization

createdAt
string<date-time>
required

ISO 8601 timestamp when the organization was created

updatedAt
string<date-time>
required

ISO 8601 timestamp when the organization was last modified