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

# Lookup Customer by Alias

Look up a customer's account ID using an alias. This is useful when you have an external identifier and need to find the corresponding Alguna customer.

## Query Parameters

<ParamField query="alias" type="string" required>
  The alias to look up. This can be:

  * The account ID itself
  * A user-defined alias set on the customer
</ParamField>

## Response

<ResponseField name="accountId" type="string">
  The Alguna account ID corresponding to the provided alias.
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.alguna.io/account-lookup?alias=QBO-12345' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "accountId": "acc_abc123def456"
  }
  ```

  ```json 404 theme={null}
  {
    "code": "not_found",
    "message": "no account found for alias: QBO-12345"
  }
  ```
</ResponseExample>
