API Overview
Complete API reference for dco.ink
api reference
API Overview
The dco.ink API allows you to programmatically create and manage short links.
Base URL
https://dco.ink/api
Authentication
All API requests require authentication using a Bearer token:
Authorization: Bearer YOUR_TOKEN
Get your token after signing in at dco.ink/login.
Endpoints
System
GET /system/status- Check system healthPOST /system/feedback- Submit feedback
Authentication
GET /auth/google/url- Get Google OAuth URLGET /auth/github/url- Get GitHub OAuth URLPOST /auth/logout- Logout current session
Links
POST /links- Create a new short linkGET /links- List all linksGET /links/:code- Get link detailsPATCH /links/:code- Update a linkDELETE /links/:code- Delete a link
Analytics
GET /analytics/:code- Get link analyticsGET /analytics/:code/clicks- Get click data
Subscriptions
GET /subscription- Get current subscriptionPOST /subscription- Create subscriptionPATCH /subscription- Update subscriptionDELETE /subscription- Cancel subscription
Request Format
All POST/PATCH requests should use JSON:
Content-Type: application/json
Response Format
All responses return JSON:
{
"success": true,
"data": { /* response data */ },
"error": null
}
Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing token |
| 403 | Forbidden - Quota exceeded |
| 404 | Not Found - Resource doesn’t exist |
| 500 | Server Error - Internal error |
Rate Limits
- Free tier: 100 requests/hour
- Pro tier: 1000 requests/hour
Examples
See the Examples section for common use cases.