TEASEDocs
API ReferenceSmart Links

Create a smart link

Creates a smart link for the offer slot. At most one active link per offer slot is allowed. Requires a write-scoped key.

Authorization

bearerAuth
AuthorizationBearer <token>

Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

POST
/api/admin/smart-links
curl -X POST "https://example.com/api/admin/smart-links" \  -H "Content-Type: application/json" \  -d '{    "offer": "ftl",    "name": "TikTok bio - trial",    "free_trial_days": 7  }'
{  "provider_id": "lnk_3pZ7",  "offer": "ftl",  "name": "TikTok bio - trial",  "redirect_url": "https://app.tease.link/r/k2Lm5xQ9",  "active": true,  "created_at": 1719792000}
{  "detail": {    "code": "invalid_offer",    "message": "offer must be one of ['ftl', 'paid'], got 'sub'"  }}
{  "detail": {    "code": "unauthorized",    "message": "Invalid or missing API key"  }}
{  "detail": {    "code": "engine_not_connected",    "message": "Connect your engine to access this data."  }}
{  "detail": {    "code": "smart_link_exists",    "message": "An active smart link for offer 'paid' already exists (provider_id='lnk_8fq2'). Disable or delete it first."  }}
{  "detail": {    "code": "temporarily_unavailable",    "message": "Service temporarily unavailable; please retry."  }}