API Documentation
Welcome to the yLnk External Client API documentation. This API allows you to programmatically create, manage, and analyze short links using API key authentication.
Getting Started
Authentication
All API requests require authentication using an API key. You can create and manage API keys from your Settings page.
Using API Keys
Include your API key using the X-API-Key header:
X-API-Key: YOUR_API_KEY
Note: External client APIs only accept API keys via the X-API-Key header. JWT tokens (Authorization Bearer) are not supported for these endpoints.
Base URL
https://api.ylnk.cc/v2/external/client
Rate Limits
Rate limits are based on your subscription plan:
- Free Plan: 1,000 requests/hour
- Starter Plan: 5,000 requests/hour
- Growth Plan: 10,000 requests/hour
- Pro Plan: 50,000 requests/hour
Rate limit information is included in response headers:
X-RateLimit-Limit: Maximum requests per hourX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Unix timestamp when the rate limit resets
Response Format
All API responses follow this structure:
{
"status": true,
"message": "Success message",
"data": { ... }
}
Error Handling
Errors are returned with appropriate HTTP status codes:
400 Bad Request: Invalid request parameters401 Unauthorized: Missing or invalid API key403 Forbidden: Insufficient permissions or plan limits exceeded404 Not Found: Resource not found429 Too Many Requests: Rate limit exceeded500 Internal Server Error: Server error
Error response format:
{
"status": false,
"message": "Error message",
"error": ["Detailed error information"]
}
Endpoints
Short Links
Analytics
Code Examples
Choose your preferred language:
