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

# Create customers

> Create a customer and submit them for approval so you can open virtual accounts for them.

A customer is created with two API calls: one to begin the customer's application, and one to submit it. Before you start, make sure your organization is approved for Named Virtual Accounts and your API key has the **Onboarding** permission. See the [Named Virtual Accounts overview](https://docs.anchorage.com/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-overview.md#get-enabled).

The examples use the sandbox base URL. For production, see [Base URLs](https://docs.anchorage.com/knowledge-base/api-reference/introduction.md#base-urls).

## Step 1: Begin the customer's application

**`POST /v2/onboarding/customers`**

Creates the customer and returns their `customerId`. Set `applicationType` to `VA_INDIVIDUAL` for an individual or `VA_INSTITUTION` for an institution, and `affiliateId` to the identifier we gave you when your organization was set up. Use `externalId` for your own reference to the customer. It must be unique for each customer. See [Begin owner onboarding application](https://docs.anchorage.com/knowledge-base/api-reference/v2-platforms/onboarding/begin-owner-onboarding-application) for the full reference.

Pass the customer's details in `entries`, one `key` and `value` per field:

| Field | `VA_INDIVIDUAL` | `VA_INSTITUTION` |
| :- | :- | :- |
| Name | `firstName`, `lastName` | `legalEntityName` |
| Address | `physicalCountry`, `physicalStreetAddress`, `physicalCity`, `physicalPostalCode` | Same as individual |
| State | `physicalStateUS` for the US, `physicalStateOther` otherwise | Same as individual |
| Legal structure | Not used | `legalStructure` (optional) |

```bash Request theme={null}
curl --request POST \
     --url 'https://api.anchorage-staging.com/v2/onboarding/customers' \
     --header 'Api-Access-Key: [API Key]' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
       "applicationType": "VA_INSTITUTION",
       "affiliateId": "[Affiliate ID]",
       "externalId": "customer-0001",
       "entries": [
         { "key": "legalEntityName", "value": "[Legal entity name]" },
         { "key": "physicalCountry", "value": "[Country]" },
         { "key": "physicalStreetAddress", "value": "[Street address]" },
         { "key": "physicalCity", "value": "[City]" },
         { "key": "physicalStateUS", "value": "[State]" },
         { "key": "physicalPostalCode", "value": "[Postal code]" }
       ]
     }'
```

```json Response theme={null}
{
  "data": {
    "customerId": "[Customer ID]",
    "status": "IN_PROGRESS"
  }
}
```

Save the `customerId`. You'll use it in every later call for this customer.

If you're not sure which details the application still needs, call [Get owner onboarding application by ID](https://docs.anchorage.com/knowledge-base/api-reference/v2-platforms/onboarding/get-owner-onboarding-application-by-id). It returns the application's status, any missing information, and the entries already provided.

## Step 2: Submit the customer

**`POST /v2/onboarding/customers/{customerId}/submit`**

Submits the customer's application. Because Named Virtual Accounts run on a reliance model, the customer is approved on submission and their status moves to `COMPLETE`. There's no screening step at Anchorage Digital. See [Submit owner onboarding application](https://docs.anchorage.com/knowledge-base/api-reference/v2-platforms/onboarding/submit-owner-onboarding-application) for the full reference.

```bash Request theme={null}
curl --request POST \
     --url 'https://api.anchorage-staging.com/v2/onboarding/customers/[Customer ID]/submit' \
     --header 'Api-Access-Key: [API Key]' \
     --header 'accept: application/json'
```

A `200` response means the customer is approved. If the application is missing required information, the call returns `400` and the application stays `IN_PROGRESS`. Getting it by ID lists each missing key with status `MISSING`.

> [!TIP]
>
> To create and approve a customer in one call, set `"submit": true` in the request above. The application is submitted only if it has no validation errors.

Submission can't be undone, so check the customer's details before you submit.

Once the customer is approved, [create virtual accounts](https://docs.anchorage.com/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-create-virtual-accounts.md) for them.


## Related topics

- [Create customers](https://docs.anchorage.com/knowledge-base/api-reference/v4/customers/create-customers.md)
- [Create virtual accounts](https://docs.anchorage.com/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-create-virtual-accounts.md)
- [Overview](https://docs.anchorage.com/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-overview.md)
- [Create a new subaccount for a given program customer](https://docs.anchorage.com/knowledge-base/porto/api-reference/v2/subaccounts/create-a-new-subaccount-for-a-given-program-customer.md)
- [Create a virtual account for a wallet](https://docs.anchorage.com/knowledge-base/api-reference/v2-platforms/virtual-accounts/create-a-virtual-account-for-a-wallet.md)
