Skip to Content
API ReferenceOverview

API Reference Overview

The Snip URL API is organized around REST principles. It uses standard HTTP methods, returns JSON-encoded responses, and uses standard HTTP response codes.

Base URL

https://snipurl.click/api/v1

All endpoints described in this documentation are relative to this base URL.

Versioning

The API is versioned via the URL path. The current version is v1. When breaking changes are introduced, a new version (v2, v3, etc.) will be released. Existing versions will continue to work for a deprecation period.

Authentication

All API requests require a valid API key passed in the Authorization header:

Authorization: Bearer snip_live_your_key_here

See Authentication for details on creating and managing keys.

HTTP Methods

MethodUsage
GETRetrieve resources
POSTCreate new resources
PATCHUpdate existing resources (partial update)
DELETEDelete resources

Request Format

  • Request bodies must be JSON with Content-Type: application/json
  • Query parameters are used for filtering and pagination on GET requests
  • Path parameters are used for identifying specific resources (e.g., /links/:id)

Response Format

Success Response

{ "success": true, "data": { ... } }

For paginated endpoints, a meta object is included:

{ "success": true, "data": [ ... ], "meta": { "page": 1, "per_page": 20, "total": 142, "total_pages": 8 } }

Error Response

{ "success": false, "error": { "code": "ERROR_CODE", "message": "Human-readable description of the error", "details": { ... } } }

Common HTTP Status Codes

CodeMeaning
200Success
201Created (resource was successfully created)
400Bad Request (invalid parameters or body)
401Unauthorized (missing or invalid API key)
403Forbidden (insufficient permissions or limits reached)
404Not Found (resource doesn’t exist or doesn’t belong to you)
409Conflict (e.g., alias already taken)
429Too Many Requests (rate limit exceeded)
500Internal Server Error

Pagination

List endpoints support pagination via query parameters:

ParameterTypeDefaultDescription
pageinteger1Page number (1-based)
per_pageinteger20Items per page (max 100)

Date Formats

All dates in requests and responses use ISO 8601 format with timezone:

2025-06-24T10:00:00.000Z

For date range filters in analytics, use ISO 8601 date strings:

?start=2025-01-01T00:00:00Z&end=2025-06-24T23:59:59Z

Available Endpoints

MethodEndpointDescription
POST/linksCreate a short link
GET/linksList your links
GET/links/:idGet a specific link
PATCH/links/:idUpdate a link
DELETE/links/:idDelete a link
POST/links/bulkBulk create links
DELETE/links/bulkBulk delete links

Analytics

MethodEndpointDescription
GET/analytics/:link_idGet analytics for a link
GET/analytics/summaryGet aggregated analytics

QR Codes

MethodEndpointDescription
GET/qr/:short_codeGenerate a QR code

Account

MethodEndpointDescription
GET/accountGet account info
GET/account/usageGet API usage info
Last updated on