# Deep Link Integration

Treasure AI Voice can be launched from a deep link in another app or file. The link's query parameters are saved as external metadata on the resulting recording, keeping references to related business records with the conversation.

## Prerequisites

- Install the Treasure AI Voice mobile app on the phone that opens the deep link.
- Sign in to the app and pair a supported PLAUD device with your account.
- Create a link in the format below and place it in the app or file where users will open it.


## Create a deep link

Use the `treasureaivoice://recording` scheme and add each metadata key and value as a query parameter:

```text
treasureaivoice://recording?recordRef=REC7A91&sessionRef=SES42&interactionType=sales
```

The link above passes a record reference, a session reference, and an interaction type to the recording. `recordRef` and `sessionRef` are example keys an external system can use to associate a recording with its own data; `interactionType` adds descriptive context. Define the keys and values to match the app or workflow that creates the link.

Both keys and values must contain only ASCII letters (`A-Z`, `a-z`) and digits (`0-9`). Keys must be 1–50 characters, and values must be 1–128 characters. A link can contain up to 10 key-value pairs. Spaces, punctuation, underscores, and non-ASCII characters are not valid.

If the link contains invalid metadata, Treasure AI Voice rejects it and does not start a recording from that link.

## Start a recording

1. Open the link from another app or file on the phone with Treasure AI Voice installed.
2. If the paired PLAUD device is connected, Treasure AI Voice starts recording and associates the link's metadata with the recording.
3. If the device is not connected yet, the app keeps the metadata in the current app session. After the device connects, tap **Start Recording** to create a recording with that metadata.


Pending metadata is not retained after an app restart
If Treasure AI Voice restarts before the recording begins, the pending metadata is lost. Open the deep link again to pass the metadata to a recording.

## View and export metadata

The AI Voice Console displays external metadata on the **Recordings** page. Treasure Data CDP exports include the metadata in the `external_metadata` column of the `recordings` table as a JSON string. For the full export schema, see [Treasure Data CDP Integration](/products/ai-voice/cdp-integration#recordings).