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

# Update Account

> Update an account.

Updates the account name. Slug and ID are immutable.
Only superadmins can access this endpoint.



## OpenAPI

````yaml put /api/v1/accounts/{account_id}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/accounts/{account_id}:
    put:
      tags:
        - accounts
      summary: Update Account
      description: |-
        Update an account.

        Updates the account name. Slug and ID are immutable.
        Only superadmins can access this endpoint.
      operationId: update_account_api_v1_accounts__account_id__put
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            title: Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDetailResponse'
        '403':
          description: Superadmin access required
        '404':
          description: Account not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateAccountRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Account name
      type: object
      required:
        - name
      title: UpdateAccountRequest
      description: Request body for updating an account.
    AccountDetailResponse:
      properties:
        id:
          type: string
          title: Id
          description: Account ID (UUID)
        account_code:
          type: string
          title: Account Code
          description: Human-readable account code in XX#### format (e.g., AB1234)
        slug:
          type: string
          title: Slug
          description: URL-friendly account identifier
        name:
          type: string
          title: Name
          description: Display name for the account
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the account was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the account was last updated
        user_count:
          type: integer
          title: User Count
          description: Number of users in this account
        collections_used:
          items:
            type: string
          type: array
          title: Collections Used
          description: Collections used by this account
      type: object
      required:
        - id
        - account_code
        - slug
        - name
        - created_at
        - updated_at
        - user_count
      title: AccountDetailResponse
      description: Detailed account information.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````