Create a link (link to this section)
/api/v1/links Creates a new short link. The destination URL is verified against safety and compliance rules before the link goes live. Returns 422 with compliance_failed if any hard-block rule is triggered.
Headers
-
x-workspace-idstring optionalTarget workspace. Falls back to the user's default workspace.
-
Idempotency-Keyuuid optionalUUID v4 that makes the request idempotent for 24 hours. Safe to retry on network failure.
Request body required
Responses
- 201
Link created. Returns a Link plus
X-RateLimit-*headers and any non-blockingwarnings. - 401
Missing or invalid authentication.
- 404
Resource not found or access denied.
- 422
Validation failed, or a compliance check blocked the link (ComplianceFinding list).
- 429
Rate limit exceeded. See
Retry-After.
POST /api/v1/links
# Content-Type: application/json
{
"destinationUrl": "https://example.com/summer-sale",
"slug": "summer24",
"title": "Summer Sale 2024",
"tags": ["campaign", "summer"],
"utmSource": "instagram",
"utmMedium": "social",
"utmCampaign": "summer-sale-2024"
} Response 201
{
"id": "clx1234abcdef",
"slug": "summer24",
"shortUrl": "https://go.acme.com/summer24",
"destinationUrl": "https://example.com/summer-sale",
"status": "ACTIVE",
"complianceStatus": "APPROVED",
"createdAt": "2026-07-16T09:30:00.000Z",
"warnings": []
} Response 422
{
"error": "compliance_failed",
"message": "This link did not pass our safety and compliance checks.",
"findings": [
{
"ruleId": "web_risk",
"ruleName": "Google Web Risk",
"severity": "CRITICAL",
"passed": false,
"message": "This URL is flagged as phishing by Google Web Risk.",
"hint": null
}
]
}