Import contacts
You can load your existing customers into AskVault from the dashboard, by uploading a CSV file or adding one person at a time, or through the API. AskVault matches each row to a person it already knows, so importing the same file twice updates records instead of duplicating them.
Contacts also appear on their own as people talk to your agent. Importing just means they are there before the first chat. Back to Contacts, leads and segments.
Before you start
- You need the Member role or higher in the workspace.
- Prepare a CSV with a header row. Each row needs at least one of an external ID, an email or a phone number.
- Keep the file under 1,000 rows and 5 MB. Split a larger export into several files.
Add contacts from the dashboard
Click Add contacts on the Contacts page, then choose One person or CSV file.
- CSV file. Before importing, you can check where each column goes. Every column that is not one of the fields below is kept as a custom attribute unless you choose Skip this column.
- One person. Enter a name, email, phone, plan and your own ID, and optionally add them to Leads. At least one of your ID, email or phone is required, and the same matching rules apply: if the person is already a contact, you update them rather than create a duplicate.
The Fields tab lets an owner or admin declare the custom attributes this workspace tracks. The rest of this page covers the API.
Import a CSV
Upload the file as a form field named file:
curl -X POST https://api.askvault.co/api/workspaces/{workspace_id}/contacts/import \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \The response counts how many contacts were added, updated and skipped.
How columns map
Header names are matched without regard to case, and spaces and hyphens count as underscores, so External ID, external-id and external_id all work.
| Column | Goes to |
|---|---|
external_id | The contact's ID in your own system |
email | Email address |
name | Display name |
phone | Phone number |
plan | Plan label |
Every other column is kept as a custom attribute. A loyalty_tier column stays with the contact and is available to segments.
The header must include at least one of external_id, email, name or phone. Renaming a spreadsheet to .csv is not enough: the file has to parse as CSV.
Matching and re-imports
AskVault matches a row to an existing contact by email, then external ID, then phone, and updates the record it finds. The summary tells you how many were added and how many were updated.
Rows with no external ID, email or phone, and rows whose email is not valid, are skipped and listed back to you by row number, up to 100 reasons. The rest of the file still imports.
Name your custom attributes
Custom attributes can have a label and a type so your team reads them clearly. A workspace can declare up to 50, each with a key, a label and a type of text, number, date or boolean. This is display information only: an import keeps every column whether or not you declared it. An admin sets the list with PUT /api/workspaces/{workspace_id}/contacts/attributes.
Create contacts with JSON
Send one contact object or an array of up to 1,000 per request:
curl -X POST https://api.askvault.co/api/workspaces/{workspace_id}/contacts \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '[{"email": "[email protected]", "name": "Sam Rivera", "plan": "pro", "attributes": {"loyalty_tier": "gold"}}]'The response counts rows created, updated and skipped, with a reason for each skipped row. A request with more than 1,000 contacts is refused, so split it into several requests.
Check it worked
Open Contacts in the dashboard and search for one of the people you imported. Open the profile and confirm the name, plan and custom attributes are there.
If it doesn't work
"That file isn't a contacts CSV". The header row has none of external_id, email, name or phone. Rename a column and try again.
Rows were skipped. The summary lists them by row number. Add an email, phone or external ID to those rows and import the file again. Re-importing is safe.
The request is refused. You need the Member role or higher in the workspace. Ask a workspace admin to change your role.
Related
- Contacts, leads and segments
- The Inbox
- Identity verification: how verified customer IDs reach AskVault.