# Public Smart Links API

Resolve approved-host app destinations, serve native association documents and confirm instrumented web landings.

Source: https://appportal.io/docs/api/smart-links

Use the ready app environment host shown in **Smart Links** in Dashboard. The
[operation reference](https://appportal.io/docs/api/reference/smart-links) and
[OpenAPI JSON](https://appportal.io/docs/api/contracts/smart-links.json) use `https://{appHost}`; replace the reserved
example with that approved host. Changing a request's host does not approve a domain or grant
management access. Manage domains and destinations through Dashboard or authorized agent tools.

## Choose the right request

| Request | Result |
| --- | --- |
| `GET /{slug}` | Temporary redirect to the configured store or web fallback when the OS has not intercepted the URL |
| `GET /_appportal/resolve/{slug}` | JSON with the applicable installed-app destination and attribution coordinates |
| `GET /.well-known/apple-app-site-association` | Apple association identities for this active host |
| `GET /.well-known/assetlinks.json` | Android association identities for this active host |
| `POST /_appportal/landing` | Non-enumerating confirmation of an instrumented web landing |
| `OPTIONS /_appportal/landing` | The confirmation endpoint's CORS preflight |
| `GET /` | The applicable host or platform fallback redirect |

Resolution accepts an optional `platform=ios` or `platform=android` hint, with case-insensitive names.
Omitting it uses the configured default app destination. Unknown nonempty values return `400`.
An unavailable, inactive or expired link returns `404` from this JSON resolver. Browser requests
instead receive the applicable fallback redirect. Follow link expiry independently from any
previously recorded attribution evidence.

## Native association documents

Association documents return exact registered native identities for the selected active host.
They return `404` when no applicable identity or active owner exists and never redirect to a fallback.
Apple and Android consume different JSON structures; inspect their response schemas and examples.
Android 15+ dynamic components cannot expand the static scope declared in an older Android manifest.

An HTTP document check verifies what AppPortal serves. Also test your application's Universal Links,
App Links and route handling on the relevant devices, as described in
[create and test a Smart Link](https://appportal.io/docs/guides/smart-links).

## Confirm an instrumented web landing

A web redirect can include an `ap_confirmation` endpoint in its query and a separate
`ap_confirmation_id` capability in its fragment. After the destination page loads, send that
capability as the JSON body's `confirmationId` to the supplied endpoint. Keep the capability out
of URLs, logs and analytics. The public `ap_attribution` identifier cannot authorize confirmation.

Confirmation is bound to the stored web redirect and exact host. Replaying it is idempotent.
The endpoint returns the same empty `204` for valid, unknown, invalid or cross-host capabilities,
so the response does not reveal whether stored evidence changed. Its CORS response allows
`POST, OPTIONS` with `Content-Type`; responses use `Cache-Control: no-store`.

## Interpret evidence precisely

A redirect proves a destination was selected and a response issued. A JSON resolution is not
proof of an installation or an accepted app route. A confirmed web landing is separate evidence;
it does not identify a person or establish a conversion. These requests do not grant consent or
replace your application's collection and consent controls.
