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

# Fetch Account by externalAccountId

> Returns the account that matches the externalAccountId – Reseller/Partner only.



## OpenAPI

````yaml get /api/v2/getAccountByExternalId
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/getAccountByExternalId:
    get:
      tags:
        - Accounts
      summary: Fetch Account by externalAccountId
      description: >-
        Returns the account that matches the externalAccountId –
        Reseller/Partner only.
      parameters:
        - name: externalAccountId
          in: query
          description: Your system’s customer / account ID
          required: true
          example: acct_123abc
          schema:
            type: string
      responses:
        '200':
          description: Account found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Success
                  account:
                    type: object
              examples:
                example:
                  value:
                    success: true
                    message: Success
                    account:
                      id: 3
                      username: accountUsername
                      organizationId: 3
        '400':
          description: Missing or invalid externalAccountId
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: externalAccountId is required
        '401':
          description: 'Unauthorized : missing / bad API key or token'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthorized Request
        '404':
          description: No account found OR caller lacks access
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Account not found for externalAccountId acct_123abc
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: An error occurred while fetching account
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````