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
  • 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
      • GETList all Accounts
      • POSTCreate an Account
      • GETRetrieve an Account
      • DELRedact an Account
      • PATCHUpdate an Account
      • POSTAdd tag to an Account
      • POSTConsolidate Accounts
      • GETGet all relations for an Account
      • POSTRemove tag from an Account
      • POSTSet tags on an Account
      • POSTRun an account action
    • Cases
    • Connect
    • Documents
    • Inquiries
    • List Items
    • Lists
    • OAuth
    • Reports
    • Transactions
    • Verifications
    • Workflows
  • Webhooks
LogoLogo
Help CenterOpenAPI SpecStatus
API ReferenceAccounts

Consolidate Accounts

POST
https://api.withpersona.com/api/v1/accounts/:account-id/consolidate
POST
/api/v1/accounts/:account-id/consolidate
$curl -X POST https://api.withpersona.com/api/v1/accounts/account-id/consolidate \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "meta": {
> "source-account-ids": [
> "act_1fVnCte2V9joRjYQ82QX8mPzKYzD",
> "act_zWHTCWmYbjFL4fCQSDF6NqztWXDT"
> ]
> }
>}'
1{
2 "data": {
3 "id": "act_hpNqyAbEG4HeVjZoBRNCMKkA",
4 "attributes": {
5 "reference-id": "abc-123",
6 "account-type-name": "User",
7 "created-at": "2023-09-22T17:13:49.000Z",
8 "updated-at": "2023-09-23T00:22:19.000Z",
9 "fields": {
10 "name": {
11 "type": "hash",
12 "value": {
13 "first": {
14 "type": "string",
15 "value": "Jane"
16 },
17 "middle": {
18 "type": "string",
19 "value": "Marie"
20 },
21 "last": {
22 "type": "string",
23 "value": "Doe"
24 }
25 }
26 },
27 "address": {
28 "type": "hash",
29 "value": {
30 "street_1": {
31 "type": "string",
32 "value": "123 Main St"
33 },
34 "street_2": {
35 "type": "string"
36 },
37 "subdivision": {
38 "type": "string",
39 "value": "California"
40 },
41 "city": {
42 "type": "string",
43 "value": "San Francisco"
44 },
45 "postal_code": {
46 "type": "string",
47 "value": "94111"
48 },
49 "country_code": {
50 "type": "string",
51 "value": "US"
52 }
53 }
54 },
55 "identification_numbers": {
56 "type": "array",
57 "value": [
58 {
59 "type": "hash",
60 "value": {
61 "identification_class": {
62 "type": "string",
63 "value": "visa"
64 },
65 "identification_number": {
66 "type": "string",
67 "value": "12345678"
68 },
69 "issuing_country": {
70 "type": "string",
71 "value": "US"
72 }
73 }
74 },
75 {
76 "type": "hash",
77 "value": {
78 "identification_class": {
79 "type": "string",
80 "value": "visa"
81 },
82 "identification_number": {
83 "type": "string",
84 "value": "87654321"
85 },
86 "issuing_country": {
87 "type": "string",
88 "value": "UK"
89 }
90 }
91 },
92 {
93 "type": "hash",
94 "value": {
95 "identification_class": {
96 "type": "string",
97 "value": "cct"
98 },
99 "identification_number": {
100 "type": "string",
101 "value": "A12345678"
102 },
103 "issuing_country": {
104 "type": "string",
105 "value": "AF"
106 }
107 }
108 }
109 ]
110 },
111 "birthdate": {
112 "type": "date",
113 "value": "1994-12-30"
114 },
115 "phone_number": {
116 "type": "string",
117 "value": "111-222-3333"
118 },
119 "email_address": {
120 "type": "string",
121 "value": "jane@doe.com"
122 },
123 "selfie_photo": {
124 "type": "file"
125 }
126 },
127 "tags": [
128 "tag1",
129 "tag2"
130 ],
131 "birthdate": "1994-12-30",
132 "name-first": "Jane",
133 "name-middle": "Marie",
134 "name-last": "Doe",
135 "phone-number": "111-222-3333",
136 "email-address": "jane@doe.com",
137 "address-street-1": "123 Main St",
138 "address-city": "San Francisco",
139 "address-subdivision": "California",
140 "address-postal-code": "94111",
141 "country-code": "US",
142 "identification-numbers": {
143 "visa": [
144 {
145 "issuing-country": "US",
146 "identification-class": "visa",
147 "identification-number": "12345678",
148 "created-at": "2023-09-23T00:22:09.934Z",
149 "updated-at": "2023-09-23T00:22:19.900Z"
150 },
151 {
152 "issuing-country": "UK",
153 "identification-class": "visa",
154 "identification-number": "87654321",
155 "created-at": "2023-09-23T00:22:09.934Z",
156 "updated-at": "2023-09-23T00:22:19.900Z"
157 }
158 ],
159 "cct": [
160 {
161 "issuing-country": "AF",
162 "identification-class": "cct",
163 "identification-number": "A12345678",
164 "created-at": "2023-09-23T00:22:19.963Z",
165 "updated-at": "2023-09-23T00:22:19.963Z"
166 }
167 ]
168 },
169 "social-security-number": "123-45-6789"
170 },
171 "relationships": {
172 "account-type": {
173 "data": {
174 "id": "acttp_7X5W5w9GMtQntE6oPtKnj44c",
175 "type": "account-type"
176 }
177 }
178 },
179 "type": "account"
180 }
181}
Consolidates several source Accounts' information into one target Account. Any Persona resource associated with the source Account will be transferred over to the destination Account. However, the Account's attributes will **not** be transferred. After consolidation, you can update the destination Account's attributes using the [Account update endpoint](https://docs.withpersona.com/api-reference/accounts/update-an-account). This endpoint can be used to clean up duplicate Accounts. Note: A source account can only be consolidated once. Afterwards, the source account will be archived and unable to be used moving forward - any attempts to create an inquiry attached to the source account will fail.
Was this page helpful?
Previous

Get all relations for an Account

Next
Built with

Consolidates several source Accounts’ information into one target Account. Any Persona resource associated with the source Account will be transferred over to the destination Account. However, the Account’s attributes will not be transferred. After consolidation, you can update the destination Account’s attributes using the Account update endpoint.

This endpoint can be used to clean up duplicate Accounts.

Note: A source account can only be consolidated once. Afterwards, the source account will be archived and unable to be used moving forward - any attempts to create an inquiry attached to the source account will fail.

Authentication

AuthorizationBearer

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

Path parameters

account-idstringRequired
Destination Account ID

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

includestringOptional
A comma-separated list of relationship paths. This can be used to customize which related resources will be fully serialized in the `included` key in the response. See [Serialization](https://docs.withpersona.com/serialization#inclusion-of-related-resources) for more details.
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.

Request

This endpoint expects an object.
metaobjectRequired

Response

This endpoint returns an Account object and (optionally) its related objects in included.

dataobject

An Account object.

Note that fields is not key inflected.

includedlist of objects

Objects that may be returned if specified via the include query parameter in the request.

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.

A comma-separated list of relationship paths. This can be used to customize which related resources will be fully serialized in the included key in the response. See Serialization for more details.

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.