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

# Retrieve Visa Alias by external ID

> Use this endpoint to retrieve a Visa Alias by its external ID.

POST/digitalwallets/aliasdirectory/visa/aliases/getByExternalId

Use this endpoint to retrieve a Visa Alias by its external ID.

## Header parameter

| Fields | Description |
| - | - |
| req-sys-id string  Required | Identifier generated by the card program. These identifiers are used for troubleshooting requests between the card program and Marqeta. **Allowable Values:**  36 char max |
| participant-id string  Required | Visa Business Identifier (BID) that is assigned to the program. **Allowable Values:**  Existing participant ID |

## Request body

| Fields | Description |
| - | - |
| externalId string  Required | External ID of the Visa Alias. **Allowable Values:**  1–100 chars |
| type string  Required | Type of Visa Alias in the Alias Directory Service (ADS) profile. Visa supports phone and email as Visa Alias types that can be used in place of sensitive payment credentials. **Allowable Values:**  `ALIAS`, `PAYMENT_CREDENTIAL` |

## Sample request body

```json JSON expandable lines wrap theme={null}
{
  "externalId": "21267931-7975-4b61-be7a-86915883b2b4",
  "type": "ALIAS"
}
```

## Response body

| Fields | Description |
| - | - |
| associatedIds array of objects  Returned | List of associated Visa Alias IDs. **Allowable Values:**  `associatedIds` |
| associatedIds\[].**id** string  Conditionally returned | ID of the payment credential associated with the Visa Alias. **Allowable Values:**  1–64 chars |
| associatedIds\[].**type** string  Conditionally returned | Type of payment credential associated with the Visa Alias. **Allowable Values:**  `ALIAS`, `PAYMENT_CREDENTIAL` |
| id string  Conditionally returned | UUID generated by Alias Directory, which identifies the Visa Alias. **Allowable Values:**  1–36 chars |

## Sample response body

```json JSON expandable lines wrap theme={null}
{
  "associatedIds": [
    {
      "id": "a44c9553-e687-4f3c-b7e7-a4245d9f238e",
      "type": "PAYMENT_CREDENTIAL"
    }
  ],
  "id": "e336c8c8-2945-4be3-af3e-951ec2d01219"
}
```


## Related topics

- [Visa Aliases Overview](https://www.marqeta.com/docs/core-api/digital-wallets-management/visa-aliases.md)
- [Digital Wallets Management Overview](https://www.marqeta.com/docs/core-api/digital-wallets-management.md)
- [Retrieve Visa Alias by Visa Alias ID](https://www.marqeta.com/docs/core-api/digital-wallets-management/visa-aliases/retrieve-visa-alias-by-visa-alias-id.md)
- [Retrieve alias internal ID](https://www.marqeta.com/docs/core-api/digital-wallets-management/visa-aliases/retrieve-alias-internal-id.md)
- [Retrieve a Visa Alias payment credentials](https://www.marqeta.com/docs/core-api/digital-wallets-management/visa-alias-payment-credentials/retrieve-visa-alias-payment-credentials.md)
