DEVELOPER

Shrinkly API Documentation

Programmatically create, manage and query short links and custom domains.

Base URL
http://app.shrinkly.in/api/v1
Auth
Authorization: Bearer YOUR_API_TOKEN

Quick start
cURL
curl -X POST "http://app.shrinkly.in/api/v1/shrink" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","title":"Example"}'
Replace YOUR_API_TOKEN with the token from your dashboard.
Common response format
{
  "success": false,
  "code": "SOME_CODE",
  "message": "Human readable message"
}
Use code for programmatic handling and message for UI display.
Endpoints
Tip
Use custom_domain_id in /shrink to generate links on your verified custom domain.
POST /shrink
Create a new short link.
URL: http://app.shrinkly.in/api/v1/shrink
Headers
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
Body parameters
FieldTypeRequiredDescription
urlstringYesDestination URL.
slugstringNoCustom short code (must be unique).
titlestringNoOptional link title.
custom_domain_idintNoYour verified domain id (from /domains).
is_protected_link0/1NoEnable password protection.
passwordstringIf protectedPassword (min 8 chars, letter+number+special).
password_confirmstringIf protectedConfirm password.
Example JSON
{
  "url": "https://example.com",
  "slug": "my-custom-slug",
  "title": "My link title",
  "custom_domain_id": 12,
  "is_protected_link": 1,
  "password": "Pass@1234",
  "password_confirm": "Pass@1234"
}
200 OK
{
  "success": true,
  "data": {
    "id": 123,
    "short_url": "https://s.shrinkly.in/my-custom-slug",
    "domain": "s.shrinkly.in",
    "slug": "my-custom-slug",
    "destination": "https://example.com",
    "title": "My link title",
    "is_protected_link": 1
  }
}
422 BAD_URL Invalid URL
422 BAD_SLUG Invalid slug format
409 SLUG_TAKEN Custom slug already taken
403 LIMIT_REACHED Plan limit reached
401 BAD_TOKEN Invalid API token
GET /info
Get link details by id or short_code/short_url.
Example
GET http://app.shrinkly.in/api/v1/info?id=123
Authorization: Bearer YOUR_API_TOKEN
200 OK
{
  "success": true,
  "data": {
    "id": 123,
    "short_url": "https://s.shrinkly.in/abc123",
    "domain": "s.shrinkly.in",
    "slug": "abc123",
    "destination": "https://example.com",
    "clicks": 10,
    "is_active": 1,
    "created_at": "2026-02-15 10:22:00",
    "updated_at": null,
    "title": "My link"
  }
}
POST /delete
Delete a short link by id OR short_url/short_code.
{
  "id": 123
}
200 OK
{
  "success": true,
  "data": {
    "deleted": true,
    "id": 123
  }
}
POST /redirect
Update destination URL of a short link.
{
  "id": 123,
  "new_url": "https://new-example.com"
}
200 OK
{
  "success": true,
  "data": {
    "id": 123,
    "changed": true,
    "old_url": "https://example.com",
    "new_url": "https://new-example.com"
  }
}
POST /bulk
Create multiple short links at once (max 100). Requires bulk feature in plan.
{
  "items": [
    { "url": "https://a.com", "title": "A", "slug": "" },
    { "url": "https://b.com", "title": "B", "slug": "custom-b" }
  ]
}
GET /domains
List your custom domains (filters + pagination).
Query params
ParamTypeDefaultDescription
verifiedint-11 verified only, 0 unverified only, -1 all
pageint1Page number
per_pageint50Items per page (max 200)
Example
GET http://app.shrinkly.in/api/v1/domains?verified=1&page=1&per_page=50
Authorization: Bearer YOUR_API_TOKEN
200 OK
{
  "success": true,
  "data": {
    "items": [
      {
        "id": 12,
        "domain": "links.example.com",
        "is_verified": 1,
        "ssl_status": "active",
        "is_default": 0,
        "created_at": "2026-02-15 10:00:00"
      }
    ],
    "pagination": {
      "page": 1,
      "per_page": 50,
      "total": 1,
      "has_more": false
    }
  }
}