Skip to content

GraphQL Types

lnkify

A shortened URL (shortlink).

FieldTypeDescription
idID!Unique identifier
userUserOwning user
targetString!Destination URL
lnkifyString!Short slug
hits(take: Int, skip: Int)[hit]Click events (paginated via take/skip)
hitCountInt!Total clicks
titleStringDisplay title
enableTrackingBoolean!Click tracking enabled
byCountryGraph[byCountryGraphItem]Hits by country
byChannel[byChannelItem]Hits by channel/source
domainDomainCustom domain this link belongs to
qrCode(format: String, size: Int, ecc: String)StringQR code for this link. format: svg (default), png, or data; size in pixels; ecc: L/M/Q/H
rules[LinkRule!]Link routing rules
createdAtString!ISO 8601 creation timestamp
updatedAtString!ISO 8601 update timestamp

hit

A single click/redirect event.

FieldTypeDescription
idID!Unique identifier
lnkifylnkifyParent shortlink
ipStringVisitor IP (anonymized)
typeStringConnection type
ispStringISP name
timezonetimezoneTimezone info
locationlocationGeographic location
browserbrowserBrowser info
ososOS info
channelStringAttributed traffic channel/source
matchedRuleIdStringID of the routing rule that matched this hit (if any)
bioLinkIdStringID of the bio-page link that produced this hit (if any)
createdAtStringISO 8601 creation timestamp
updatedAtStringISO 8601 update timestamp

User

A registered user account.

FieldTypeDescription
idID!Unique identifier
lnkifies(take: Int, skip: Int)[lnkify!]User's shortlinks (paginated; prefer the lnkifyConnection query for listing)
nameString!Display name
emailString!Email address
createdAtString!ISO 8601 creation timestamp
updatedAtString!ISO 8601 update timestamp

ApiKey

An API key for programmatic access.

FieldTypeDescription
idID!Unique identifier
labelString!Human-readable label
prefixString!First 8 chars for identification
last4String!Last 4 chars for verification
lastUsedAtStringLast usage timestamp
expiresAtStringExpiration timestamp (null = never)
createdAtString!Creation timestamp

AuthPayload

Authentication response.

FieldTypeDescription
tokenString!JWT access token
userUser!Authenticated user

CreatedApiKey

Result of creating an API key. The secret is only shown once.

FieldTypeDescription
apiKeyApiKey!Key metadata
secretString!Full API key (shown once)

BulkLnkifyResult

Result for one item in a bulk create/update operation.

FieldTypeDescription
indexInt!Position in input array
okBoolean!Success flag
lnkifylnkifyCreated/updated shortlink (null on failure)
errorStringError message on failure

BulkDeleteResult

Result for one item in a bulk delete operation.

FieldTypeDescription
indexInt!Position in input array
idID!Shortlink ID
okBoolean!Success flag
errorStringError message on failure

byCountryGraphItem

Hit count aggregated by country.

FieldTypeDescription
countrycountryCountry info
countInt!Number of hits

byChannelItem

Hit count aggregated by channel/source.

FieldTypeDescription
channelStringChannel name (e.g. direct, social)
countInt!Number of hits

Subscription

A user's billing subscription.

FieldTypeDescription
idID!Unique identifier
planPlan!Current plan tier
statusSubscriptionStatus!Subscription status
currentPeriodStartStringStart of current billing period
currentPeriodEndStringEnd of current billing period
cancelAtPeriodEndBoolean!Whether subscription cancels at period end
anchorDayInt!Billing cycle anchor day

UsageMeter

Current billing period usage summary.

FieldTypeDescription
periodStartString!Start of current usage period
periodEndString!End of current usage period
linksCreatedInt!Links created this period
refillLinksInt!Additional links purchased via auto-refill
allowanceInt!Maximum links allowed this period

AutoRefillSetting

Auto-refill configuration for a subscription.

FieldTypeDescription
enabledBoolean!Whether auto-refill is turned on
thresholdPercentInt!Usage percentage that triggers auto-refill
refillPackLinksInt!Number of links per auto-refill pack
maxMonthlySpendInt!Maximum monthly spend cap in USD cents

BillingPlan

A billing plan with pricing details.

FieldTypeDescription
planPlan!Plan identifier (FREE, STARTER, PRO)
intervalString!Billing interval (MONTHLY or ANNUAL)
priceIdStringStripe price ID
displayPriceString!Human-readable price string, formatted by the server's pricing config
displayPerMonthString!Human-readable per-month price string
yearlyTotalStringHuman-readable yearly total for annual plans
linksInt!Links included per billing period
descriptionString!Plan description
features[String!]!Array of feature strings

