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 health
  • POST /system/feedback - Submit feedback

Authentication

  • GET /auth/google/url - Get Google OAuth URL
  • GET /auth/github/url - Get GitHub OAuth URL
  • POST /auth/logout - Logout current session
  • POST /links - Create a new short link
  • GET /links - List all links
  • GET /links/:code - Get link details
  • PATCH /links/:code - Update a link
  • DELETE /links/:code - Delete a link

Analytics

  • GET /analytics/:code - Get link analytics
  • GET /analytics/:code/clicks - Get click data

Subscriptions

  • GET /subscription - Get current subscription
  • POST /subscription - Create subscription
  • PATCH /subscription - Update subscription
  • DELETE /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

CodeMeaning
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Quota exceeded
404Not Found - Resource doesn’t exist
500Server Error - Internal error

Rate Limits

  • Free tier: 100 requests/hour
  • Pro tier: 1000 requests/hour

Examples

See the Examples section for common use cases.