Skip to content

Update organization

PATCH
/api/v1/organizations/{id}
curl --request PATCH \
--url http://localhost:3000/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "name": "Acme Corporation Inc.", "description": "Updated description for the organization", "settings": { "timezone": "Europe/London", "locale": "en-GB" }, "branding": { "primaryColor": "#006633", "logo": "https://example.com/new-logo.png" }, "active": true, "primaryContact": "John Smith", "billingEmail": "billing@acme-corp.com" }'

Updates an existing organization. Requires Super Admin privileges.

id
required
string format: uuid

Organization UUID

Media type application/json
object
name

Organization display name

string
>= 2 characters <= 100 characters
Example
Acme Corporation Inc.
description

Organization description

string
<= 500 characters
Example
Updated description for the organization
settings

Organization-specific settings

object
key
additional properties
any
Example
{
"timezone": "Europe/London",
"locale": "en-GB"
}
branding

Organization branding configuration

object
key
additional properties
any
Example
{
"primaryColor": "#006633",
"logo": "https://example.com/new-logo.png"
}
active

Whether the organization is active (deprecated, use dedicated endpoints)

boolean
Example
true
primaryContact

Primary contact name for the organization

string
<= 200 characters
Example
John Smith
billingEmail

Billing email address for the organization

string format: email
Example
billing@acme-corp.com

Organization updated successfully

Media type application/json
object
id
required

Unique organization identifier

string format: uuid
name
required

Organization display name

string
slug
required

Unique URL-friendly identifier

string
description

Organization description

string
settings
required

Organization-specific settings

object
key
additional properties
any
branding
required

Organization branding configuration

object
key
additional properties
any
status
required

Organization status

string
Allowed values: active suspended pending disabled
lastActivityAt

Last activity timestamp

string format: date-time
nullable
primaryContact

Primary contact name

string
nullable
billingEmail

Billing email address

string format: email
nullable
active
required

Whether the organization is active (deprecated, use status)

boolean
createdAt
required

When the organization was created

string format: date-time
updatedAt
required

When the organization was last updated

string format: date-time
stats

Organization resource statistics

object
userCount
required

Total number of users in the organization

number
activeUsers
required

Number of active users in the organization

number
deviceCount
required

Total number of devices in the organization

number
activeDevices
required

Number of online or provisioned devices

number
deploymentCount
required

Total number of deployments in the organization

number
runningDeployments
required

Number of running deployments

number
Example
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"slug": "acme-corp",
"description": "Leading manufacturer of industrial automation equipment",
"settings": {
"timezone": "America/New_York",
"locale": "en-US"
},
"branding": {
"primaryColor": "#003366",
"logo": "https://example.com/logo.png"
},
"status": "active",
"lastActivityAt": "2024-06-20T14:45:00Z",
"primaryContact": "John Smith",
"billingEmail": "billing@acme-corp.com",
"active": true,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-06-20T14:45:00Z",
"stats": {
"userCount": 25,
"activeUsers": 20,
"deviceCount": 150,
"activeDevices": 120,
"deploymentCount": 42,
"runningDeployments": 35
}
}

Invalid input data

Unauthorized

Forbidden - Super Admin required

Organization not found