Links
URL shortening and link management
📄️ List links
Returns a paginated list of links for the authenticated organization
📄️ Create a link
Creates a new short link for the authenticated organization. Respects monthly tier limits. Optionally accepts a custom short code (Pro+), UTM parameters (Pro+), tags, expiry, and redirect type
📄️ Get a link by short code
Looks up a link by its short code instead of its internal ID
📄️ Export links as CSV
Exports all active links for the authenticated organization as a CSV file. Returns a text/csv response with a Content-Disposition attachment header
📄️ Import links from CSV
Bulk-imports links from a CSV payload. Accepts a JSON array of rows parsed from CSV. Each row must have at least a destination_url. Returns counts of created, skipped (duplicate short codes), and failed rows
📄️ Delete a link
Soft-deletes a link belonging to the authenticated organization and removes its KV mapping so it stops redirecting
📄️ Get a link
Returns details for a single link belonging to the authenticated organization
📄️ Update a link
Updates a link's destination URL, title, tags, expiry, UTM parameters, redirect type, or forward-query-params setting. Updates are written to both D1 and KV atomically
📄️ Get link analytics
Returns click analytics for a single link. The time range is capped according to the organization's tier retention window (7 days for Free, 365 days for Pro, unlimited for Business/Unlimited)