CheckoutSessionResult

Result of creating a Stripe checkout session.

FieldTypeDescription
urlString!URL to redirect the user to Stripe Checkout

PortalSessionResult

Result of creating a Stripe customer portal session.

FieldTypeDescription
urlString!URL to redirect the user to the customer portal

LnkifyConnection

Paginated list of shortlinks with total count.

FieldTypeDescription
items[lnkify!]!Array of shortlinks for the current page
totalCountInt!Total number of matching shortlinks

LnkifyAnalytics

Aggregate analytics across all links owned by a user.

FieldTypeDescription
totalLinksInt!Total number of links
trackedLinksInt!Number of links with tracking enabled
totalClicksInt!Total number of clicks across all links
topLinks[LnkifyTopItem!]!Top links by click count

LnkifyTopItem

A top-performing shortlink in analytics results.

FieldTypeDescription
idID!Shortlink ID
lnkifyString!Short slug
hostnameStringDomain hostname
hitCountInt!Total clicks

timezone

Timezone information from IP geolocation.

FieldTypeDescription
nameStringTimezone name (e.g. America/New_York)
offsetIntUTC offset in seconds
idStringTimezone identifier
abbreviationStringAbbreviation (e.g. EST)

location

Location information from IP geolocation.

FieldTypeDescription
nameStringLocation name
cityStringCity name
postalStringPostal/ZIP code
countrycountryCountry info
continentcontinentContinent info

country

Country information from IP geolocation.

FieldTypeDescription
nameStringCountry name
codeStringISO 3166-1 alpha-2 code

continent

Continent information from IP geolocation.

FieldTypeDescription
nameStringContinent name
codeStringContinent code

browser

Browser information from user agent.

FieldTypeDescription
nameStringBrowser name
versionStringBrowser version

os

Operating system information from user agent.

FieldTypeDescription
nameStringOS name
versionStringOS version

Input Types

CreateLnkifyInput

Input for creating a shortlink in a bulk operation.

FieldTypeDescription
targetString!Destination URL (required)
lnkifyStringCustom slug (auto-generated if omitted)
titleStringDisplay title
enableTrackingBooleanEnable click tracking

UpdateLnkifyInput

Input for updating a shortlink in a bulk operation.

FieldTypeDescription
idID!Shortlink ID (required)
targetStringNew destination URL
titleStringNew display title
enableTrackingBooleanEnable click tracking
rules[LinkRuleInput!]Link routing rules

LinkRule

A routing rule that redirects based on type and value (e.g., country, device).

FieldTypeDescription
typeString!Rule type (e.g. country, device)
valueString!Match value
targetString!Redirect target when rule matches

LinkRuleInput

Input type for creating or updating link routing rules.

FieldTypeDescription
typeString!Rule type
valueString!Match value
targetString!Redirect target

BioPage

A link-in-bio page containing an ordered list of bio links.

FieldTypeDescription
idID!Unique identifier
slugString!URL slug for the bio page
themeStringVisual theme applied to the page
titleStringDisplay title
links[BioLink!]!List of bio links on this page
createdAtString!ISO 8601 timestamp of page creation

A single link on a bio page.

FieldTypeDescription
idID!Unique identifier
labelStringDisplay label for the link
urlString!Destination URL
orderInt!Sort order position on the bio page

Webhook

An outgoing webhook endpoint that receives POST events.

FieldTypeDescription
idID!Unique identifier
urlString!Destination URL that receives POST events
events[String!]!Array of event types (e.g. link.created, link.clicked, bio.viewed)
enabledBoolean!Whether the webhook is active
createdAtString!ISO 8601 timestamp of webhook creation

WebhookDelivery

A single delivery attempt for a webhook event.

FieldTypeDescription
idID!Unique identifier
eventString!Event type that triggered the delivery
statusInt!HTTP status code returned by the endpoint
responseStringResponse body from the endpoint
createdAtString!ISO 8601 timestamp of delivery

Domain

A custom domain for branded shortlinks.

FieldTypeDescription
idID!Unique identifier
hostnameString!The custom domain hostname
verifiedBoolean!Whether DNS ownership has been verified
verifiedAtStringTimestamp of verification
sslStatusStringSSL certificate status
txtTokenString!DNS TXT verification token
createdAtString!ISO 8601 timestamp of domain registration

Released under the MIT License.