/api/v1/links| Field | Type | Required | Description |
url | string | Yes | Destination target URL (must include https:// or http://) |
slug | string | No | Custom slug identifier. If omitted, a random 6-character slug is generated |
domain | string | No | Target custom or system domain (defaults to shaf.is) |
description | string | No | Human-readable title or memo |
tags | string[] | No | Array of classification tags |
password | string | No | Access password to gate the redirect |
expiresAt | string | No | ISO 8601 UTC timestamp when the link ceases resolving |
apple | string | No | Smart redirect URL for iOS visitors |
google | string | No | Smart redirect URL for Android visitors |
1234567891011curl -X POST https://shaf.app/api/v1/links \ -H "Authorization: Bearer shaf_live_..." \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/checkout", "slug": "promo-2026", "domain": "link.yourbrand.com", "tags": ["promo", "summer"], "apple": "https://apps.apple.com/app/id12345", "google": "https://play.google.com/store/apps/details?id=com.example" }'
/api/v1/links| Parameter | Type | Default | Description |
page | number | 1 | Pagination page index |
limit | number | 20 | Results per page (max 100) |
search | string | - | Substring search matching slug, URL, or title |
tag | string | - | Filter links by specific tag |
domain | string | - | Filter links by domain |
/api/v1/links/:slug?domain=:domain/api/v1/links/:slugurl, description, tags, apple, google, password)./api/v1/links/:slug?domain=:domain