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
OverviewInquiriesTransactionsRelayAPI ReferenceChangelog
OverviewInquiriesTransactionsRelayAPI ReferenceChangelog
  • Getting Started
    • Introduction
    • Quickstart Tutorial
  • API Overview
    • API Keys
    • Authentication
    • Protocol
    • Response Body
    • Idempotence
    • Pagination
    • Rate Limiting
    • Downloading Files
    • API Logs
    • Request IDs
  • Versioning
    • API Changelog
    • Versioning
  • Troubleshooting
    • Error Handling
  • API Reference
    • OpenAPI Specification
    • Cases
    • Connect
    • Documents
    • Inquiries
      • GETList all Inquiries
      • POSTCreate an Inquiry
      • GETRetrieve an Inquiry
      • DELRedact an Inquiry
      • PATCHUpdate an Inquiry
      • POSTAdd tag to an Inquiry
      • POSTApprove an Inquiry
      • POSTDecline an Inquiry
      • POSTMark an Inquiry for manual review
      • POSTExpire an Inquiry
      • POSTGenerate a one-time link for an Inquiry
      • GETPrint Inquiry PDF
      • POSTRemove tag from an Inquiry
      • POSTResume an Inquiry
      • POSTSet tags on an Inquiry
      • POSTPerform Simulate Actions
      • PATCHSet Simulated Data
      • POSTSearch Inquiries
    • List Items
    • Lists
    • OAuth
    • Reports
    • Transactions
    • Verifications
    • Workflows
  • Webhooks
LogoLogo
Help CenterOpenAPI SpecStatus
API ReferenceInquiries

Search Inquiries

POST
https://api.withpersona.com/api/v1/inquiries/search
POST
/api/v1/inquiries/search
$curl -X POST https://api.withpersona.com/api/v1/inquiries/search \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "query": {
> "attribute": "status",
> "operator": "eq",
> "value": "completed"
> },
> "sort": {
> "attribute": "created_at",
> "direction": "asc"
> },
> "page": {
> "size": 15
> }
>}'
1{
2 "data": [
3 {
4 "id": "inq_zEx4jL84ShbUyuwX6AzPSqt6",
5 "attributes": {
6 "status": "pending",
7 "reference-id": "abc-123",
8 "note": "A helpful note",
9 "behaviors": {},
10 "tags": [
11 "tag1",
12 "tag2"
13 ],
14 "creator": "creator@example.com",
15 "reviewer-comment": "This is a comment for this inquiry!",
16 "created-at": "2023-03-29T19:06:45.000Z",
17 "updated-at": "2023-03-30T19:07:01.000Z",
18 "started-at": "2023-03-30T19:07:01.000Z",
19 "expires-at": "2023-03-31T19:07:01.000Z",
20 "completed-at": "2023-03-28T18:35:10.000Z",
21 "failed-at": "2023-03-28T18:35:10.000Z",
22 "marked-for-review-at": "2023-03-28T18:35:10.000Z",
23 "decisioned-at": "2023-03-28T18:35:10.000Z",
24 "expired-at": "2023-03-28T18:35:10.000Z",
25 "redacted-at": "2023-03-28T18:35:10.000Z",
26 "previous-step-name": "start",
27 "next-step-name": "verification_document",
28 "fields": {
29 "birthdate": {
30 "type": "date",
31 "value": "1995-09-08"
32 },
33 "name_first": {
34 "type": "string",
35 "value": "Jane"
36 },
37 "name_middle": {
38 "type": "string",
39 "value": "Marie"
40 },
41 "name_last": {
42 "type": "string",
43 "value": "Doe"
44 },
45 "address_street_1": {
46 "type": "string",
47 "value": "123 Main St"
48 },
49 "address_street_2": {
50 "type": "string",
51 "value": null
52 },
53 "address_city": {
54 "type": "string",
55 "value": "San Francisco"
56 },
57 "address_subdivision": {
58 "type": "string",
59 "value": "California"
60 },
61 "address_postal_code": {
62 "type": "string",
63 "value": "94111"
64 },
65 "address_country_code": {
66 "type": "string",
67 "value": "US"
68 },
69 "email_address": {
70 "type": "string",
71 "value": "jane@doe.com"
72 },
73 "phone_number": {
74 "type": "string",
75 "value": null
76 },
77 "identification_number": {
78 "type": "string",
79 "value": null
80 }
81 }
82 },
83 "relationships": {
84 "account": {
85 "data": {
86 "id": "act_n2uq9eKMboaCQzu9ALWYcVdN",
87 "type": "account"
88 }
89 },
90 "documents": {
91 "data": []
92 },
93 "template": {
94 "data": {}
95 },
96 "inquiry-template": {
97 "data": {
98 "id": "itmpl_p8ANAJy9iqadm2buF2xcVgqH",
99 "type": "inquiry-template"
100 }
101 },
102 "inquiry-template-version": {
103 "data": {
104 "id": "itmplv_iXhqfNWqwYLAWs9G8Fm8hPfo",
105 "type": "inquiry-template-version"
106 }
107 },
108 "reports": {
109 "data": []
110 },
111 "reviewer": {
112 "data": {}
113 },
114 "selfies": {
115 "data": []
116 },
117 "sessions": {
118 "data": []
119 },
120 "verifications": {
121 "data": [
122 {
123 "id": "ver_uHDiwtcx3htjajvEaeMjPQcE",
124 "type": "verification/database"
125 }
126 ]
127 }
128 },
129 "type": "inquiry"
130 }
131 ],
132 "links": {
133 "prev": "/api/v1/inquiries/search?page%5Bbefore%5D=inq_ABC123&page%5Bsize%5D=10",
134 "next": "/api/v1/inquiries/search?page%5Bafter%5D=inq_ByBdXDqUrguLAHjGZMuDZLCx&page%5Bsize%5D=10"
135 }
136}
Search for inquiries using a flexible query language. ## Search vs. List Endpoints The Search and List endpoints serve different purposes and have distinct performance characteristics. Use the **Search** endpoint (`POST /inquiries/search`) when you need to perform complex queries with boolean logic (AND/OR/NOT), filter on multiple statuses simultaneously, or apply multiple conditions at once. Search is optimized for flexible querying and is faster than paginating through all resources when looking for specific records. Use the **List** endpoint (`GET /inquiries`) for simple listing with basic filters like reference ID. ## Data Freshness Do not use search for read-after-write flows because the data will not be immediately available to search. Under normal operating conditions, data is searchable within approximately 1 minute of creation or modification. Propagation of new or updated data could be delayed during an outage. For workflows that require immediate data availability after creating or updating an inquiry, use the List Inquiries endpoint instead. ### Searchable Attributes The following attributes can be used in query predicates: | Attribute | Description | |-----------|-------------| | `status` | Inquiry status (e.g., `pending`, `completed`, `approved`, `declined`) | | `created_at` | Inquiry creation timestamp | | `updated_at` | Inquiry last updated timestamp | | `reference_id` | Reference ID associated with the inquiry's account | | `inquiry_template_id` | Inquiry template ID (e.g., `itmpl_ABC123`) |
Was this page helpful?
Previous

