Skip to main content
POST
/
v1
/
links
Create a link
curl --request POST \
  --url https://linkryse.com/v1/links \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "domain": "<string>",
  "key": "<string>",
  "tags": [
    {}
  ],
  "publicStats": true
}
'

Body Parameters

url
string
required
The destination URL where the short link will redirect.
domain
string
The custom domain for the short link. Defaults to linkry.se if not provided.
key
string
The custom slug (alias) for the short link. If not provided, a random 7-character key will be generated.
tags
array
An array of tags to assign to the link.
publicStats
boolean
Whether to enable public statistics for this link. Defaults to false.

Response

Returns the created Link Object.

Code Examples

cURL
curl --request POST \
  --url https://linkryse.com/v1/links \
  --header 'Authorization: Bearer sk_live_...' \
  --header 'Content-Type: application/json' \
  --data '{
    "url": "https://google.com",
    "domain": "dub.sh",
    "key": "search"
  }'
Node.js
const link = await linkryse.links.create({
  url: 'https://google.com',
  domain: 'dub.sh',
  key: 'search'
});