> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpersona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server.

# Redeem a Share Token

POST https://api.withpersona.com/api/v1/connect/share-tokens/{share-token-id}/redeem
Content-Type: application/json

Initiates redemption of a Share Token in one of two modes:

- **Clone:** Omit `data.attributes.destination-id` to create a new object from the source.
  Inquiry and Verification Share Tokens can be cloned.
- **Hydrate:** Provide `data.attributes.destination-id` to import source data into an existing
  object. Account, Transaction, and Inquiry Share Tokens can hydrate an existing Account,
  Transaction, or Inquiry.

Redemption is asynchronous. A successful request returns the Share Token with a `pending`
status while Persona processes the import.


Reference: https://docs.withpersona.com/api-reference/connect/share-tokens/redeem-share-token

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `share-token-id` (string, required) — The token/ID of the Share Token to be redeemed.

### Query parameters

- `include` (string, optional) — 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.
- `fields` (map from string to string, optional) — 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.

### Headers

- `Key-Inflection` (enum, optional) — Determines casing for the API response.
  - Allowed values: `camel`, `kebab`, `snake`
- `Idempotency-Key` (string, optional) — Ensures the request is idempotent.
- `Persona-Version` (enum, optional) — Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning).
  - Allowed values: `2025-12-08`, `2025-10-27`, `2023-01-05`, `2022-09-01`, `2021-08-18`, `2021-07-05`, `2021-02-21`, `2020-05-18`

### Body (application/json)

This endpoint expects an object.

- `data` (ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaData, optional)
- `meta` (ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaMeta, optional)

## Response

### 202

Share Token redemption has been initiated and is processing.

- `data` (connect-share-token, required) — A Share Token resource. The specific attributes and relationships included may vary based on the requesting organization's context.
- `included` (list of any, optional) — Excluded from the response by default. Will be an empty array when the `include` query parameter in the request was explicitly set to empty.

## Errors

### 400 Bad Request Error

The request was unacceptable, often due to invalid parameters.

