Domains and Imports API
Manage short-link domain settings and inspect migration batches.
Domains
List the domains available to the organization:
curl https://linkquick.melvynx.dev/api/v1/domains \
-H "Authorization: Bearer $LINKQUICK_API_KEY"Register and provision a hostname in the LinkQuick Vercel project:
curl -X POST https://linkquick.melvynx.dev/api/v1/domains \
-H "Authorization: Bearer $LINKQUICK_API_KEY" \
-H "Content-Type: application/json" \
--data '{"hostname":"go.example.com","isPrimary":true,"fallbackUrl":"https://example.com"}'The response contains the current verificationChallenges. Configure those DNS
values, then use the organization domain settings to check or connect DNS while
the Admin API verification endpoints are finalized. Links are active when they
are created, but redirects remain unavailable until the domain is verified.
Update the fallback or primary setting with PATCH /domains/{domainId}:
{ "fallbackUrl": "https://example.com/not-found", "isPrimary": true }Start an import
The API accepts canonical CSV or Dub CSV content up to 1 MB and 1,000 rows. A hash of the source, domain, conflict strategy, and content makes retries idempotent.
curl -X POST https://linkquick.melvynx.dev/api/v1/imports \
-H "Authorization: Bearer $LINKQUICK_API_KEY" \
-H "Content-Type: application/json" \
--data "$(jq -n --rawfile content links.csv '{
source: "csv",
domainId: "DOMAIN_ID",
conflictStrategy: "skip",
content: $content
}')"The response is 202 Accepted; processing continues in bounded batches.
Import reports
The API exposes durable progress and row-level errors so agents can monitor and validate every batch.
curl "https://linkquick.melvynx.dev/api/v1/imports?limit=20" \
-H "Authorization: Bearer $LINKQUICK_API_KEY"Use GET /imports/{importId} for counters and
GET /imports/{importId}/items for paginated row results. Imports are
idempotent, never delete existing links, and keep historical aggregate
snapshots separate from live analytics.