API Documentation

Integrate PocoLink's powerful features into your own application.

Authentication

All API requests must be authenticated. Include your API key in the `Authorization` header of your request as a Bearer token.

Authorization: Bearer YOUR_API_KEY

You can find your API key in your account settings on the dashboard.

Endpoint: Create a Link

This endpoint allows you to programmatically shorten a long URL.

Method: POST

URL: https://api.pocolink.com/v1/links

Request Body (JSON)

{
  "url": "https://www.yourwebsite.com/your-long-url-to-shorten",
  "custom_slug": "my-cool-api-link"
}
  • url (string, required): The original URL you want to shorten.
  • custom_slug (string, optional): A custom back-half for your link. If not provided, a random one will be generated.

Success Response (201 Created)

{
  "success": true,
  "link": {
    "id": "lnk_12345",
    "short_url": "https://pocolink.com/my-cool-api-link",
    "long_url": "https://www.yourwebsite.com/your-long-url-to-shorten",
    "created_at": "2025-08-20T10:00:00Z"
  }
}

Error Response (400 Bad Request)

{
  "success": false,
  "error": "The custom slug 'my-cool-api-link' is already taken."
}

Additional Endpoints

Get Link Analytics

Method: GET

URL: https://api.pocolink.com/v1/links/[link_id]/analytics

Retrieve detailed analytics for a specific link including click counts, geographic data, and device information.

Update Link

Method: PATCH

URL: https://api.pocolink.com/v1/links/[link_id]

Update link properties such as destination URL or custom slug.

Delete Link

Method: DELETE

URL: https://api.pocolink.com/v1/links/[link_id]

Permanently delete a link from your account.

Rate Limiting

API requests are limited to 1000 requests per hour per API key. If you exceed this limit, you'll receive a 429 status code. Check the X-RateLimit-Remaining header to see your remaining quota.

Webhooks (Coming Soon)

We are working on webhooks that will notify your application in real-time when a link is clicked. Stay tuned!

Support

Need help with the API? Contact our developer support team at api@pocolink.com or visit our contact page.