Accounts Cookbook

Create an account

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

curl -X POST https://api.withpersona.com/api/v1/accounts \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer YOUR_API_KEY" \
-d'{
"data": {
"attributes": {
"reference-id": REFERENCE_ID
}
}
}'

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:

# Using account ID
curl -X POST https://api.withpersona.com/api/v1/inquiries \
-H "Authorization: Bearer YOUR_API_KEY" \
-H 'Content-Type: application/json' \
-d'{
"data": {
"attributes": {
"inquiry-template-id": YOUR_TEMPLATE_ID,
"account-id": ACCOUNT_ID
}
}
}'
# Using reference ID
curl -X POST https://api.withpersona.com/api/v1/inquiries \
-H "Authorization: Bearer YOUR_API_KEY" \
-H 'Content-Type: application/json' \
-d'{
"data": {
"attributes": {
"inquiry-template-id": YOUR_TEMPLATE_ID
},
"meta": {
"auto-create-account-reference-id": REFERENCE_ID
}
}
}'

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
curl -X POST https://api.withpersona.com/api/v1/importer/accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "data[attributes][file]=@/PATH/TO/YOUR/LOCAL/FILE.csv"

See the full API reference.