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

# Update account



## OpenAPI

````yaml put /accounts
openapi: 3.0.0
info:
  title: Mudstack API
  version: 2.41.0
servers:
  - url: https://api.mudstack.com
security: []
tags: []
paths:
  /accounts:
    put:
      tags:
        - Account
      parameters:
        - $ref: '#/components/parameters/account_id'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                body:
                  type: object
      responses:
        '200':
          description: Account updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
      security:
        - Authentication: []
components:
  parameters:
    account_id:
      name: x-account-id
      in: header
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Account:
      type: object
      description: Represents an account with various properties and relationships.
      properties:
        id:
          type: string
          description: Unique identifier for the account.
        name:
          type: string
          description: Name of the account.
        account_tier_id:
          type: string
          description: Identifier for the account tier.
        thumbnail_file_id:
          type: string
          description: Optional identifier for the thumbnail file.
        created_by_user_id:
          type: string
          description: Optional identifier for the user who created the account.
        defaultAvatar:
          type: number
          description: Default avatar for the account.
        sequence:
          type: integer
          format: int64
          description: Sequence number for the account.
        subscription:
          $ref: '#/components/schemas/AccountSubscription'
          description: Optional subscription details for the account.
        members:
          $ref: '#/components/schemas/AccountMember'
          description: Optional members associated with the account.
        tier:
          $ref: '#/components/schemas/AccountTier'
          description: Optional tier details for the account.
        type:
          $ref: '#/components/schemas/AccountType'
          description: Optional type details for the account.
        creator:
          $ref: '#/components/schemas/User'
          description: Optional creator details for the account.
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/Workspace'
          description: List of workspaces associated with the account.
        isCreator:
          type: boolean
          description: Optional flag indicating if the user is the creator of the account.
        account_roles:
          type: array
          items:
            type: string
          description: Optional list of roles associated with the account.
    AccountSubscription:
      type: object
      description: Represents an account subscription.
      properties:
        account_id:
          type: string
          description: The unique identifier for the account.
        stripe_customer_id:
          type: string
          description: The Stripe customer ID associated with the account.
        status:
          type: string
          description: The current status of the subscription.
        licenses:
          type: integer
          description: The number of licenses associated with the subscription.
        frequency:
          type: string
          enum:
            - yearly
            - monthly
          description: The billing frequency of the subscription.
        contact:
          type: string
          description: The contact information for the subscription.
    AccountMember:
      type: object
      description: >-
        Represents a member of an account with associated roles and user
        information.
      properties:
        account_id:
          type: string
          description: The unique identifier of the account.
        user_id:
          type: string
          description: The unique identifier of the user.
        roles:
          type: array
          items:
            type: string
          description: The roles assigned to the user within the account.
        user:
          $ref: '#/components/schemas/User'
          description: The user associated with the account member.
    AccountTier:
      type: object
      description: Represents the tier of an account.
      properties:
        id:
          type: string
          description: Unique identifier for the account tier.
        type:
          type: string
          enum:
            - personal
            - team
          description: Type of the account tier.
        name:
          type: string
          description: Name of the tier type.
        maxStorage:
          type: number
          description: Maximum storage allowed for the account tier.
        costPerLicense:
          type: number
          description: Cost per license for the account tier.
        costPerExtraTB:
          type: number
          description: Cost per extra terabyte for the account tier.
      required:
        - id
        - type
        - name
    AccountType:
      type: object
      description: Represents the type of an account with various limits and costs.
      properties:
        id:
          type: string
          description: Unique identifier for the account type.
        name:
          type: string
          description: Name of the account type.
        maxStorage:
          type: number
          description: Maximum storage allowed for the account type.
        maxAssets:
          type: number
          description: Maximum number of assets allowed for the account type.
        maxUsers:
          type: number
          description: Maximum number of users allowed for the account type.
        costPerUser:
          type: number
          description: Cost per user for the account type.
        addStoragePrice:
          type: number
          description: Additional storage price for the account type.
    User:
      type: object
      description: User model
      properties:
        id:
          type: string
          description: Unique identifier for the user
        auth0UserID:
          type: string
          description: Auth0 user ID
        username:
          type: string
          description: Username of the user
        email:
          type: string
          description: Email address of the user
        firstName:
          type: string
          description: First name of the user
        lastName:
          type: string
          description: Last name of the user
        avatar_file_id:
          type: string
          description: File ID of the user's avatar
        defaultAvatar:
          type: number
          description: Default avatar identifier
        industry:
          type: string
          description: Industry the user works in
        occupation:
          type: string
          description: Occupation of the user
        company:
          type: string
          description: Company the user works for
        emailVerified:
          type: boolean
          description: Whether the user's email is verified
        isActive:
          type: boolean
          description: Whether the user is active
        city:
          type: string
          description: City where the user resides
        state:
          type: string
          description: State where the user resides
        country:
          type: string
          description: Country where the user resides
        zipCode:
          type: string
          description: Zip code of the user's location
        invited_by_user:
          $ref: '#/components/schemas/User'
          description: User who invited this user
    Workspace:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the workspace.
        account_id:
          type: string
          format: uuid
          description: Unique identifier for the account associated with the workspace.
        name:
          type: string
          description: Name of the workspace.
        thumbnail_file_id:
          type: string
          format: uuid
          description: >-
            Unique identifier for the thumbnail file associated with the
            workspace.
        defaultAvatar:
          type: integer
          description: Default avatar for the workspace.
          minimum: 1
          maximum: 10
          default: 1
        created_by_user_id:
          type: string
          format: uuid
          description: Unique identifier for the user who created the workspace.
        sequence:
          type: string
          format: bigint
          description: Sequence number for the workspace.
        roles:
          $ref: '#/components/schemas/WorkspaceMember'
          description: Roles associated with the workspace.
        usage:
          type: object
          description: Usage information for the workspace.
    WorkspaceMember:
      type: object
      required:
        - workspace_id
        - user_id
        - roles
      properties:
        workspace_id:
          type: string
          description: The ID of the workspace.
        user_id:
          type: string
          description: The ID of the user.
        roles:
          type: array
          items:
            type: string
          description: The roles assigned to the user in the workspace.
        user:
          $ref: '#/components/schemas/User'
          description: The user details.
  securitySchemes:
    Authentication:
      type: http
      scheme: bearer
      bearerFormat: JWT

````