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

# Update an organization

> Updates specified attributes of an organization. This endpoint can be used to change the organization's name, update its resource limits, or modify branding settings. You only need to provide the fields you want to change.



## OpenAPI

````yaml /api/en/workspaces.yaml patch /workspaces/{workspaceId}/organizations/{organizationId}
openapi: 3.0.3
info:
  title: Altostrat Workspaces API
  version: 1.0.0
  description: >-
    The Altostrat Workspaces API is the microservice responsible for tenancy,
    billing, user identity, and organizational hierarchy.

    It serves as the foundational layer for all multi-tenancy and subscription
    logic within the Altostrat SDX platform, enabling the secure separation of
    customer data and resources for SD-WAN, network automation, and agentic AI
    features.

    This API allows you to programmatically manage:

    - **Workspaces:** The top-level containers for all tenant resources, users,
    and billing configurations.

    - **Organizations:** Hierarchical entities used to model customer tenants or
    business units, track resource usage, and apply limits.

    - **Billing & Subscriptions:** The financial accounts and Stripe-powered
    subscriptions that govern access to Altostrat SDX features and resources.

    - **Members & Access:** The users and their specific roles (Owner, Admin,
    Viewer) within a workspace.

    Developers use this API to build the structural foundation and manage the
    billing lifecycle upon which all other Altostrat SDX automation and AI
    features operate.
servers:
  - url: https://v1.api.altostrat.io
    description: Production API Server
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Manage workspaces, the top-level containers for all resources.
  - name: Workspace Members
    description: Manage user access and roles within a workspace.
  - name: Organizations
    description: Manage hierarchical organizations for tenancy and resource segmentation.
  - name: Billing Accounts
    description: Manage financial accounts linked to Stripe for billing and subscriptions.
  - name: Subscriptions
    description: Manage product subscriptions powered by Stripe.
  - name: Invoices
    description: Retrieve invoice history and preview upcoming billing changes.
  - name: Payment Methods
    description: Manage customer payment methods for subscriptions.
  - name: Public
    description: Unauthenticated endpoints for retrieving public organization information.
