Skip to main content
POST
/
organizations
/
{id}
/
update
Update organization
curl --request POST \
  --url https://api.wacht.dev/organizations/{id}/update \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --cookie session_id= \
  --data 'name=Acme Corp Updated' \
  --data 'description=Updated description' \
  --data-urlencode whitelisted_ips%5B0%5D=192.168.1.0/24 \
  --data-urlencode whitelisted_ips%5B1%5D=10.0.0.1 \
  --data auto_assigned_workspace_id=123456789012345678 \
  --data enable_ip_restriction=true \
  --data enforce_mfa=true
{
  "status": 200,
  "message": "",
  "data": {
    "id": "123456789012345678",
    "deployment_id": "999999999999999999",
    "name": "Acme Corp",
    "description": "A leading technology company",
    "image_url": "https://cdn.wacht.dev/orgs/123/logo.png",
    "member_count": 42,
    "whitelisted_ips": [
      "192.168.1.0/24"
    ],
    "enable_ip_restriction": false,
    "enforce_mfa": false,
    "auto_assigned_workspace_id": "555555555555555555",
    "public_metadata": {
      "industry": "Technology"
    },
    "private_metadata": {},
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  "session": {
    "id": "123456789012345678",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "errors": [
    {
      "code": "INVALID_CREDENTIALS",
      "message": "Invalid credentials. Please try again."
    }
  ]
}

Authorizations

session_id
string
cookie
required

Session-based authentication using cookies

Path Parameters

id
string<uint64>
required

Organization ID

Body

application/x-www-form-urlencoded
name
string
Example:

"Acme Corp Updated"

description
string
Example:

"Updated description"

whitelisted_ips
string[]

List of allowed IP addresses/CIDR ranges

Example:
["192.168.1.0/24", "10.0.0.1"]
auto_assigned_workspace_id
string<uint64>

ID of workspace to auto-assign members

Example:

"123456789012345678"

enable_ip_restriction
boolean

Enable IP restriction

Example:

true

enforce_mfa
boolean

Enforce MFA setup for members

Example:

true

Response

Organization updated successfully

status
integer

HTTP status code

Example:

200

message
string

Response message (empty on success)

Example:

""

data
object
session
object

Minimal session info included in every response

errors
object[] | null

Error details (null on success)