Creating Share Tokens

Create Share Tokens for Destination Organizations

Source Organizations can create Share Tokens to share end user data with data sharing partners (Destination Organizations). Destination Organizations can use Share Tokens to copy and verify the end user’s data.

Source Organizations can create Share Tokens via API, Dashboard, or Workflows.


Creating Share Tokens via API

To create a Share Token via API, the Source Organization provides the Connection ID and a Source ID. The connection-id specifies which partner organization can access the specified source-id, and only that partner organization is able to redeem the created Share Token. The source-id must be an Inquiry ID.

Create a Share Token
$curl -X POST https://api.withpersona.com/api/v1/connect/share-tokens \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "data": {
> "attributes": {
> "connection-id": "cxn_ABC123",
> "source-id": "inq_ABC123"
> }
> }
> }'
Share Token
1{
2 "data": {
3 "type": "connect/share-token",
4 "id": "cnst_ABC123",
5 "attributes": {
6 "status": "created",
7 "created-at": "2025-10-14T22:36:51.907Z",
8 "updated-at": "2025-10-14T22:36:51.907Z",
9 "pending-at": null,
10 "redeemed-at": null,
11 "expires-at": null
12 },
13 "relationships": {
14 "connect-connection": {
15 "data": {
16 "type": "connect/connection",
17 "id": "cxn_ABC123"
18 }
19 },
20 "creator": {
21 "data": { "type": "api-key", "id": "api_ABC123" }
22 },
23 "source": {
24 "data": { "type": "inquiry", "id": "inq_ABC123" }
25 }
26 }
27 }
28}

Creating Share Tokens via Dashboard

Source Organizations can also create Share Tokens using their Dashboard under the Connect > Share Tokens page. This can be helpful for testing and one-off data shares. Creating the Share Token requires selecting a Connection and providing an Inquiry ID. Only the specified Destination Organization will be able to redeem the Share Token, and the Source ID must be an Inquiry ID.

connect-create-share-token
Create a Share Token via the Dashboard

Creating Share Tokens via Workflows

Source Organizations can use Workflows to automate Share Token creation. For example, the Source Organization can use a Workflow to automatically create a Share Token upon Inquiry completion. Similarly, the Destination Organization can use a Workflow to automatically redeem the created Share Token. This can be helpful for integrating into Connect with minimal developement work.

connect-create-share-token
Create a Share Token via a Workflow

Sending Share Tokens to Destination Organizations

After creating a Share Token, the Source Organization can send it to the Destination Organization using the Destination Organization’s API or SDK, or another secure channel. Alternatively, the Destination Organization can use a Workflow to automatically get notified about and redeem Share Tokens when they are created.


Outbound Share Token Events

Source Organizations receive the following events related to Share Tokens. These events can be used to trigger Webhooks and Workflows.

  • connect/share-token.outbound-created — Occurs in the Source Organization when it creates a Share Token for a Destination Organization. Use this event to confirm creation and notify downstream systems.
  • connect/share-token.outbound-redeemed — Occurs in the Source Organization when the Destination Organization’s Share Token redemption has finished. At this point, the Share Token’s status is redeemed.