Appearance
REST API Quickstart
The dynm.link REST API is hosted at https://api.dynm.link. All requests must be authenticated using an API key passed in the headers.
Authentication
Add the following header to all your API requests:
http
x-api-key: $DYNM_API_KEYYou can generate and manage your API keys in the dashboard at https://www.dynm.link/account/api-keys.
Creating a Microlink
To create a new redirect microlink, send a POST request to /microlinks:
bash
curl -X POST https://api.dynm.link/microlinks \
-H "Content-Type: application/json" \
-H "x-api-key: $DYNM_API_KEY" \
-d '{"type":"redirect","content":{"web":"https://example.com"}}'Social preview on a redirect
By default a redirect passes crawlers straight through to its destination, so pasting the short link in Slack, iMessage, or X shows the destination page's own card. Set content.preview to custom to serve your own card instead:
bash
curl -X POST https://api.dynm.link/microlinks \
-H "Content-Type: application/json" \
-H "x-api-key: $DYNM_API_KEY" \
-d '{"type":"redirect","content":{"web":"https://example.com","preview":"custom"},
"title":"Launch week","description":"Everything shipping this week"}'The two are exclusive. Sending title, description, or thumbnail on a redirect whose preview is follow returns 400 preview-conflict; to drop a custom card, set preview back to follow and those fields to null in the same request.
Managing Microlinks
The API provides endpoints to list, retrieve, update, and delete your microlinks:
- List links:
GET /microlinks(filter by type or host) - Get link:
GET /microlinks/{id} - Update link:
PUT /microlinks/{id} - Delete link:
DELETE /microlinks/{id} - QR code:
GET /microlinks/{id}/qrreturns a clean SVG QR code.
Query Parameters & Analytics
Microlinks support query parameter passthrough and analytics segmentation:
- Redirect Passthrough: Redirect microlinks automatically forward incoming query parameters to the destination URL. If the same query parameter exists on both the short link and the destination, the incoming short link's value replaces the destination's value.
- Analytics Segmentation: Arbitrary query parameters are recorded under analytics to segment your visits (e.g. tracking campaigns using
?src=yt,?src=qr, or?campaign=launch). - Reserved Parameters: Parameters whose decoded keys start with
_are reserved for system behavior and are never forwarded or recorded as analytics dimensions. - QR Code Analytics:
GET /microlinks/{id}/qrreturns a clean QR code representing the short URL directly. If you want QR-specific analytics tracking, append your own custom tags to the link (for example, generating or printing a QR with?src=qr).
For detailed request and response schemas, see the interactive REST API Reference or the raw OpenAPI Specification.