Lists Tutorials

Learn more in the Lists API documentation

Importing email address lists

If you would like to import many list items at once into an email address list in Persona, first create the list in the Persona dashboard by selecting “Email address” for the list type. Next, you can upload a CSV of your email address data.

curl
1API_KEY=YOUR_API_KEY_HERE
2LIST_ID=YOUR_LIST_ID_HERE
3FILE_PATH=CSV_FILE_PATH
4
5curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $API_KEY" -d'{
6 "data": {
7 "type": "importer",
8 "attributes": {
9 "list-id": "'"${LIST_ID}"'",
10 "file": { "data": "'"$(base64 $FILE_PATH)"'", "filename": "$FILE_PATH" }
11 }
12 }
13}' https://api.withpersona.com/api/v1/importer/list-item/email-addresses

The information we support during bulk import for email address lists are:

  • value
  • match_type (either ‘email_address’ or ‘domain’)

A match_type of ‘email_address’ will need to match the entire email address of an individual, while a match_type of ‘domain’ will match on the email address domain of an individual (i.e. all email addresses with domain ‘gmail.com’).

Example CSV

value,match_type

alexander@sample.com,email_address

some-domain.com,domain

Importing geolocation lists

If you would like to import many list items at once into a geolocation list in Persona, first create the list in the Persona dashboard by selecting “Geolocation” for the list type. Next, you can upload a CSV of your geolocation data.

curl
1API_KEY=YOUR_API_KEY_HERE
2LIST_ID=YOUR_LIST_ID_HERE
3FILE_PATH=CSV_FILE_PATH
4
5curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $API_KEY" -d'{
6 "data": {
7 "type": "importer",
8 "attributes": {
9 "list-id": "'"${LIST_ID}"'",
10 "file": { "data": "'"$(base64 $FILE_PATH)"'", "filename": "$FILE_PATH" }
11 }
12 }
13}' https://api.withpersona.com/api/v1/importer/list-item/geolocations

The information we support during bulk import for geolocation lists are:

  • latitude
  • longitude
  • radius_meters

Example CSV

latitude, longitude, radius_meters

40.7128, 74.0060, 200

Importing government ID number lists

If you would like to import many list items at once into a government ID number list in Persona, first create the list in the Persona dashboard by selecting “Government ID number” for the list type. Next, you can upload a CSV of your government ID number data.

curl
1API_KEY=YOUR_API_KEY_HERE
2LIST_ID=YOUR_LIST_ID_HERE
3FILE_PATH=CSV_FILE_PATH
4
5curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $API_KEY" -d'{
6 "data": {
7 "type": "importer",
8 "attributes": {
9 "list-id": "'"${LIST_ID}"'",
10 "file": { "data": "'"$(base64 $FILE_PATH)"'", "filename": "$FILE_PATH" }
11 }
12 }
13}' https://api.withpersona.com/api/v1/importer/list-item/government-id-numbers

The information we support during bulk import for government ID number lists are:

  • id_number
  • id_class

Example CSV

id_number, id_class

200112, dl

Common values for id_class include ‘pp’ for passport and ‘dl’ for driver license. Please contact us if you need help getting id_class values!

Importing IP address lists

If you would like to import many list items at once into an IP address list in Persona, first create the list in the Persona dashboard by selecting “IP address” for the list type. Next, you can upload a CSV of your IP address data.

curl
1API_KEY=YOUR_API_KEY_HERE
2LIST_ID=YOUR_LIST_ID_HERE
3FILE_PATH=CSV_FILE_PATH
4
5curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $API_KEY" -d'{
6 "data": {
7 "type": "importer",
8 "attributes": {
9 "list-id": "'"${LIST_ID}"'",
10 "file": { "data": "'"$(base64 $FILE_PATH)"'", "filename": "$FILE_PATH" }
11 }
12 }
13}' https://api.withpersona.com/api/v1/importer/list-item/ip-addresses

The information we support during bulk import for IP address lists are:

  • value

Example CSV

value

192.168.1.1

Both IPv4 and IPv6 are supported.

Importing name lists

If you would like to import many list items at once into a name list in Persona, first create the list in the Persona dashboard by selecting “Name” for the list type. Next, you can upload a CSV of your name data.

curl
1API_KEY=YOUR_API_KEY_HERE
2LIST_ID=YOUR_LIST_ID_HERE
3FILE_PATH=CSV_FILE_PATH
4
5curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $API_KEY" -d'{
6 "data": {
7 "type": "importer",
8 "attributes": {
9 "list-id": "'"${LIST_ID}"'",
10 "file": { "data": "'"$(base64 $FILE_PATH)"'", "filename": "$FILE_PATH" }
11 }
12 }
13}' https://api.withpersona.com/api/v1/importer/list-item/names

The information we support during bulk import for name lists are:

  • name_first
  • name_last

Example CSV

name_first, name_last

John, Doe

Importing phone number lists

If you would like to import many list items at once into a phone number list in Persona, first create the list in the Persona dashboard by selecting “Phone number” for the list type. Next, you can upload a CSV of your phone number data.

curl
1API_KEY=YOUR_API_KEY_HERE
2LIST_ID=YOUR_LIST_ID_HERE
3FILE_PATH=CSV_FILE_PATH
4
5curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $API_KEY" -d'{
6 "data": {
7 "type": "importer",
8 "attributes": {
9 "list-id": "'"${LIST_ID}"'",
10 "file": { "data": "'"$(base64 $FILE_PATH)"'", "filename": "$FILE_PATH" }
11 }
12 }
13}' https://api.withpersona.com/api/v1/importer/list-item/phone-numbers

The information we support during bulk import for phone number lists are:

  • value

Example CSV

value

+1234567890