LinkShor
Features Pricing Developers Blog Contact
Log In Start Free

API Documentation

Create and manage short links programmatically using the LinkShor REST API.

Authentication

All API requests require a Bearer token in the Authorization header.

Generate your token in Dashboard → General Settings → API.

Authorization: Bearer your-api-token

Base URL: https://linkshor.com/api

POST

Create Short Link

Create a new shortened link.

Endpoint

POST /api/create

Request Body (JSON)

Parameter Type Required Description
organization_key string Yes Your organization secret key
url_group_id string Yes URL group API ID
url string Yes Long URL to shorten (must start with http/https)
alias string No Custom alias (auto-generated if empty)
redirect_type integer No 301, 302, 303, 307, or 308 (default: 301)

cURL Example

curl -X POST https://linkshor.com/api/create \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{     "organization_key": "YOUR_ORG_KEY",     "url_group_id": "1",     "url": "https://example.com/long-page",     "alias": "my-link"   }'

JavaScript Example

const response = await fetch('https://linkshor.com/api/create', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    organization_key: 'YOUR_ORG_KEY',
    url_group_id: '1',
    url: 'https://example.com/long-page'
  })
});
const data = await response.json();

● 200 — Success

{
  "data": {
    "id": 42,
    "short_url": "https://yourdomain.com/my-link",
    "url": "https://example.com/long-page",
    "domain": "yourdomain.com",
    "alias": "my-link",
    "redirect_type": 301
  },
  "code": 0,
  "errors": []
}

● Error Responses

Status Code Meaning
4013, 10, 11Invalid or missing API token
40112, 13, 17Invalid organization key or inactive org
4052Method not allowed (use POST)
4224Organization key missing
4225URL group ID missing
4226, 7URL missing or invalid
4228, 9Alias format invalid or too long
42214URL group not found
42215Alias already taken
42218URL blocked by anti-phishing check
429—Rate limit exceeded (60 requests/minute)

Rate Limits

The API is rate-limited to 60 requests per minute per token. If you exceed this limit, you'll receive a 429 Too Many Requests response.

Getting Started

  1. Sign up or log in to your LinkShor account
  2. Go to General Settings → API in your dashboard
  3. Generate a Personal Access Token
  4. Create an Organization Secret Key
  5. Note your URL Group API ID (found in URL Groups settings)
  6. Make your first API call using the examples above

Need help? Contact us

LinkShor

LinkShor is your all-in-one link management platform. Create branded short URLs, build bio pages, track clicks in real time, and grow your audience with tools built for marketers and teams.

Important Links

  • Terms & Conditions
  • Privacy Policy
  • Blog
  • Contact

Contact

  • 304 S Jones Blvd #1190
    Las Vegas, NV 89107
  • Send a message
Copyright © 2026 LinkShor