- `errors` (list of ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 401 Unauthorized Error

An invalid API key was provided.

- `errors` (list of ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 403 Forbidden Error

The given API key doesn’t have permissions to perform the request or a quota has been exceeded.

- `errors` (list of ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 404 Not Found Error

The requested resource doesn’t exist.

- `errors` (list of ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 409 Conflict Error

The request conflicts with another request, often due to attempting to create a duplicate resource.

- `errors` (list of ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 422 Unprocessable Entity Error

The request modifies the resource in an unacceptable way, often due to an invalid action or parameter.

- `errors` (list of ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 429 Too Many Requests Error

Your organization’s rate limit has been exceeded. We recommend an exponential backoff on requests.

- `errors` (list of ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

## Types

### ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaData

- `attributes` (ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaDataAttributes, optional)

### ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaMeta

- `field-mappings` (list of ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaMetaFieldMappingsItems, optional) — Optional list of field mappings to apply when hydrating an existing destination. If a source field name matches the destination field name, it is copied directly. These mappings are applied for fields not already matched by name. Field mappings are not used when cloning; omit them from clone requests.

### connect-share-token

A Share Token resource. The specific attributes and relationships included may vary based on the requesting organization's context.

- `type` ("connect/share-token", optional)
- `id` (string, optional)
- `attributes` (ConnectShareTokenAttributes, optional)
- `relationships` (ConnectShareTokenRelationships, optional)

### ConnectShareTokensShareTokenIdRedeemPostResponsesContentApplicationJsonSchemaErrorsItems

- `title` (string, optional)
- `details` (string, optional)

### ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaDataAttributes

- `destination-id` (string, optional) — The ID of the existing destination object to hydrate. Omit this field, or the entire request body, to clone the source into a new destination object.

### ConnectShareTokensShareTokenIdRedeemPostRequestBodyContentApplicationJsonSchemaMetaFieldMappingsItems

- `source-field-name` (string, required) — The name of the field in the source object.
- `destination-field-name` (string, required) — The name of the field in the destination object.

### ConnectShareTokenAttributes

- `status` (string, optional) — The status of the share token. One of `created`, `pending`, `redeemed`, `expired`, or `failed`.
- `direction` (string, optional) — Whether this share token is outbound (your organization is the source) or inbound (your organization is the destination). One of `outbound` or `inbound`.
- `created-at` (datetime, optional) — When this share token was created
- `updated-at` (datetime, optional) — When this share token was last updated
- `pending-at` (datetime, optional, nullable) — When this share token started processing
- `redeemed-at` (datetime, optional, nullable) — When this share token was redeemed
- `expires-at` (datetime, optional, nullable) — When this share token expires
- `failed-at` (datetime, optional, nullable) — When this share token failed
- `failure-reason` (string, optional, nullable) — The reason the share token failed, if applicable. One of `source_not_found`, `source_redacted`, `import_failed`, or `unrecoverable_error`.
- `redeem-mode` (string, optional, nullable) — How this Share Token was redeemed. Set to `hydrate` when `destination-id` is provided or `clone` when `destination-id` is omitted. Null until redemption is initiated.
- `source-data` (source-data, optional) — PII-filtered snapshot of the share token's source object. Present only when `peek-source-data=true` was passed on the show endpoint, the caller is the destination organization, and the destination organization has access to the source data peek capability. Omitted from list responses.

### ConnectShareTokenRelationships

- `connection` (ConnectShareTokenRelationshipsConnection, optional)
- `creator` (ConnectShareTokenRelationshipsCreator, optional)
- `source` (ConnectShareTokenRelationshipsSource, optional) — The object from which the shared data originated.
- `destination` (ConnectShareTokenRelationshipsDestination, optional) — The destination object associated with redemption. For hydration, this is the object specified by `destination-id`. For cloning, no destination is set until Persona creates the destination object.

### source-data

A PII-filtered snapshot of a Share Token's source object. `type` discriminates the underlying source-object type and dispatches to the matching per-subclass schema; see each subschema for shape details.

- `type`: `connect/source-data/inquiry` (Inquiry Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (SourceDataInquiryPeekableAttributes, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
  - `related-objects` (list of source-data-related-object, optional) — Filtered snapshots of source objects related to this inquiry (e.g. attached verifications, the linked account). Each entry is itself a source-data envelope discriminated by its specific subtype.
- `type`: `connect/source-data/verification/database` (Database Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/verification/phone-number` (Phone Number Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/verification/email-address` (Email Address Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/account` (Account Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (SourceDataAccountPeekableAttributes, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/txn` (Txn Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (SourceDataTxnPeekableAttributes, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/report/watchlist` (Watchlist Report Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.

### ConnectShareTokenRelationshipsConnection

- `data` (ConnectShareTokenRelationshipsConnectionData, optional)

### ConnectShareTokenRelationshipsCreator

- `data` (ConnectShareTokenRelationshipsCreatorData, optional)

### ConnectShareTokenRelationshipsSource

The object from which the shared data originated.

- `data` (ConnectShareTokenRelationshipsSourceData, optional)

### ConnectShareTokenRelationshipsDestination

The destination object associated with redemption. For hydration, this is the object specified by `destination-id`. For cloning, no destination is set until Persona creates the destination object.

- `data` (ConnectShareTokenRelationshipsDestinationData, optional, nullable)

### SourceDataInquiryPeekableAttributes

Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.

- `fields` (map from string to source-data-peekable-attribute, optional) — Nested bag of standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields). Each entry is a `{visibility, value}` wrapper. The set of keys varies by the inquiry template and by the source organization's PII-share configuration; clients should handle unknown keys defensively.

### source-data-related-object

- `type`: `connect/source-data/verification/database` (Database Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/verification/phone-number` (Phone Number Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/verification/email-address` (Email Address Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/verification/government-id` (Government ID Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/verification/selfie` (Selfie Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/verification/document` (Document Verification Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (map from string to source-data-peekable-attribute, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.
- `type`: `connect/source-data/account` (Account Source Data)
  - `id` (string, optional) — The underlying source object's token.
  - `peekable-attributes` (SourceDataAccountPeekableAttributes, optional) — Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.

### source-data-peekable-attribute

Wrapper for a single peekable attribute. `visibility` discriminates between two cases: - `full`: the source organization's PII-share configuration exposes the attribute's value; `value` holds the raw value (any JSON type). - `presence`: the source organization exposes only the attribute's presence; `value` is a boolean indicating whether the underlying field has a non-null value on the source. Integrators should branch on `visibility` first, then read `value` accordingly.

### SourceDataAccountPeekableAttributes

Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.

- `fields` (map from string to source-data-peekable-attribute, optional) — Nested bag of standard and custom user-space fields (e.g. `name-first`, `name-last`, org-defined fields). Each entry is a `{visibility, value}` wrapper. The set of keys varies by the account type and by the source organization's PII-share configuration; clients should handle unknown keys defensively.

### SourceDataTxnPeekableAttributes

Bag of source-object attributes exposed to the destination organization per the source organization's PII-share configuration. Each scalar entry (e.g. `status`, `country-code`, `id-class`) is a `{visibility, value}` wrapper; see `source-data-peekable-attribute.yaml`. Inquiry, Account, and Txn subtypes additionally expose a nested `fields` sub-bucket containing standard and custom user-space fields (e.g. `name-first`, `birthdate`, org-defined fields); verification subtypes do not. The source object's `status` (when applicable to the subtype) appears here as a peekable attribute, not as a top-level scalar. Entries stripped entirely by the configuration are omitted from the bag. The concrete shape — including which subtypes expose `fields` — is declared per-subtype.

- `fields` (map from string to source-data-peekable-attribute, optional) — Nested bag of standard and custom user-space fields (e.g. `amount`, org-defined fields). Each entry is a `{visibility, value}` wrapper. The set of keys varies by the txn type and by the source organization's PII-share configuration; clients should handle unknown keys defensively.

### ConnectShareTokenRelationshipsConnectionData

- `type` ("connect/connection", optional)
- `id` (string, optional)

### ConnectShareTokenRelationshipsCreatorData

- `type` (string, optional)
- `id` (string, optional)

### ConnectShareTokenRelationshipsSourceData

- `type` (string, optional)
- `id` (string, optional)

### ConnectShareTokenRelationshipsDestinationData

- `type` (string, optional)
- `id` (string, optional)

### SourceDataPeekableAttribute0

- `visibility` ("full", required)
- `value` (map from string to any, required) — Raw attribute value as exposed by the source organization. Any JSON type.

### SourceDataPeekableAttribute1

- `visibility` ("presence", required)
- `value` (boolean, required) — True if the underlying field on the source has a non-null value; false if it is null.

## Examples

### Clone an object

**Request**

```json
{
  "data": {
    "attributes": {}
  }
}
```

**Response**

```json
{
  "data": {
    "type": "connect/share-token",
    "id": "cnst_ABC123",
    "attributes": {
      "status": "pending",
      "direction": "inbound",
      "created-at": "2023-08-17T23:18:13.000Z",
      "updated-at": "2023-08-17T23:25:00.000Z",
      "pending-at": "2023-08-17T23:25:00.000Z",
      "redeemed-at": null,
      "expires-at": null,
      "failed-at": null,
      "failure-reason": null,
      "redeem-mode": "clone"
    },
    "relationships": {
      "connection": {
        "data": {
          "type": "connect/connection",
          "id": "cxn_ABC123"
        }
      },
      "destination": {
        "data": null
      }
    }
  }
}
```

**SDK Code**

```python Clone an object
import requests

url = "https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem"

payload = { "data": { "attributes": {} } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Clone an object
const url = 'https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":{"attributes":{}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Clone an object
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem"

	payload := strings.NewReader("{\n  \"data\": {\n    \"attributes\": {}\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Clone an object
require 'uri'
require 'net/http'

url = URI("https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"attributes\": {}\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Clone an object
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"attributes\": {}\n  }\n}")
  .asString();
```

```php Clone an object
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem', [
  'body' => '{
  "data": {
    "attributes": {}
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Clone an object
using RestSharp;

var client = new RestClient("https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"attributes\": {}\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Clone an object
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": ["attributes": []]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/connect/share-tokens/cnst_ABC123/redeem")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Hydrate an object

**Request**

```json
{
  "data": {
    "attributes": {
      "destination-id": "inq_XYZ789"
    }
  }
}
```

**Response**

```json
{
  "data": {
    "type": "connect/share-token",
    "id": "cnst_DEF456",
    "attributes": {
      "status": "pending",
      "direction": "inbound",
      "created-at": "2023-08-17T23:18:13.000Z",
      "updated-at": "2023-08-17T23:25:00.000Z",
      "pending-at": "2023-08-17T23:25:00.000Z",
      "redeemed-at": null,
      "expires-at": null,
      "failed-at": null,
      "failure-reason": null,
      "redeem-mode": "hydrate"
    },
    "relationships": {
      "connection": {
        "data": {
          "type": "connect/connection",
          "id": "cxn_ABC123"
        }
      },
      "destination": {
        "data": {
          "type": "inquiry",
          "id": "inq_XYZ789"
        }
      }
    }
  }
}
```

**SDK Code**

```python Hydrate an object
import requests

url = "https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem"

payload = { "data": { "attributes": { "destination-id": "inq_XYZ789" } } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Hydrate an object
const url = 'https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":{"attributes":{"destination-id":"inq_XYZ789"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Hydrate an object
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem"

	payload := strings.NewReader("{\n  \"data\": {\n    \"attributes\": {\n      \"destination-id\": \"inq_XYZ789\"\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Hydrate an object
require 'uri'
require 'net/http'

url = URI("https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"attributes\": {\n      \"destination-id\": \"inq_XYZ789\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Hydrate an object
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"attributes\": {\n      \"destination-id\": \"inq_XYZ789\"\n    }\n  }\n}")
  .asString();
```

```php Hydrate an object
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem', [
  'body' => '{
  "data": {
    "attributes": {
      "destination-id": "inq_XYZ789"
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Hydrate an object
using RestSharp;

var client = new RestClient("https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"attributes\": {\n      \"destination-id\": \"inq_XYZ789\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Hydrate an object
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": ["attributes": ["destination-id": "inq_XYZ789"]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/connect/share-tokens/cnst_DEF456/redeem")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```