API Documentation

HidURL API Reference

Integrate URL shortening into your applications with our simple REST API.

Authentication

All API requests require authentication using a Bearer token. Include it in the Authorization header:

Authorization: Bearer your_api_token

Get your API token from the API Keys dashboard. All users can create API tokens.

Base URL

https://api.hidurl.com/v1/public

All API endpoints are prefixed with this base URL.

Rate Limits

Pro Plan

60/min

10K requests/day

Bulk Plan

300/min

100K requests/day

Enterprise

Unlimited

Custom limits

Endpoints

POST
/shorten

Create a shortened URL

Request Body

{

"url": "string (required)",

"custom_alias": "string (optional, min 5 chars)"

}

Example

curl -X POST https://api.hidurl.com/v1/public/shorten \
  -H "Authorization: Bearer your_api_token" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/very-long-url"}'

Response

{

"id": 123,

"short_code": "abc123",

"short_url": "https://hidurl.com/abc123",

"original_url": "https://example.com/...",

"clicks": 0

}

POST
/shorten
with custom alias

Create a shortened URL with a custom alias

Example

curl -X POST https://api.hidurl.com/v1/public/shorten \
  -H "Authorization: Bearer your_api_token" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/page", "alias": "mylink"}'
POST
/bulk

Create multiple shortened URLs at once (Bulk plan required)

Request Body

{

"urls": ["string", "string", ...]

}

Example

curl -X POST https://api.hidurl.com/v1/public/bulk \
  -H "Authorization: Bearer your_api_token" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://example1.com", "https://example2.com"]}'
GET
/urls/{code}

Get information about a shortened URL

Example

curl https://api.hidurl.com/v1/public/urls/abc123 \
  -H "Authorization: Bearer your_api_token"
GET
/urls/{code}/stats

Get detailed statistics for a URL (Pro plan required)

Example

curl https://api.hidurl.com/v1/public/urls/abc123/stats \
  -H "Authorization: Bearer your_api_token"

Response

{

"total_clicks": 1234,

"devices": { "desktop": 800, "mobile": 400, "tablet": 34 },

"browsers": { "Chrome": 600, "Safari": 400, ... },

"os": { "Windows": 500, "macOS": 400, ... },

"referrers": { "twitter.com": 200, "direct": 500, ... }

}

DELETE
/urls/{code}

Delete a shortened URL

Example

curl -X DELETE https://api.hidurl.com/v1/public/urls/abc123 \
  -H "Authorization: Bearer your_api_token"

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Feature not available on your plan
404Not Found - URL not found
429Rate Limit Exceeded

Ready to get started?

Create your API key and start integrating in minutes.