Skip to main content
PUT
/
organizations
/
{id}
Update organization (owner only)
curl --request PUT \
  --url http://sandbox.mintlify.com/organizations/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Acme Corporation",
  "logo": "https://example.com/logo.png"
}
'
Updates organization details.

Authentication

This endpoint requires authentication via Bearer token:
  • Authorization: Bearer <token>

⚠️ Security

Only the organization OWNER can update organization details. Admins and members cannot perform this action. This is enforced at the business logic layer.

Path Parameters

ParameterTypeRequiredDescription
idstringYesOrganization UUID

Request Body

FieldTypeRequiredDescription
namestringNoOrganization name (3-100 characters)
logostringNoURL to organization logo image

Updatable Fields

  • Organization name: Can be changed anytime
  • Logo URL: Can be updated or removed
The organization slug cannot be changed after creation.

Example Request

curl -X PUT http://localhost:3001/api/organizations/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corporation",
    "logo": "https://example.com/new-logo.png"
  }'

Example Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Acme Corporation",
  "slug": "acme-corp",
  "logo": "https://example.com/new-logo.png",
  "plan": "pro",
  "ownerId": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2025-01-26T10:00:00Z",
  "updatedAt": "2025-12-26T15:30:00Z"
}

Common Errors

403 Forbidden

Only the owner can update organization details.
{
  "statusCode": 403,
  "message": "Access denied. Only the organization owner can update organization details"
}

404 Not Found

The organization with the specified ID does not exist.
{
  "statusCode": 404,
  "message": "Organization not found"
}

400 Bad Request

Invalid input data (e.g., name too short).
{
  "statusCode": 400,
  "message": ["name must be at least 3 characters long"]
}

Best Practices

  • Update organization name to reflect rebranding
  • Use high-quality logos (recommended: 512x512px, PNG or SVG)
  • Keep logo file size under 2MB
  • Consider notifying team members of significant changes

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
name
string

Organization name

Required string length: 1 - 100
Example:

"Acme Corporation"

Organization logo URL

Example:

"https://example.com/logo.png"

Response

Organization updated successfully by the owner.