REST API Documentation

Complete REST API reference for UseClick.io integration

Quick Start

1. Generate API Key

Sign in and visit API Keys Settings to create your first API key.

2. Authentication

All API requests require authentication using an API key in the Authorization header:

Authorization: Bearer uc_live_YOUR_API_KEY_HERE

3. Base URL

https://useclick.io/api/v1

Rate Limits

API rate limits vary by subscription plan:

Starter
300 requests/minute
Growth
600 requests/minute
Pro
1,200 requests/minute
Business
3,000 requests/minute

Note: Free plan does not have API access. Upgrade to Starter or higher to use the API.

API Endpoints

POST/api/v1/links

Create a new short link. Optional: slug (auto-generated if not provided), branded_domain (your custom domain like 'go.yourdomain.com'), group_id (campaign UUID)

Request Body

{
  "target_url": "https://example.com",
  "slug": "optional-custom-slug",
  "branded_domain": "go.yourdomain.com",
  "group_id": "optional-campaign-uuid"
}

Example Request

curl -X POST https://useclick.io/api/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target_url": "https://example.com",
    "slug": "my-link",
    "branded_domain": "go.yourdomain.com"
  }'
GET/api/v1/links

List all your links

Example Request

curl -X GET https://useclick.io/api/v1/links \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/v1/links/:slug

Get details of a specific link by slug

Example Request

curl -X GET https://useclick.io/api/v1/links/my-slug \
  -H "Authorization: Bearer YOUR_API_KEY"
PUT/api/v1/links/:slug

Update an existing link. All fields optional. Use branded_domain (your custom domain) or group_id (campaign UUID)

Request Body

{
  "target_url": "https://new-url.com",
  "branded_domain": "go.yourdomain.com",
  "group_id": "optional-campaign-uuid"
}

Example Request

curl -X PUT https://useclick.io/api/v1/links/my-slug \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target_url": "https://new-url.com",
    "branded_domain": "go.yourdomain.com"
  }'
DELETE/api/v1/links/:slug

Delete a link (this also deletes all associated clicks)

Example Request

curl -X DELETE https://useclick.io/api/v1/links/my-slug \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/v1/clicks

Get click analytics for your links. Optional: add ?link_slug=your-slug to filter by specific link

Query Parameters

NameTypeDefaultDescription
link_slugstring-Filter by specific link slug (optional)

Example Request

curl -X GET "https://useclick.io/api/v1/clicks?link_slug=my-slug" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/v1/auth/verify

Verify your API key is valid and get authentication status

Example Request

curl -X GET https://useclick.io/api/v1/auth/verify \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/v1/links/:slug/geo-targets

Get all geo-targeting rules for a specific link

Example Request

curl -X GET https://useclick.io/api/v1/links/my-slug/geo-targets \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/v1/links/:slug/geo-targets

Create a new geo-targeting rule for a link (redirect visitors from specific countries to different URLs)

Request Body

{
  "country_code": "US",
  "target_url": "https://us-specific-url.com"
}

Example Request

curl -X POST https://useclick.io/api/v1/links/my-slug/geo-targets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country_code": "US",
    "target_url": "https://us-specific-url.com"
  }'
DELETE/api/v1/links/:slug/geo-targets

Delete a geo-targeting rule for a specific country

Query Parameters

NameTypeDefaultDescription
country_codestring-2-letter ISO country code (e.g., US, GB, DE)

Example Request

curl -X DELETE "https://useclick.io/api/v1/links/my-slug/geo-targets?country_code=US" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Format

Success Response

{
  "data": { ... }
}

Error Response

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable error message"
  }
}

Common Error Codes

  • UNAUTHORIZED - Invalid or missing API key
  • RATE_LIMIT_EXCEEDED - Too many requests
  • NOT_FOUND - Resource not found
  • VALIDATION_ERROR - Invalid request data
  • INTERNAL_ERROR - Server error

Need Help?

If you have questions or need assistance with the API, please contact our support team at [email protected]

Note: Response times vary by plan. See our pricing page for details.