Endpoint
GET/link?domain=state.sk&slug=trynow
APIs that can be used to work with State programmatically
This API method returns a short link by its name.
Authorization required.
| Parameter | Description |
|---|---|
| domain | Required. List of available domains can be retrieved via the Domains API |
| slug | Required. The short link’s slug |
| ip | Optional. If provided and the link has geo-targeted URLs, the response includes a link for the corresponding country |
curl https://state.sk/api/link?domain=state.sk&slug=trynow&ip=192.168.0.1 \
-H 'x-api-key: state_xxxxxxxxxx'
The requested link
{
"id": "id-1",
"org_id": "org-1",
"user_id": "user-1",
"folder_id": null,
"domain_id": 1,
"domain": "state.sk",
"slug": "somethingrandom",
"url": "https://google.com",
"title": "Google",
"expires_at": null,
"expires_after": 0,
"expire_url": null,
"utm_source": null,
"utm_medium": null,
"utm_campaign": null,
"utm_term": null,
"utm_content": null,
"utm_reference": null,
"created_at": "2025-10-07T13:12:01.761Z",
"updated_at": "2025-10-07T13:12:01.761Z",
"ios": null,
"android": null,
"redirect_code": null,
"has_password": false,
"short_url": "https://state.sk/somethingrandom",
"clicks": 0,
"clicked_at": "2025-10-15T13:12:01.761Z",
"folder": null,
"tags": [],
"ab": [],
"geo": [],
"geo_url": "https://uk.google.com"
}
Detailed information about the link fields in the Link article.