LinkShor
Features Pricing Developers Blog Contact
Log In Start Free

← Developers

SDK Examples

Ready-to-use code snippets for popular languages.

PHP

$ch = curl_init('https://linkshor.com/api/create');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Authorization: Bearer YOUR_TOKEN',
  'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
  'organization_key' => 'YOUR_ORG_KEY',
  'url_group_id' => '1',
  'url' => 'https://example.com/page',
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

Laravel

use Illuminate\Support\Facades\Http;

$response = Http::withToken('YOUR_TOKEN')
  ->post('https://linkshor.com/api/create', [
    'organization_key' => 'YOUR_ORG_KEY',
    'url_group_id' => '1',
    'url' => 'https://example.com/page',
  ]);

$shortUrl = $response->json('data.short_url');

Node.js

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/page',
  }),
});
const { data } = await response.json();

Python

import requests

response = requests.post(
  'https://linkshor.com/api/create',
  headers={'Authorization': f'Bearer {token}'},
  json={
    'organization_key': 'YOUR_ORG_KEY',
    'url_group_id': '1',
    'url': 'https://example.com/page',
  }
)
short_url = response.json()['data']['short_url']

Go

body := []byte(`{
  "organization_key": "YOUR_ORG_KEY",
  "url_group_id": "1",
  "url": "https://example.com/page"
}`
)

req, _ := http.NewRequest("POST", "https://linkshor.com/api/create", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")

client := &http.Client{}
resp, _ := client.Do(req)
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