GraphQL Queries
lnkifyConnection
Paginated list of shortlinks owned by the authenticated user, with optional search and total count.
| Argument | Type | Description |
|---|---|---|
skip | Int | Number of items to skip (for pagination) |
take | Int | Number of items to return (max 100) |
search | String | Free-text search across slug, target URL, and title |
| Returns | LnkifyConnection! |
| Auth | Required |
query {
lnkifyConnection(skip: 0, take: 10) {
items {
id
lnkify
target
title
hitCount
enableTracking
createdAt
}
totalCount
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { lnkifyConnection(skip: 0, take: 10) { items { id lnkify target title hitCount enableTracking createdAt } totalCount } }"}'getLnkifyInfo
Get a single shortlink by its ID. Includes hit data and country breakdown.
| Argument | Type | Description |
|---|---|---|
id | ID! | ID of the shortlink to fetch |
| Returns | lnkify |
| Auth | Required |
query {
getLnkifyInfo(id: "1") {
id
lnkify
target
title
hitCount
enableTracking
hits {
id
ip
browser { name version }
os { name version }
location { city country { name } }
createdAt
}
byCountryGraph {
country { name code }
count
}
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { getLnkifyInfo(id: \"1\") { id lnkify target hitCount hits { id browser { name } location { city } } byCountryGraph { count country { name } } } }"}'getUserInfo
Get the authenticated user's profile and their shortlinks.
| Returns | User |
| Auth | Required |
query {
getUserInfo {
id
name
email
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { getUserInfo { id name email createdAt } }"}'getApiKeys
List all API keys for the authenticated user. The secret is never returned.
| Returns | [ApiKey!]! |
| Auth | Required |
query {
getApiKeys {
id
label
prefix
last4
lastUsedAt
expiresAt
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { getApiKeys { id label prefix last4 lastUsedAt expiresAt createdAt } }"}'hit
Get a single hit/click event by its ID.
| Argument | Type | Description |
|---|---|---|
id | ID! | ID of the hit event to fetch |
| Returns | hit |
| Auth | Required |
query {
hit(id: "1") {
id
ip
type
isp
browser { name version }
os { name version }
timezone { name offset abbreviation }
location { city postal country { name code } continent { name code } }
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { hit(id: \"1\") { id ip browser { name } os { name } location { city country { name } } createdAt } }"}'targetUrl
Resolve a shortlink slug to its target URL. Records a hit when the link has tracking enabled. This is the canonical replacement for the deprecated getTargetByLnkify mutation.
| Argument | Type | Description |
|---|---|---|
lnkify | String! | The shortlink slug to resolve |
| Returns | String |
| Auth | None (public) |
query {
targetUrl(lnkify: "my-link")
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { targetUrl(lnkify: \"my-link\") }"}'Response:
{
"data": {
"targetUrl": "https://example.com/very-long-url"
}
}ping
Health check. Returns "pong". Does not require authentication.
| Returns | String! |
| Auth | None |
query {
ping
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { ping }"}'Response:
{
"data": {
"ping": "pong"
}
}getTargetByLnkify
Resolve a shortlink slug to its target URL. Records a hit when the link has tracking enabled. Also available as the deprecated mutation of the same name.
| Argument | Type | Description |
|---|---|---|
lnkify | String! | The shortlink slug to resolve |
hostname | String | Optional custom domain hostname |
| Returns | String |
| Auth | None (public) |
query {
getTargetByLnkify(lnkify: "my-link")
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { getTargetByLnkify(lnkify: \"my-link\") }"}'Response:
{
"data": {
"getTargetByLnkify": "https://example.com/very-long-url"
}
}lnkifyAnalytics
Aggregate analytics across all links owned by the authenticated user (totals and top links).
| Returns | LnkifyAnalytics! |
| Auth | Required |
query {
lnkifyAnalytics {
totalLinks
trackedLinks
totalClicks
topLinks {
id
lnkify
hostname
hitCount
}
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { lnkifyAnalytics { totalLinks trackedLinks totalClicks topLinks { id lnkify hitCount } } }"}'bioPages
List all bio pages owned by the authenticated user.
| Returns | [BioPage!]! |
| Auth | Required |
query {
bioPages {
id
slug
title
theme
links { id label url order }
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { bioPages { id slug title links { label url } } }"}'bioPage
Get a single bio page by its slug.
| Argument | Type | Description |
|---|---|---|
slug | String! | URL slug of the bio page |
| Returns | BioPage |
| Auth | None |
query {
bioPage(slug: "my-links") {
id
slug
title
theme
links { id label url order }
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { bioPage(slug: \"my-links\") { id slug title links { label url } } }"}'domains
List all custom domains owned by the authenticated user.
| Returns | [Domain!]! |
| Auth | Required |
query {
domains {
id
hostname
verified
verifiedAt
sslStatus
txtToken
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { domains { id hostname verified sslStatus createdAt } }"}'meSub
Get the authenticated user's current subscription details.
| Returns | Subscription |
| Auth | Required |
query {
meSub {
id
plan
status
currentPeriodStart
currentPeriodEnd
cancelAtPeriodEnd
anchorDay
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { meSub { plan status currentPeriodEnd cancelAtPeriodEnd } }"}'meUsage
Get the authenticated user's current billing period usage.
| Returns | UsageMeter |
| Auth | Required |
query {
meUsage {
periodStart
periodEnd
linksCreated
refillLinks
allowance
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { meUsage { periodStart periodEnd linksCreated refillLinks allowance } }"}'meAutoRefill
Get the authenticated user's auto-refill settings.
| Returns | AutoRefillSetting |
| Auth | Required |
query {
meAutoRefill {
enabled
thresholdPercent
refillPackLinks
maxMonthlySpend
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { meAutoRefill { enabled thresholdPercent refillPackLinks maxMonthlySpend } }"}'webhooks
List all webhooks owned by the authenticated user.
| Returns | [Webhook!]! |
| Auth | Required |
query {
webhooks {
id
url
events
enabled
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { webhooks { id url events enabled createdAt } }"}'webhookDeliveries
List recent delivery attempts for a specific webhook.
| Argument | Type | Description |
|---|---|---|
webhookId | ID! | ID of the webhook to get deliveries for |
| Returns | [WebhookDelivery!]! |
| Auth | Required |
query {
webhookDeliveries(webhookId: "1") {
id
event
status
response
createdAt
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "query { webhookDeliveries(webhookId: \"1\") { id event status createdAt } }"}'plans
List all available billing plans.
| Returns | [BillingPlan!]! |
| Auth | None |
query {
plans {
plan
interval
displayPrice
displayPerMonth
yearlyTotal
links
description
features
}
}curl -X POST https://lnkify.io/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { plans { plan interval displayPrice displayPerMonth links features } }"}'