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

# Update Sub-Account

> Update Sub-Account updates a sub-account within the parent account.



## OpenAPI

````yaml en/API/REST-API-Embedded.yaml PUT /poweredby/account/update/{subAccountId}
openapi: 3.1.0
info:
  title: CData Connect AI REST API Embedded
  version: v1
servers:
  - url: https://cloud.cdata.com/api
    description: Production base URL
security:
  - BearerAuth: []
paths:
  /poweredby/account/update/{subAccountId}:
    put:
      tags:
        - Account
      summary: Update Sub-Account
      description: >
        Update Sub-Account updates a sub-account within the parent account.
        Include only the fields you want to change in the request body.
      operationId: updateAccount
      parameters:
        - name: subAccountId
          in: path
          required: true
          schema:
            type: string
          example: fee1ce9d-c40c-4ef6-8f8c-77461315713d
          description: The internal Connect AI account Id of the sub-account to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRequest'
            example:
              externalId: MyExternalId
              accountName: Acme Corporation
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInfo'
              example:
                id: fee1ce9d-c40c-4ef6-8f8c-77461315713d
                externalId: MyExternalId
                accountName: Acme Corporation
                created: '2023-07-13T20:42:56.317Z'
components:
  schemas:
    UpdateAccountRequest:
      type: object
      properties:
        externalId:
          type: string
          description: (Optional) The new external Id for the sub-account.
          nullable: true
        accountName:
          type: string
          description: (Optional) The new display name for the sub-account.
          nullable: true
      additionalProperties: false
    AccountInfo:
      type: object
      required:
        - id
        - externalId
        - created
      properties:
        id:
          type: string
          description: The internal Connect AI account Id.
        externalId:
          type: string
          description: The Connect AI Embed external account identifier.
        accountName:
          type: string
          description: The display name of the account.
          nullable: true
        created:
          type: string
          format: date-time
          description: The time this account was created.
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT token authentication. Include the token in the Authorization header
        as `Bearer {token}`. See
        [Authentication](/en/API/Authentication-Embedded) for more information
        on creating a token.

````