> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiyoti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shared links

> Create a visitor link, retrieve shared tracking data, and revoke access.

Shared links let recipients view an asset's tracking information without signing in. Create, list, and delete sharing records with your `AccessKey`. Retrieving a shared asset requires only its `AssetShareID`.

<Warning>
  Anyone with the sharing identifier can retrieve the shared data, including addresses, tracking information, and location history. Give links only to intended recipients and keep identifiers out of public logs.
</Warning>

## Create a link

Call `POST /Assets/CreateSharing` with your `AccessKey` header and a JSON body:

```json theme={null}
{
  "AssetID": "00000000000000000000000000000003"
}
```

A successful request returns:

```json theme={null}
{
  "Code": 200,
  "Message": "Success",
  "AssetShareID": "00000000000000000000000000000006"
}
```

Each successful creation produces a new sharing identifier. Reuse the returned identifier instead of repeatedly creating links for the same recipient. Avoid automatically retrying a creation request if its result is uncertain, as this can create additional links.

## Build the visitor URL

The API returns an identifier, not a complete visitor URL. For direct Aiyoti customers, use:

```text theme={null}
https://app.aiyoti.com/share?id=00000000000000000000000000000006
```

Replace the example identifier with the returned `AssetShareID` and URL-encode it. White-label customers use their assigned application origin instead of `https://app.aiyoti.com`, with the same `/share?id=` path. Confirm that origin with Aiyoti before distributing links.

The visitor application origin is separate from the API base URL, `https://api.aiyoticloud.com`.

## Retrieve shared data

Call the API directly to retrieve data for a sharing identifier:

```text theme={null}
GET https://api.aiyoticloud.com/Assets/GetSharing?AssetShareID=00000000000000000000000000000006
```

No `AccessKey` header is required. The response includes asset name, label and carrier information, current and destination addresses, tracking number, timestamps, status, exception labels, and location history. Location history is returned newest first, with all entries in one response.

Unlike Get asset, the shared response does not return `AssetID`. `Exceptions` is an array of labels, for example:

```json theme={null}
["At Risk"]
```

When no exceptions are set, `Exceptions` is `[]`. An unknown or deleted sharing identifier returns an empty JSON object, `{}`, rather than HTTP `404`.

## List existing links

Call `GET /Assets/GetSharings` with your `AccessKey` header. It returns an array of active sharing records available to your integration, or `[]` when there are none.

Records contain `AssetShareID`, `CreatedOn`, `CreatedBy`, `AssetName`, `AccountName`, `LabelID`, `ActivatedOn`, and `ExpirationDate`. Label and activation details can be null when no label has been activated. Results are returned in one response.

## Expiration and revocation

`ExpirationDate` describes the asset's expiration. It is not a sharing-link expiration deadline. Creating a link does not set a link-expiration deadline. To revoke access, delete the sharing record.

To revoke a link, call `DELETE /Assets/DeleteSharing` with your `AccessKey` header and a JSON body:

```json theme={null}
{
  "AssetShareID": "00000000000000000000000000000006"
}
```

A successful request returns:

```json theme={null}
{"Code":200,"Message":"Success"}
```

The asset remains intact. Subsequent GetSharing requests for the deleted identifier return `{}`. Do not rely on repeated deletion returning the same success response.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.