Links API
All endpoints below use https://api.fupisha.link. Authenticate with an API key in the Authorization header. Link data is always scoped to the workspace that owns the key.
Create a link
curl --fail-with-body https://api.fupisha.link/v1/links \
-H "Authorization: Bearer $FUPISHA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/campaign",
"campaign_name": "Spring launch",
"recipient_id": "recipient-482"
}'| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Absolute destination URL using http or https. |
code | string | No | Custom code, 3–32 letters, numbers, hyphens, or underscores. Generated if omitted. |
domain | string | No | Active domain assigned to the workspace. Defaults to fupisha.link. |
campaign_id | string | No | Campaign identifier for your integration. |
campaign_name | string | No | Campaign label shown with the link. |
recipient_id | string | No | Your opaque recipient reference. Avoid names, phone numbers, or other personal data. |
metadata | object | No | Additional integration metadata. Do not include secrets or sensitive personal data. |
redirect_type | integer | No | Redirect status. Defaults to 302. |
expires_at | string | No | RFC 3339 expiration timestamp. |
For safe retries, send a stable Idempotency-Key header (8–128 characters). Repeating the same key and request replays the original result; reusing it with different content returns 409 idempotency_conflict.
List links
limit defaults to 50 and accepts 1–100. The response contains data and has_more; pagination cursors are not available yet.
curl --fail-with-body 'https://api.fupisha.link/v1/links?limit=25' \
-H "Authorization: Bearer $FUPISHA_API_KEY"Retrieve one link
Returns one link in your workspace. A link belonging to a different workspace is returned as 404 not_found.
Delete a link
Deletion permanently removes the link record. A later request to its short URL returns 404 not_found.
Bulk creation
Accepts 1–100 links per request.
Send a stable Idempotency-Key header. Repeating the same key and payload returns the original batch response; reusing a key with different data returns 409 idempotency_conflict. Each result has its input index and either a link or an error, so a bad row does not hide successful rows.
curl --fail-with-body https://api.fupisha.link/v1/links/bulk \
-H "Authorization: Bearer $FUPISHA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: invoice-send-2026-00042" \
-d '{"links":[{"url":"https://example.com/invoice/42","campaign_name":"Ngamia Invoice"}]}'Link object
{
"id": "lnk_example",
"code": "aB3xY9qK",
"short_url": "https://fupisha.link/aB3xY9qK",
"destination_url": "https://example.com/campaign",
"redirect_type": 302,
"status": "active",
"created_at": "2026-11-12T10:00:00Z",
"campaign_name": "Spring launch",
"clicks": 0
}See analytics for click data and errors for response handling.