paths:
  /workspaces/{workspaceId}/organizations/{organizationId}:
    patch:
      tags:
        - Organizations
      summary: Update an organization
      description: >-
        Updates specified attributes of an organization. This endpoint can be
        used to change the organization's name, update its resource limits, or
        modify branding settings. You only need to provide the fields you want
        to change.
      parameters:
        - $ref: '#/components/parameters/WorkspaceId'
        - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationRequest'
      responses:
        '200':
          description: The updated organization object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: >-
            Unprocessable Entity - The request violates a business rule, such as
            setting a limit that is less than current usage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: unprocessable_entity
                code: limit_below_usage
                message: >-
                  Cannot set limit to 5. The organization and its children are
                  already using 8.
                doc_url: https://docs.altostrat.io/errors/limit_below_usage
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    WorkspaceId:
      name: workspaceId
      in: path
      required: true
      description: The ID of the workspace.
      schema:
        type: string
        example: ws_a1b2c3d4e5f6g7h8
    OrganizationId:
      name: organizationId
      in: path
      required: true
      description: The ID of the organization.
      schema:
        type: string
        example: org_aBcDeFg123456789
  schemas:
    UpdateOrganizationRequest:
      type: object
      description: >-
        Provide one or more fields to update. Fields not provided will be left
        unchanged.
      properties:
        name:
          type: string
          description: The new name for the organization. Maximum 50 characters.
          example: Global Marketing Team
        billing_account_id:
          type: string
          description: The ID of the billing account to associate with a root organization.
          example: cus_a1b2c3d4e5f6g7h8
        limits:
          type: object
          description: >-
            Update resource limits. To remove a limit, pass the key with a
            `null` value.
          additionalProperties:
            type: integer
            nullable: true
            minimum: 0
          example:
            users: 100
            locations: null
        picture:
          type: string
          nullable: true
          description: >-
            A public HTTPS URL or base64 data URI for the new logo. To remove
            the logo, provide `null`.
          example: https://example.com/new_logo.png
        branding:
          $ref: '#/components/schemas/BrandingUpdate'
    Organization:
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the organization (corresponds to Auth0
            organization ID), prefixed with `org_`.
          example: org_aBcDeFg123456789
        name:
          type: string
          description: The human-readable name of the organization.
          example: Engineering Department
        workspace_id:
          type: string
          description: The ID of the workspace this organization belongs to.
          example: ws_a1b2c3d4e5f6g7h8
        external_id:
          type: string
          format: uuid
          description: >-
            A stable, unique identifier for the organization, independent of its
            Auth0 ID.
          example: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
        parent_org_id:
          type: string
          nullable: true
          description: The ID of the parent organization, if this is a child organization.
          example: org_zYxWvUt987654321
        path:
          type: string
          nullable: true
          description: >-
            A `#`-separated string representing the hierarchical path of
            ancestors.
          example: org_root123#org_parent456
        depth:
          type: integer
          description: The depth of the organization in the hierarchy (0 for top-level).
          example: 2
        billing_account_id:
          type: string
          nullable: true
          description: >-
            The ID of the billing account this organization is associated with
            (in `assigned` mode).
          example: cus_a1b2c3d4e5f6g7h8
        picture:
          type: string
          format: uri
          nullable: true
          description: A URL to the organization's logo.
          example: https://cdn.altostrat.io/logos/engineering.png
        usage:
          $ref: '#/components/schemas/MeterableUsage'
        limits:
          type: object
          description: >-
            A map of resource limits applied directly to this organization. Keys
            are meterable types (`locations`, `users`, `sso`). A value of `null`
            or a missing key means no limit is set at this level. A value of `0`
            means the resource is explicitly disabled.
          additionalProperties:
            type: integer
            nullable: true
            minimum: 0
          example:
            locations: 10
            users: 50
        branding:
          $ref: '#/components/schemas/Branding'
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_missing
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The 'name' parameter is required for this request.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_missing
    BrandingUpdate:
      type: object
      description: Branding settings for the organization.
      properties:
        display_name:
          type: string
          description: The public-facing name of the organization. Maximum 100 characters.
          example: ACME Inc.
        login_hint:
          type: string
          description: >-
            A unique, URL-friendly identifier for login flows. Must be
            alphanumeric with dashes. Maximum 50 characters.
          example: acme-inc
        colors:
          type: object
          description: A map of theme colors for branding.
          additionalProperties:
            type: string
          example:
            primary: '#007bff'
    MeterableUsage:
      type: object
      properties:
        usage:
          type: object
          description: >-
            Usage consumed directly by this organization. Keys are meterable
            types (`locations`, `users`, `sso`).
          additionalProperties:
            type: integer
          example:
            locations: 2
            users: 5
        subtree_usage:
          type: object
          description: Total usage including this organization and all its descendants.
          additionalProperties:
            type: integer
          example:
            locations: 10
            users: 25
    Branding:
      type: object
      properties:
        display_name:
          type: string
          nullable: true
          description: >-
            The public-facing name of the organization, used for branding
            purposes.
          example: ACME Corp
        login_hint:
          type: string
          nullable: true
          description: >-
            A unique, URL-friendly identifier used to pre-fill the organization
            in login flows.
          example: acme-corp
        colors:
          type: object
          nullable: true
          description: >-
            A map of key-value pairs representing the organization's theme
            colors.
          additionalProperties:
            type: string
          example:
            primary: '#FF5733'
            page_background: '#FFFFFF'
  responses:
    BadRequest:
      description: >-
        Bad Request - The request was malformed or contained invalid parameters.
        The response body will contain details about the error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: invalid_request_error
            code: parameter_invalid
            message: The 'name' parameter cannot exceed 50 characters.
            doc_url: https://docs.altostrat.io/errors/parameter_invalid
    Unauthorized:
      description: >-
        Unauthorized - The request was not authenticated. Ensure you have
        provided a valid Bearer token in the Authorization header.
    Forbidden:
      description: >-
        Forbidden - The authenticated user does not have permission to perform
        this action.
    NotFound:
      description: Not Found - The requested resource could not be found.
    ServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: api_error
            code: internal_server_error
            message: An internal server error occurred. Please try again later.
            doc_url: https://docs.altostrat.io/errors/internal_server_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT in the format: Bearer {token}'

````