List all Inquiry Sessions

Next
Built with

Search for inquiries using a flexible query language.

Search vs. List Endpoints

The Search and List endpoints serve different purposes and have distinct performance characteristics.

Use the Search endpoint (POST /inquiries/search) when you need to perform complex queries with boolean logic (AND/OR/NOT), filter on multiple statuses simultaneously, or apply multiple conditions at once. Search is optimized for flexible querying and is faster than paginating through all resources when looking for specific records.

Use the List endpoint (GET /inquiries) for simple listing with basic filters like reference ID.

Data Freshness

Do not use search for read-after-write flows because the data will not be immediately available to search. Under normal operating conditions, data is searchable within approximately 1 minute of creation or modification. Propagation of new or updated data could be delayed during an outage. For workflows that require immediate data availability after creating or updating an inquiry, use the List Inquiries endpoint instead.

Searchable Attributes

The following attributes can be used in query predicates:

AttributeDescription
statusInquiry status (e.g., pending, completed, approved, declined)
created_atInquiry creation timestamp
updated_atInquiry last updated timestamp
reference_idReference ID associated with the inquiry’s account
inquiry_template_idInquiry template ID (e.g., itmpl_ABC123)

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

Key-InflectionenumOptional
Determines casing for the API response.
Allowed values:
Idempotency-KeystringOptional
Ensures the request is idempotent.
Persona-VersionenumOptional
Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning).

Query parameters

fieldsmap from strings to stringsOptional
Comma-separated list(s) of attributes to include in the response. This can be used to customize which attributes will be serialized in the response. See [Serialization](https://docs.withpersona.com/serialization#sparse-fieldsets) for more details.
pageobjectOptional

Request

This endpoint expects an object.
queryobjectOptional

Search query using boolean logic (AND/OR/NOT) and comparison operators. Supports predicates with operators: eq (equal), gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal).

sortobjectOptional
Sort configuration for results
pageobjectOptional
Pagination parameters

Response

This endpoint returns a collection of Inquiry objects matching the search criteria.
datalist of objects
An array of Inquiries matching the search criteria
linksobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error

Server API version. More info on versioning can be found here.

Comma-separated list(s) of attributes to include in the response. This can be used to customize which attributes will be serialized in the response. See Serialization for more details.