For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterOpenAPI SpecStatus
OverviewInquiriesTransactionsAPI ReferenceChangelog
OverviewInquiriesTransactionsAPI ReferenceChangelog
  • Overview
    • Introduction
    • How Persona Works
    • Security
    • Environments
  • Sending data to Persona
    • Choose an Integration Method
    • Inquiries
    • Transactions
  • Retrieving data from Persona
    • API Reference
    • Understanding a Persona API Payload
  • Additional Persona products
    • Cases
    • Events
      • Overview
      • Reports Cookbook
LogoLogo
Help CenterOpenAPI SpecStatus
On this page
  • Run your first report
  • Get the results of a report
Additional Persona productsReports

Reports Cookbook

Was this page helpful?
Previous

Verifications

Next
Built with

This doc provides recipes for running reports via API. Note that reports can also be run from the Persona dashboard.

Learn more in the Reports API documentation

Run your first report

Create your first report by creating a POST request to the reports resource:

curl
1API_KEY=YOUR_API_KEY_HERE
2curl -X POST -H 'Content-Type: application/json' \
3 -H "Authorization: Bearer $API_KEY" -d'{
4 "data": {
5 "attributes": {
6 "report-template-id": YOUR_TEMPLATE_ID,
7 }
8 }
9}' https://withpersona.com/api/v1/reports

After you submit the request, your report is processed as soon as possible. This usually happens within a second.

The HTTP response will include a report ID that you can use to poll for the report result:

json
1{
2 "data": {
3 "type": "report/watchlist",
4 "id": "rep_yourfirstreportid",
5 "attributes": {
6 "status": "pending",
7 "..." : "..."
8 }
9 }
10}

Get the results of a report

Fetch the results of a report using the report ID:

curl
1API_KEY=YOUR_API_KEY_HERE
2curl -X GET -H 'Content-Type: application/json' \
3 -H "Authorization: Bearer $API_KEY" \
4 https://withpersona.com/api/v1/reports/YOUR_REPORT_ID_HERE

Once the report status is ready, the results will be available in the response:

json
1{
2 "data": {
3 "type: "report/watchlist",
4 "id": "rep_yourfirstreportid",
5 "attributes": {
6 "status": "ready",
7 ...
8 }
9 }
10}