GET
/
links
/
info
JavaScript
import Codeqr from '@codeqr/ts';

const client = new Codeqr({
  apiKey: 'My API Key',
});

const link = await client.links.retrieveInfo({ domain: 'x', key: 'x', projectSlug: 'x' });

console.log(link.id);
{
  "id": "<string>",
  "domain": "<string>",
  "key": "<string>",
  "url": "<string>",
  "archived": false,
  "expiresAt": "<string>",
  "expiredUrl": "<string>",
  "trackConversion": false,
  "flexible": false,
  "doIndex": false,
  "password": "<string>",
  "externalId": "<string>",
  "proxy": false,
  "title": "<string>",
  "description": "<string>",
  "image": "<string>",
  "video": "<string>",
  "rewrite": false,
  "ios": "<string>",
  "android": "<string>",
  "geo": {},
  "publicStats": false,
  "tagId": "<string>",
  "tags": [
    {
      "id": "<string>",
      "name": "<string>",
      "color": "red"
    }
  ],
  "comments": "<string>",
  "notificationToken": "<string>",
  "shortLink": "<string>",
  "qrCode": "<string>",
  "utm_source": "<string>",
  "utm_medium": "<string>",
  "utm_campaign": "<string>",
  "utm_term": "<string>",
  "utm_content": "<string>",
  "userId": "<string>",
  "projectId": "<string>",
  "clicks": 0,
  "leads": 0,
  "sales": 0,
  "saleAmount": 0,
  "lastClicked": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "preRedirection": false,
  "pageId": "<string>",
  "pageUrl": "<string>",
  "isFormMandatory": false,
  "filled": false
}
You can retrieve a link by providing one of the following as a query parameter:
  • domain and key.
  • linkId.
  • externalId.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

projectSlug
string
required

The slug of the project to which the link belongs. For example, for app.codeqr.io/acme, the projectSlug is acme.

Minimum length: 1
domain
string
required

The domain of the link to be retrieved. For example, for codeqr.link/github, the domain is codeqr.link.

Minimum length: 1
key
string
required

The key of the link to be retrieved. For example, for codeqr.link/github, the key is github.

Minimum length: 1

The unique ID of the short link.

Example:

"clux0rgak00011..."

externalId
string

This is the ID of the link in your database. Must be prefixed with ext_ when passed as a query parameter.

Example:

"ext_123456"

Response

The retrieved link

id
string
required

The unique ID of the short link.

domain
string
required

The domain of the short link. If not provided, the main domain of the project will be used (or codeqr.link if the project has no domains).

key
string
required

The slug of the short link. If not provided, a random 7-character slug will be generated.

url
string<uri>
required

The destination URL of the short link.

archived
boolean
default:false
required

Whether the short link is archived.

expiresAt
string | null
required

The date and time when the short link will expire in ISO-8601 format. Must be in the future.

expiredUrl
string<uri> | null
required

The URL to redirect to when the short link expires.

trackConversion
boolean
default:false
required

[BETA] Whether to track conversions for the short link.

flexible
boolean
default:false
required

Whether the short link is flexible.

doIndex
boolean
default:false
required

Whether search engines can index the short link.

password
string | null
required

The password required to access the short link destination URL.

externalId
string | null
required

This is the ID of the link in your database.

proxy
boolean
default:false
required

Whether the short link uses the custom link preview feature.

title
string | null
required

The title of the short link generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

description
string | null
required

The description of the short link generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

image
string | null
required

The image of the short link generated via api.codeqr.io/metatags. Will be used for custom link preview if proxy is true.

video
string | null
required

The video of the short link.

rewrite
boolean
default:false
required

Whether the short link uses link cloaking.

ios
string | null
required

The iOS destination URL for the short link for iOS device targeting.

android
string | null
required

The Android destination URL for the short link for Android device targeting.

geo
object | null
required

Geographic targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. Learn more: https://codeqr.link/geo

publicStats
boolean
default:false
required

Whether the short link statistics are publicly accessible.

tagId
string | null
required
deprecated

[DEPRECATED (use tags instead)]: The unique ID of the tag assigned to the short link.

tags
Tag · object[] | null
required

The tags assigned to the short link.

comments
string | null
required

The comments for the short link.

notificationToken
string | null
required

The notification token of the short link.

utm_source
string | null
required

The UTM source of the short link.

utm_medium
string | null
required

The UTM medium of the short link.

utm_campaign
string | null
required

The UTM campaign of the short link.

utm_term
string | null
required

The UTM term of the short link.

utm_content
string | null
required

The UTM content of the short link.

userId
string
required

The ID of the user who created the short link.

projectId
string
required

The ID of the project of the short link.

clicks
number
default:0
required

The number of clicks on the short link.

leads
number
default:0
required

The number of leads generated by the short link.

sales
number
default:0
required

The number of sales generated by the short link.

saleAmount
number
default:0
required

The amount of the sale generated by the link.

lastClicked
string | null
required

The date and time when the short link was last clicked.

createdAt
string
required

The date and time when the short link was created.

updatedAt
string
required

The date and time when the short link was last updated.

preRedirection
boolean
default:false
required

Whether the short link has pre-redirection.

isFormMandatory
boolean
default:false
required

If the form is mandatory for the page.

filled
boolean
default:false
required

Whether the link is filled or not.

The complete URL of the short link, including the https protocol (for example, https://codeqr.link/try).

qrCode
string<uri>

The complete QR code URL for the short link (for example, https://api.codeqr.io/qr?url=https://codeqr.link/try).

pageId
string | null

The ID of the page to redirect to before the link destination.

pageUrl
string | null

The URL of the page to redirect to before the link destination.