Accounts Cookbook

Create an account

Accounts can be created without an inquiry, either manually in your Persona dashboard or via the API.

1curl -X POST https://api.withpersona.com/api/v1/accounts \
2-H 'Content-Type: application/json' \
3-H "Authorization: Bearer YOUR_API_KEY" \
4-d'{
5 "data": {
6 "attributes": {
7 "reference-id": REFERENCE_ID
8 }
9 }
10}'

What’s a reference ID?

A reference ID is a string that you assign to identify a unique end user in Persona. Learn more.

See the full API reference.

Create an account via inquiry creation

You can also associate each newly-created inquiry with an account. Specify either the account ID or the account’s reference ID in the inquiry creation request:

1# Using account ID
2curl -X POST https://api.withpersona.com/api/v1/inquiries \
3-H "Authorization: Bearer YOUR_API_KEY" \
4-H 'Content-Type: application/json' \
5-d'{
6 "data": {
7 "attributes": {
8 "inquiry-template-id": YOUR_TEMPLATE_ID,
9 "account-id": ACCOUNT_ID
10 }
11 }
12}'
13
14# Using reference ID
15curl -X POST https://api.withpersona.com/api/v1/inquiries \
16-H "Authorization: Bearer YOUR_API_KEY" \
17-H 'Content-Type: application/json' \
18-d'{
19 "data": {
20 "attributes": {
21 "inquiry-template-id": YOUR_TEMPLATE_ID
22 },
23 "meta": {
24 "auto-create-account-reference-id": REFERENCE_ID
25 }
26 }
27}'

See the full API reference.

Import accounts

You can import many accounts at once into Persona by uploading a CSV of your account data. Note: this type of upload does not support images at this time.

The fields you can include in a bulk import are:

  • reference_id
  • name_first
  • name_middle
  • name_last
  • birthdate
  • social_security_number
  • tags
1curl -X POST https://api.withpersona.com/api/v1/importer/accounts \
2-H "Authorization: Bearer YOUR_API_KEY" \
3-H "Content-Type: multipart/form-data" \
4-F "data[attributes][file]=@/PATH/TO/YOUR/LOCAL/FILE.csv"

See the full API reference.