Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Appy Client API
version: 1.0.0
summary: Create and manage smart links, read click statistics, connect AI assistants over MCP, and power the Appy mobile SDKs.
contact:
name: Appy support
url: https://appy.to/support
email: contact@appy.to
description: 'The Appy API has two audiences. **Your servers** use it to create and manage smart links, read their statistics and register the
mobile apps that use the Appy SDK. Everything the dashboard does with links, you can do from a CI
pipeline, a CMS hook or an internal tool. **Your AI assistants** get the same abilities through the Appy MCP server at `https://mcp.appy.to`:
Claude, Cursor, VS Code, Windsurf and other MCP clients can create and edit links and read their
statistics with a secret key. **Your mobile apps** talk to the two `/v1/sdk` endpoints through the Appy iOS and Android SDKs. You normally never call those endpoints yourself; they are documented so you can audit exactly
what the SDKs send. ## Quick start
```bash
curl https://api.appy.to/v1/links \
-H "Authorization: Bearer appy_sk_..." \
-H "Content-Type: application/json" \
-d ''{
"slug": "spring-sale",
"fallbackUrl": "https://acme.com/spring",
"deeplinkUrl": "acme://sale/spring",
"targets": {
"iphone": "https://apps.apple.com/app/id123456789",
"android": "https://play.google.com/store/apps/details?id=com.acme.shop"
}
}''
```
The response contains the short link (`https://appy.to/spring-sale`). iPhones go to the App Store
target, Android phones to Google Play, everything else to `fallbackUrl`. When `deeplinkUrl` is set,
phones first try to open the app and fall back to the store if it is not installed. ## Authentication
Every request carries one credential in the `Authorization` header:
```
Authorization: Bearer
```
| Credential | Looks like | Use it for | Where it lives |
|---|---|---|---|
| Secret key | `appy_sk_` + 40 characters | Links, statistics, apps | Your servers only. Never ship it in an app or a web page. |
| Publishable key | `appy_pk_` + 32 characters | `/v1/sdk/*` only | Inside your mobile app. It is public by design. |
| Dashboard session | a JWT, or the `accessToken` cookie | Everything except `/v1/sdk/*`; the only credential that can create or revoke secret keys | Your signed-in Appy session. |
Create a secret key in the dashboard (API keys page) or with `POST /v1/api-keys` while signed in to
Appy. Secret keys, the `/v1` link and statistics endpoints and the MCP server need the Business or
Enterprise plan; every plan can list and revoke its keys. The full key is returned
exactly once; Appy stores only a SHA-256 hash of it. An account can hold 10 active keys. A publishable
key is issued automatically when you register an app with `POST /v1/apps`. A secret key acts on behalf of the account that created it and inherits that account''s plan: the same
link limits and feature rules apply to the API as to the dashboard. ## Errors
Errors use conventional HTTP status codes and always have the same body:
```json
{
"error": {
"code": "validation_failed",
"message": "fallbackUrl must be a valid http(s) URL",
"requestId": "4b6f1c2e-7c1a-4bd6-9f36-2f1f0f7b8c11"
}
}
```
| Status | `code` | Meaning |
|---|---|---|
| 400 | `invalid_request` | The body is not valid JSON, has the wrong shape, or contains an unknown field. |
| 400 | `validation_failed` | The JSON is well formed but a value is not acceptable. `message` names the field. |
| 401 | `unauthorized` | Missing, malformed, unknown or revoked credential. |
| 403 | `forbidden` | The credential is valid but not allowed on this endpoint (for example a publishable key on `/v1/links`). |
| 403 | `plan_required` | The feature needs a higher plan. |
| 403 | `limit_reached` | A plan or account limit is exhausted (links, API keys, apps, custom domains). |
| 404 | `not_found` | The resource does not exist or belongs to another account. |
| 409 | `conflict` | The slug, subdomain or custom domain hostname is already taken. |
| 429 | `rate_limited` | Too many requests. Wait for the `Retry-After` seconds. |
| 500 | `internal_error` | Something failed on Appy''s side. Retrying is safe for reads. |
| 503 | `service_unavailable` | A dependency is temporarily down. Retry with backoff.'
x-logo:
url: https://appy.to/assets/appylogo.svg
altText: Appy
servers:
- url: https://api.appy.to
description: Production
security:
- secretKey: []
- dashboardSession: []
tags:
- name: Client API
description: 'The two endpoints an app calls with its publishable key. The Appy iOS and Android SDKs use them,
and any other runtime can call them directly: React Native, Flutter, Unity, a web view or your own
code. Unknown request fields are ignored so older servers accept newer clients.'
paths:
/v1/sdk/open:
post:
tags:
- Client API
operationId: sdkOpen
summary: Report an app open and resolve its deep link
description: 'The SDK calls this once per cold start and again whenever the app is opened through an Appy
link. The response carries the deep link to open, if any, and on the first launch the install''s
attribution.
* Opened through an Appy link (a Universal Link, an App Link, or a custom-scheme deep link that
the link page tagged with `appy_click_id`): `deepLink` is that link with `isDeferred: false`.
* First launch without a link: Appy matches the install to the link the user clicked before
installing, using the store''s install referrer on Android where there is one. A match returns
`deepLink` with `isDeferred: true` and an `attributed` attribution; otherwise `deepLink` is null
and the attribution is `organic`. Apps with strict attribution only count installs Appy can
verify; everything else is organic.
* Later launches without a link: `deepLink` and `attribution` are null.
Link URLs are recognised on `appy.to`, on the app''s link domain (`.appy.to`) and on an
active custom domain assigned to the app (`PATCH /v1/domains/{domainId}` with `appId`).
A first launch that was already answered returns the same answer again, so retries are safe.
With `trackingEnabled: false` nothing is stored, no deferred matching runs, only an explicit
`url` is resolved, and `attribution` is null.'
security:
- publishableKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SdkOpenRequest'
examples:
deferredAndroid:
summary: First launch on Android
value:
installId: 7f0c2b9e-3a61-4c2e-9d0b-5c1e8f2a9b10
firstLaunch: true
installReferrer: utm_source=google-play&appy_slug=spring&appy_click_id=h3k9x2m4q8w1z7c5v6b0n2p4r6
trackingEnabled: true
device:
platform: android
osVersion: '14'
model: Pixel 8
locale: en_US
app:
bundleId: com.acme.shop
version: 2.3.1
build: '231'
sdkVersion: 1.0.0
universalLink:
summary: Opened through a Universal Link
value:
installId: 7f0c2b9e-3a61-4c2e-9d0b-5c1e8f2a9b10
firstLaunch: false
url: https://acme.appy.to/spring?item=42
device:
platform: ios
osVersion: 17.5.1
model: iPhone15,2
locale: en_US
app:
bundleId: com.acme.shop
version: 2.3.1
build: '231'
sdkVersion: 1.0.0
responses:
'200':
description: The deep link and, on the first launch, the attribution.
content:
application/json:
schema:
$ref: '#/components/schemas/SdkOpenResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/PlanOrLimit'
'429':
$ref: '#/components/responses/RateLimited'
/v1/sdk/events:
post:
tags:
- Client API
operationId: sdkEvents
summary: Record in-app events
description: 'Up to 100 events per request. `id` is the event''s deduplication key for the app, shared with
server-side events, so resending a batch after a timeout is safe and a purchase reported by both
the app and your backend with the same store transaction id is counted once. Timestamps more than 30 days in the past or more than an hour in the future are
replaced with the time Appy received the event.
An invalid event does not fail the batch: it is listed in `rejected` and the valid events are
stored. Only a structural problem (missing `installId`, no events, more than 100 events) fails the
whole request with `400`.'
security:
- publishableKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SdkEventBatch'
example:
installId: 7f0c2b9e-3a61-4c2e-9d0b-5c1e8f2a9b10
events:
- id: 0b8e8d2a-4a53-4b71-9a0e-7f1f2f0c1a22
name: purchase
timestamp: '2026-09-25T10:06:00.123Z'
properties:
sku: A1
qty: 2
gift: false
revenue: 19.98
currency: USD
userId: u_123
responses:
'202':
description: Accepted.
content:
application/json:
schema:
$ref: '#/components/schemas/SdkEventResult'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/PlanOrLimit'
'429':
$ref: '#/components/responses/RateLimited'
components:
headers:
RateLimitReset:
description: Unix time in seconds when the window resets.
schema:
type: integer
example: 1790330460
RateLimitRemaining:
description: Requests left in the current window.
schema:
type: integer
example: 598
RateLimitLimit:
description: Requests allowed in the current one-minute window.
schema:
type: integer
example: 600
RetryAfter:
description: Seconds to wait before retrying.
schema:
type: integer
example: 12
schemas:
SdkOpenRequest:
type: object
required:
- installId
- firstLaunch
- device
properties:
installId:
type: string
pattern: ^[A-Za-z0-9-]{8,64}$
description: Random identifier created by the SDK on first launch and kept until the app is uninstalled.
firstLaunch:
type: boolean
description: True until the first open of this install has been acknowledged.
url:
type: string
maxLength: 2048
description: The URL that opened the app, if any.
installReferrer:
type: string
maxLength: 2048
description: Android only. The raw install referrer of the store that installed the app
sent on first launch.: null
installReferrerSource:
type: string
pattern: ^[a-z0-9_]{1,32}$
description: Android only. Which store provided `installReferrer`, for example `google_play` or `huawei_appgallery`.
appleAdsToken:
type: string
maxLength: 4096
description: iOS only. The AdServices attribution token (`AAAttribution.attributionToken()`), sent on first launch.
metaInstallReferrer:
type: object
description: Android only. The row the Facebook, Instagram or Facebook Lite app returned for the Meta Install Referrer, sent on first launch.
properties:
installReferrer:
type: string
maxLength: 8192
description: The `install_referrer` column as returned.
isClickThrough:
type: boolean
description: The `is_ct` column.
actualTimestamp:
type: integer
description: The `actual_timestamp` column
Unix seconds.: null
sourceApp:
type: string
enum:
- facebook
- instagram
- facebook_lite
userId:
type: string
maxLength: 128
description: Your own user identifier, if the app has set one.
trackingEnabled:
type: boolean
default: true
device:
$ref: '#/components/schemas/SdkDevice'
app:
$ref: '#/components/schemas/SdkApp'
sdkVersion:
type: string
example: 1.0.0
DeepLink:
type: object
required:
- url
- deeplinkUrl
- slug
- parameters
- isDeferred
- clickedAt
properties:
url:
type:
- string
- 'null'
description: The link the user opened or clicked.
example: https://acme.appy.to/spring?item=42
deeplinkUrl:
type:
- string
- 'null'
description: The link's deep link. With parameter forwarding, the click's query parameters are merged in (keys already present win).
example: acme://items?item=42
slug:
type: string
example: spring
parameters:
type: object
additionalProperties:
type: string
description: Query parameters of the clicked link, first value per key, without `appy_` keys.
example:
item: '42'
utm_source: instagram
isDeferred:
type: boolean
description: True when the link was recovered after an install rather than opened directly.
clickedAt:
type:
- string
- 'null'
format: date-time
SdkEventBatch:
type: object
required:
- installId
- events
properties:
installId:
type: string
events:
type: array
minItems: 1
maxItems: 100
items:
$ref: '#/components/schemas/SdkEvent'
SdkEventResult:
type: object
required:
- accepted
- duplicates
- rejected
properties:
accepted:
type: integer
description: Events stored by this request.
duplicates:
type: integer
description: Events already stored earlier with the same id.
rejected:
type: array
description: Events that failed validation and were not stored. Retrying them cannot succeed.
items:
type: object
required:
- index
- message
properties:
index:
type: integer
description: Position in the request's `events` array.
id:
type: string
message:
type: string
example: currency must be a 3-letter ISO 4217 code when revenue is set
Attribution:
type: object
required:
- status
- link
- source
- medium
- campaign
- clickedAt
properties:
status:
type: string
enum:
- attributed
- organic
description: '`attributed` when Appy matched the install to a link, otherwise `organic`. Organic installs have every other field null.'
link:
oneOf:
- type: 'null'
- type: object
required:
- slug
- title
properties:
slug:
type: string
example: spring
title:
type:
- string
- 'null'
example: Spring campaign
source:
type:
- string
- 'null'
description: The click's `utm_source`.
example: instagram
medium:
type:
- string
- 'null'
description: The click's `utm_medium`.
example: story
campaign:
type:
- string
- 'null'
description: The click's `utm_campaign`.
example: spring_sale
clickedAt:
type:
- string
- 'null'
format: date-time
network:
description: Present when an ad network's own data attributed the install (Google Ads or Meta on Android). Apple Ads results arrive later and appear on the install record.
$ref: '#/components/schemas/NetworkAttribution'
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
- requestId
properties:
code:
type: string
enum:
- invalid_request
- validation_failed
- unauthorized
- forbidden
- plan_required
- limit_reached
- not_found
- conflict
- rate_limited
- internal_error
- service_unavailable
message:
type: string
description: Human-readable explanation. Do not parse it; branch on `code`.
requestId:
type: string
description: Identifier of the request, also sent as `X-Request-ID`.
SdkOpenResponse:
type: object
required:
- installId
- firstLaunch
- deepLink
- attribution
properties:
installId:
type: string
firstLaunch:
type: boolean
deepLink:
description: The deep link to open, or null when no link applies.
oneOf:
- $ref: '#/components/schemas/DeepLink'
- type: 'null'
attribution:
description: The install's attribution on the first launch; null on later launches and when tracking is disabled.
oneOf:
- $ref: '#/components/schemas/Attribution'
- type: 'null'
example:
installId: 7f0c2b9e-3a61-4c2e-9d0b-5c1e8f2a9b10
firstLaunch: true
deepLink:
url: https://acme.appy.to/spring?item=42&utm_source=instagram
deeplinkUrl: acme://items?item=42&utm_source=instagram
slug: spring
parameters:
item: '42'
utm_source: instagram
isDeferred: true
clickedAt: '2026-09-25T10:04:05Z'
attribution:
status: attributed
link:
slug: spring
title: Spring campaign
source: instagram
medium: null
campaign: null
clickedAt: '2026-09-25T10:04:05Z'
NetworkAttribution:
type: object
required:
- name
description: Campaign data from the ad network. Fields the network does not report are omitted.
properties:
name:
type: string
enum:
- apple_ads
- google_ads
- meta
campaignId:
type: string
campaignName:
type: string
adGroupId:
type: string
adGroupName:
type: string
description: Meta reports the ad set here.
adId:
type: string
adName:
type: string
description: Meta ad name.
keywordId:
type: string
description: Apple Ads keyword id.
clickId:
type: string
description: Google Ads `gclid` from the Play install referrer.
touch:
type: string
enum:
- click
- view
conversionType:
type: string
description: 'Apple Ads: `Download`, `Redownload` or `PreOrder`.'
country:
type: string
description: Apple Ads country or region.
sourceApp:
type: string
enum:
- facebook
- instagram
- facebook_lite
example:
name: apple_ads
campaignId: '542370539'
adGroupId: '542317095'
keywordId: '87675432'
touch: click
conversionType: Download
country: US
SdkEvent:
type: object
required:
- id
- name
properties:
id:
type: string
minLength: 1
maxLength: 128
pattern: ^[\x21-\x7E]{1,128}$
description: 'The event''s deduplication key: 1 to 128 printable ASCII characters without spaces (letters,
digits and punctuation such as `.`, `:`, `-`, `_`, `/`). Appy stores one event per id and app,
across SDK events and server-side events, and counts any later event with the same id as a
duplicate. The SDKs generate a random id unless you pass `deduplicationId`. To count a purchase
once when both the app and your backend report it, send the store''s id from both sides: the App
Store transaction id or the Google Play order id.
'
example: GPA.3372-4150-9088-12345
name:
type: string
minLength: 1
maxLength: 64
example: purchase
timestamp:
type: string
format: date-time
properties:
type: object
maxProperties: 50
additionalProperties:
type:
- string
- number
- boolean
revenue:
type: number
description: Requires `currency`.
currency:
type: string
pattern: ^[A-Z]{3}$
example: USD
userId:
type: string
maxLength: 128
SdkApp:
type: object
properties:
bundleId:
type: string
version:
type: string
build:
type: string
installer:
type: string
maxLength: 128
description: Android only. Package name of the store that installed the app, for example `com.android.vending` or `com.huawei.appmarket`.
SdkDevice:
type: object
required:
- platform
properties:
platform:
type: string
enum:
- ios
- android
osVersion:
type: string
example: 17.5.1
model:
type: string
example: iPhone15,2
locale:
type: string
example: en_US
responses:
RateLimited:
description: Too many requests.
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
X-RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
X-RateLimit-Reset:
$ref: '#/components/headers/RateLimitReset'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: rate_limited
message: Rate limit exceeded. Retry after the number of seconds in the Retry-After header.
requestId: 4b6f1c2e-7c1a-4bd6-9f36-2f1f0f7b8c11
Unauthorized:
description: Missing, invalid or revoked credential.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: unauthorized
message: Invalid or revoked API key.
requestId: 4b6f1c2e-7c1a-4bd6-9f36-2f1f0f7b8c11
PlanOrLimit:
description: The plan does not include the feature, a limit is reached, or the credential is not allowed here.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
planRequired:
value:
error:
code: plan_required
message: The SDK, deferred deep linking and install attribution are available on the Enterprise plan.
requestId: 4b6f1c2e-7c1a-4bd6-9f36-2f1f0f7b8c11
limitReached:
value:
error:
code: limit_reached
message: Link limit reached for your plan. Delete unused links or upgrade.
requestId: 4b6f1c2e-7c1a-4bd6-9f36-2f1f0f7b8c11
BadRequest:
description: The request is malformed or a value failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalidRequest:
value:
error:
code: invalid_request
message: Unknown field "titel".
requestId: 4b6f1c2e-7c1a-4bd6-9f36-2f1f0f7b8c11
validation:
value:
error:
code: validation_failed
message: fallbackUrl must be a valid http(s) URL
requestId: 4b6f1c2e-7c1a-4bd6-9f36-2f1f0f7b8c11
securitySchemes:
secretKey:
type: http
scheme: bearer
bearerFormat: appy_sk_…
description: Secret API key for server-to-server calls.
publishableKey:
type: http
scheme: bearer
bearerFormat: appy_pk_…
description: Publishable app key, used by the mobile SDKs on `/v1/sdk` endpoints only.
dashboardSession:
type: http
scheme: bearer
bearerFormat: JWT
description: Access token of a signed-in Appy session.
sessionCookie:
type: apiKey
in: cookie
name: accessToken
description: The session cookie set by appy.to. Browsers on appy.to send it automatically.
x-tagGroups:
- name: Server API
tags:
- Account
- Links
- Domains
- Statistics
- Apps
- Attribution
- Postbacks
- API keys
- name: Client API
tags:
- Client API
x-provenance:
method: harvested
publisher: Appy
source: https://api.appy.to/v1/openapi.yaml
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)