Admin API
Automate every LinkQuick link and attribution workflow with the stable v1 API.
The LinkQuick Admin API is a public, versioned HTTP API for trusted internal services and agents. Every request is scoped to the organization that owns the API key, so an organization identifier is never accepted from the client.
Base URL
https://linkquick.melvynx.dev/api/v1The complete machine-readable contract is available without authentication:
https://linkquick.melvynx.dev/api/v1/openapi.jsonAn agent-ready operational guide is also available at /api/v1/agent-skill.
Authentication
Create a revocable organization API key in Settings → API keys, then send it as a bearer token:
Authorization: Bearer nsk_••••••••The x-api-key header is accepted for compatibility. Never put a key in a URL,
browser bundle, log, prompt, or source-control repository.
First request
curl https://linkquick.melvynx.dev/api/v1/me \
-H "Authorization: Bearer $LINKQUICK_API_KEY"Use /me during setup to confirm which organization the key controls.
Resources
| Resource | Operations |
|---|---|
/domains | List, register, read, and update short-link domains |
/links | List and create canonical parent links |
/links/{id} | Read, update, or archive any link |
/links/{id}/sublinks | List and create placement sublinks |
/analytics | Read organization totals, daily series, and top links |
/links/{id}/analytics | Read parent, sublink, and imported statistics |
/customers | List attributed customers and filter by link |
/customers/{externalId} | Read a customer and their event journey |
/events | List events or ingest a trusted server event/conversion |
/track/lead | Bind a click to a customer, by user ID or email alone |
/track/sale | Record revenue for a customer that already has a lead |
/imports | Inspect migration batches and row-level results |
Pagination
List endpoints accept limit from 1 to 100 and an opaque cursor. Pass the
returned cursor unchanged on the next request:
{
"data": [],
"pagination": {
"cursor": "opaque-cursor-or-null",
"isDone": false
}
}Idempotent writes
Creating a parent, creating a sublink, and ingesting an event or lead require an
idempotencyKey. Repeating the same request with the same key returns the
existing result. Reusing that key for different data returns 409.
POST /track/sale accepts invoiceId in place of an explicit key, so a
redelivered billing webhook cannot double-count revenue. Only the business
identity of the event matters — a retry that carries a later timestamp is still
the same event.
Use a stable business identifier such as campaign-launch-parent-v1, not a new
random value on every retry.
Errors
API errors have a stable shape:
{
"error": {
"code": "validation_error",
"message": "destinationUrl must be a valid HTTP or HTTPS URL"
}
}| Status | Meaning |
|---|---|
401 | Key missing, invalid, expired, or revoked |
404 | Resource absent or outside the key's organization |
409 | Slug, domain, or idempotency conflict |
413 | JSON request exceeds 64 KB |
422 | Validation failed |
429 | API-key rate limit exceeded |
500 | Unexpected server failure; retry with backoff |
503 | A required LinkQuick integration is unavailable |
Reliability conventions
- Timestamps are Unix milliseconds.
- Revenue uses integer minor units and a three-letter currency code.
- Analytics ranges are inclusive UTC days and cannot exceed 367 days.
- Cursors are opaque and must not be decoded or modified.
DELETE /links/{id}archives the URL; published links are never physically deleted.- A sublink inherits its parent's destination and social metadata.
- Links are active by default; an unverified domain prevents redirects until it is verified.
Agent usage
Agents should fetch the OpenAPI document at startup, keep credentials in secret
storage, reuse idempotency keys on retries, follow every pagination cursor, and
back off after 429 or transient 500 responses.