> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timbrix.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Organization

> ⚠️ SECURITY: Only the organization OWNER can update organization details. Admins and members cannot perform this action.

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

| Parameter | Type   | Required | Description       |
| --------- | ------ | -------- | ----------------- |
| `id`      | string | Yes      | Organization UUID |

## Request Body

| Field  | Type   | Required | Description                          |
| ------ | ------ | -------- | ------------------------------------ |
| `name` | string | No       | Organization name (3-100 characters) |
| `logo` | string | No       | URL 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

```bash theme={null}
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

```json theme={null}
{
  "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.

```json theme={null}
{
  "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.

```json theme={null}
{
  "statusCode": 404,
  "message": "Organization not found"
}
```

### 400 Bad Request

Invalid input data (e.g., name too short).

```json theme={null}
{
  "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


## OpenAPI

````yaml PUT /organizations/{id}
openapi: 3.1.0
info:
  title: Timbrix API
  description: >-
    REST API with OAuth2 server for managing organizations, members, and
    webhooks
  version: '1.0'
  contact: {}
servers:
  - url: http://sandbox.mintlify.com
    description: Sandbox environment
  - url: http://localhost:3001/api
    description: Local development
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
paths:
  /organizations/{id}:
    put:
      tags:
        - organizations
      summary: Update organization (owner only)
      description: >-
        ⚠️ SECURITY: Only the organization OWNER can update organization
        details. Admins and members cannot perform this action.
      operationId: OrganizationsController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationDto'
      responses:
        '200':
          description: Organization updated successfully by the owner.
        '400':
          description: Invalid input data. Check the validation errors in the response.
        '401':
          description: Authentication required. Provide a valid bearer token.
        '403':
          description: >-
            Access denied. Only the organization owner can update organization
            details.
        '404':
          description: Organization not found with the provided ID.
      security:
        - bearer: []
components:
  schemas:
    UpdateOrganizationDto:
      type: object
      properties:
        name:
          type: string
          description: Organization name
          example: Acme Corporation
          minLength: 1
          maxLength: 100
        logo:
          type: string
          description: Organization logo URL
          example: https://example.com/logo.png
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````