> ## 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.

# Get Sub-Account

> Get Sub-Account returns a single sub-account within the parent account.



## OpenAPI

````yaml en/API/REST-API-Embedded.yaml GET /poweredby/account/{accountIdOrExternalId}
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/{accountIdOrExternalId}:
    get:
      tags:
        - Account
      summary: Get Sub-Account
      description: >
        Get Sub-Account returns a single sub-account within the parent account.
        You can look up the sub-account by either its internal Connect AI
        account Id or its external Id.
      operationId: getAccount
      parameters:
        - name: accountIdOrExternalId
          in: path
          required: true
          schema:
            type: string
          example: fee1ce9d-c40c-4ef6-8f8c-77461315713d
          description: >-
            The internal Connect AI account Id or the external Id of the
            sub-account.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInfo'
              example:
                id: fee1ce9d-c40c-4ef6-8f8c-77461315713d
                externalId: ExternalId
                accountName: Acme Corporation
                created: '2023-07-13T20:42:56.317Z'
components:
  schemas:
    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.

````