Send each install and event to an ad network or to your own server. A postback is an HTTPS URL Appy calls when its trigger happens: `install` fires once per new install, after Appy has the final attribution (Apple Ads lookups included); `event` fires for each new event, optionally only for the names in `eventNames`. Duplicate events never fire twice. Up to 10 postbacks per app. Enterprise plan. **Macros.** Use them anywhere in the path or query; values are URL-encoded. The host name cannot contain macros. | Macro | Value | |---|---| | `{install_id}`, `{platform}`, `{os_version}`, `{device_model}`, `{app_version}`, `{locale}`, `{user_id}` | The install | | `{attribution_status}`, `{verified}`, `{link_slug}`, `{utm_source}`, `{utm_medium}`, `{utm_campaign}` | Its attribution | | `{param:NAME}` | Any query parameter of the clicked link, for example `{param:clickid}` for a network's click id | | `{network}`, `{campaign_id}`, `{campaign_name}`, `{ad_group_id}`, `{ad_group_name}`, `{ad_id}`, `{keyword_id}` | Apple Ads, Google Ads or Meta attribution | | `{event_id}`, `{event_name}`, `{revenue}`, `{currency}` | The event (empty on install postbacks) | | `{timestamp}`, `{timestamp_ms}` | When the install or event happened, Unix seconds or milliseconds | **Webhooks.** With `method: POST` Appy sends the full `PostbackPayload` as JSON, which makes a postback a webhook to your own server. **Signature.** Every request carries `Appy-Signature: t=,v1=`, where `v1` is HMAC-SHA256 of `t + "." + body` (an empty body for GET) keyed with the postback's `signingSecret`. Reject requests whose timestamp is more than 5 minutes old. `Appy-Delivery-Id` identifies the delivery for de-duplication. **Delivery.** 2xx and 3xx answers count as delivered and redirects are not followed. Timeouts, `429` and `5xx` are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours; other `4xx` answers fail at once. Delivery logs are kept for 30 days. Only public HTTPS hosts are called.
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Appy Postbacks 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: Postbacks
description: 'Send each install and event to an ad network or to your own server. A postback is an HTTPS URL
Appy calls when its trigger happens: `install` fires once per new install, after Appy has the
final attribution (Apple Ads lookups included); `event` fires for each new event, optionally only
for the names in `eventNames`. Duplicate events never fire twice. Up to 10 postbacks per app.
Enterprise plan.
**Macros.** Use them anywhere in the path or query; values are URL-encoded. The host name cannot
contain macros.
| Macro | Value |
|---|---|
| `{install_id}`, `{platform}`, `{os_version}`, `{device_model}`, `{app_version}`, `{locale}`, `{user_id}` | The install |
| `{attribution_status}`, `{verified}`, `{link_slug}`, `{utm_source}`, `{utm_medium}`, `{utm_campaign}` | Its attribution |
| `{param:NAME}` | Any query parameter of the clicked link, for example `{param:clickid}` for a network''s click id |
| `{network}`, `{campaign_id}`, `{campaign_name}`, `{ad_group_id}`, `{ad_group_name}`, `{ad_id}`, `{keyword_id}` | Apple Ads, Google Ads or Meta attribution |
| `{event_id}`, `{event_name}`, `{revenue}`, `{currency}` | The event (empty on install postbacks) |
| `{timestamp}`, `{timestamp_ms}` | When the install or event happened, Unix seconds or milliseconds |
**Webhooks.** With `method: POST` Appy sends the full `PostbackPayload` as JSON, which makes a
postback a webhook to your own server.
**Signature.** Every request carries `Appy-Signature: t=,v1=`, where `v1` is
HMAC-SHA256 of `t + "." + body` (an empty body for GET) keyed with the postback''s `signingSecret`.
Reject requests whose timestamp is more than 5 minutes old. `Appy-Delivery-Id` identifies the
delivery for de-duplication.
**Delivery.** 2xx and 3xx answers count as delivered and redirects are not followed. Timeouts,
`429` and `5xx` are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours; other
`4xx` answers fail at once. Delivery logs are kept for 30 days. Only public HTTPS hosts are
called.'
paths:
/v1/apps/{appId}/postbacks:
parameters:
- $ref: '#/components/parameters/AppId'
get:
tags:
- Postbacks
operationId: listPostbacks
summary: List an app's postbacks
responses:
'200':
description: Postbacks in creation order. Signing secrets are not included.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/Postback'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/PlanOrLimit'
'404':
$ref: '#/components/responses/NotFound'
post:
tags:
- Postbacks
operationId: createPostback
summary: Create a postback
description: The response is the only time `signingSecret` is returned. Store it to verify signatures.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostbackCreate'
examples:
network:
summary: Install postback to an ad network
value:
name: Network installs
trigger: install
url: https://postback.network.example/install?click_id={param:clickid}&platform={platform}&ts={timestamp}
requiredParameter: clickid
webhook:
summary: Purchases to your own server
value:
name: Purchases webhook
trigger: event
eventNames:
- purchase
method: POST
url: https://api.acme.com/appy/events
responses:
'201':
description: The postback, with its signing secret.
headers:
Location:
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Postback'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/PlanOrLimit'
'404':
$ref: '#/components/responses/NotFound'
/v1/apps/{appId}/postbacks/{postbackId}:
parameters:
- $ref: '#/components/parameters/AppId'
- $ref: '#/components/parameters/PostbackId'
get:
tags:
- Postbacks
operationId: getPostback
summary: Get a postback
responses:
'200':
description: The postback.
content:
application/json:
schema:
$ref: '#/components/schemas/Postback'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- Postbacks
operationId: updatePostback
summary: Update a postback
description: The trigger cannot change; create a new postback instead.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostbackUpdate'
responses:
'200':
description: The updated postback.
content:
application/json:
schema:
$ref: '#/components/schemas/Postback'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Postbacks
operationId: deletePostback
summary: Delete a postback
description: Pending deliveries are dropped.
responses:
'204':
description: Deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/v1/apps/{appId}/postbacks/{postbackId}/deliveries:
parameters:
- $ref: '#/components/parameters/AppId'
- $ref: '#/components/parameters/PostbackId'
get:
tags:
- Postbacks
operationId: listPostbackDeliveries
summary: Recent deliveries
description: The latest 50 deliveries, newest first.
responses:
'200':
description: Deliveries.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/PostbackDelivery'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/v1/apps/{appId}/postbacks/{postbackId}/test:
parameters:
- $ref: '#/components/parameters/AppId'
- $ref: '#/components/parameters/PostbackId'
post:
tags:
- Postbacks
operationId: testPostback
summary: Send a test request
description: 'Calls the postback once with sample data (`type: test`, install `test-install-0000`, link
parameter `clickid=test-click-id`) and returns what the endpoint answered. Not retried and not
logged as a delivery.'
responses:
'200':
description: The result of the test request.
content:
application/json:
schema:
$ref: '#/components/schemas/PostbackTestResult'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/v1/apps/{appId}/postbacks/{postbackId}/rotate-secret:
parameters:
- $ref: '#/components/parameters/AppId'
- $ref: '#/components/parameters/PostbackId'
post:
tags:
- Postbacks
operationId: rotatePostbackSecret
summary: Rotate the signing secret
description: Returns the postback with its new `signingSecret`. The old secret stops working immediately.
responses:
'200':
description: The postback with the new secret.
content:
application/json:
schema:
$ref: '#/components/schemas/Postback'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
components:
schemas:
Postback:
type: object
required:
- id
- name
- trigger
- eventNames
- method
- url
- attributedOnly
- requiredParameter
- enabled
- createdAt
- updatedAt
properties:
id:
type: string
format: uuid
name:
type: string
maxLength: 80
trigger:
type: string
enum:
- install
- event
eventNames:
type: array
items:
type: string
description: Event postbacks only. Empty means every event.
method:
type: string
enum:
- GET
- POST
url:
type: string
description: HTTPS URL template with macros.
example: https://postback.network.example/install?click_id={param:clickid}
attributedOnly:
type: boolean
description: Skip organic installs and their events.
requiredParameter:
type:
- string
- 'null'
description: Only fire when the clicked link carried this query parameter, such as the network's click id.
enabled:
type: boolean
signingSecret:
type: string
description: Only in the create and rotate-secret responses.
example: whsec_5f1d...
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
PostbackCreate:
type: object
required:
- name
- trigger
- url
additionalProperties: false
properties:
name:
type: string
maxLength: 80
trigger:
type: string
enum:
- install
- event
eventNames:
type: array
maxItems: 20
items:
type: string
maxLength: 64
method:
type: string
enum:
- GET
- POST
default: GET
url:
type: string
maxLength: 2048
attributedOnly:
type: boolean
default: false
requiredParameter:
type: string
maxLength: 128
enabled:
type: boolean
default: true
PostbackUpdate:
type: object
additionalProperties: false
minProperties: 1
properties:
name:
type: string
maxLength: 80
eventNames:
type: array
maxItems: 20
items:
type: string
maxLength: 64
method:
type: string
enum:
- GET
- POST
url:
type: string
maxLength: 2048
attributedOnly:
type: boolean
requiredParameter:
type:
- string
- 'null'
maxLength: 128
enabled:
type: boolean
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`.
PostbackDelivery:
type: object
required:
- id
- trigger
- eventName
- installId
- status
- attempts
- responseStatus
- lastError
- createdAt
- completedAt
- nextAttemptAt
properties:
id:
type: integer
trigger:
type: string
enum:
- install
- event
eventName:
type:
- string
- 'null'
installId:
type: string
status:
type: string
enum:
- pending
- delivered
- failed
attempts:
type: integer
responseStatus:
type:
- integer
- 'null'
lastError:
type:
- string
- 'null'
createdAt:
type: string
format: date-time
completedAt:
type:
- string
- 'null'
format: date-time
nextAttemptAt:
type:
- string
- 'null'
format: date-time
description: Set while a retry is scheduled.
PostbackTestResult:
type: object
required:
- url
- method
- responseStatus
- error
properties:
url:
type: string
description: The URL after macros were filled in.
method:
type: string
responseStatus:
type:
- integer
- 'null'
error:
type:
- string
- 'null'
parameters:
AppId:
name: appId
in: path
required: true
schema:
type: string
format: uuid
PostbackId:
name: postbackId
in: path
required: true
schema:
type: string
format: uuid
responses:
NotFound:
description: The resource does not exist or belongs to another account.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: not_found
message: Link not found.
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)