API Docs
Reference

Client APIs

Client APIs are for SDKs and trusted public clients. They use publishable keys and cannot create links, read analytics, mutate domains, manage apps, or rotate credentials.

Client Auth Headers

ParameterTypeRequiredDescription
x-publishable-keystring
Optional
Publishable key. Authorization: Bearer and publishable-key are also accepted.
x-shortify-environmentstring
Optional
Must match the key environment when provided.
x-shortify-platformbrowser | android | ios
Optional
Must match the key platform when provided.
OriginURL
Optional
Checked for browser keys when origins are configured.
x-android-packagestring
Optional
Checked for Android keys when configured.
x-android-sha256-certstring
Optional
Checked for Android keys when configured.
x-ios-bundle-idstring
Optional
Checked for iOS keys when configured.

Record Click

POST/v1/client/attribution/click
ParameterTypeRequiredDescription
linkIdstring
Optional
Stable link ID.
shortLinkURL
Optional
Full short-link URL. url is also accepted.
domain + keystring
Optional
Domain and key pair. slug is accepted as an alias for key.
sessionIdstring
Optional
Anonymous session identifier. Generated when omitted.
installIdstring
Optional
Opaque install identifier.
deviceIdstring
Optional
Opaque device identifier used for matching.
anonymousDeviceIdstring
Optional
Alias for deviceId.
201
Created
{
  "success": true,
  "data": {
    "clickId": "0c78f83b-3917-4c9d-81c7-9a7dc7d5d76e",
    "attributionId": "97f4cf8d-4d39-4c92-9a18-bf68a39c1e14",
    "sessionId": "anon-session-123",
    "installId": "install-456",
    "expiresAt": "2026-07-10T09:00:00.000Z",
    "eligible": true,
    "deferredDeepLink": {
      "linkId": "link_01HV5A4W7QJ9K2X4Q8ZW5FGZ2R",
      "linkType": "DEEPLINK",
      "deepLinkAppId": "app_01HV4Z4Y6W3D4J9B2Y8QH6P8JS",
      "shortLink": "https://go.example.com/invite-abc",
      "domain": "go.example.com",
      "key": "invite-abc",
      "url": "https://example.com/app-open"
    }
  },
  "requestId": "req_01HV5A4W7QJ9K2X4Q8ZW5FGZ2R"
}

First Open Or Install

POST/v1/client/first-open
ParameterTypeRequiredDescription
eventTypefirst_open | install
Optional
Defaults to first_open.
attributionIdstring
Optional
Attribution ID from record-click.
clickIdstring
Optional
Click ID from record-click.
installIdstring
Optional
Opaque install identifier.
sessionIdstring
Optional
Anonymous session identifier.
externalUserIdstring
Optional
Opaque non-PII user identifier. Raw email, phone, and similar PII are rejected.

Customer Events

POST/v1/client/events

Send 1 to 50 events per request. Each event must include a valid name and link context through linkId, clickId, or attributionId. Supplied eventId values are treated as idempotency keys.

ParameterTypeRequiredDescription
events[].namestring
Required
Starts with a letter. Letters, numbers, underscore, period, colon, and dash are allowed.
events[].eventIdstring
Optional
Caller-supplied idempotency key for this event.
events[].linkIdstring
Optional
Stable link ID. Required unless clickId or attributionId is provided.
events[].clickIdstring
Optional
Click ID from record-click.
events[].attributionIdstring
Optional
Attribution ID from record-click.
events[].externalUserIdstring
Optional
Opaque non-PII user identifier.
events[].propertiesobject
Optional
Up to 50 primitive string, number, or boolean properties. Direct PII is rejected.
Publish customer event
curl -X POST "https://api.shortify.com/v1/client/events" \
  -H "x-publishable-key: pk_live_your_publishable_key" \
  -H "x-shortify-platform: ios" \
  -H "Content-Type: application/json" \
  --data '{
    "events": [{
      "name": "purchase",
      "eventId": "order-1001",
      "attributionId": "97f4cf8d-4d39-4c92-9a18-bf68a39c1e14",
      "properties": {"currency": "USD", "value": 49}
    }]
  }'
202
Accepted
{
  "success": true,
  "data": {
    "accepted": [
      {
        "eventId": "order-1001",
        "status": "queued"
      }
    ]
  },
  "requestId": "req_01HV5A4W7QJ9K2X4Q8ZW5FGZ2R"
}