Skip to content

Update Link

Updates one or more properties of an existing link. Only the fields you include in the request body are changed; omitted fields remain unchanged.

PATCH /v1/links/{link_id}
links:write

Path Parameters

ParameterTypeRequiredDescription
link_idstring (UUID)YesThe unique identifier of the link to update.

Request Body

All fields are optional. Include only the fields you want to change.

ParameterTypeDescription
urlstringNew destination URL.
labelsstring[]Replace the full label set (max 10).
enabledbooleanEnable or disable the link. Disabled links return 410 Gone.
routing_rulesobject[]Replace the full routing rules array.

Request Examples

Terminal window
curl -X PATCH https://xqr.co/api/v1/links/d47f2e1a-8c3b-4a5d-9e6f-1234567890ab \
-H "Authorization: Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/summer-sale-v2?utm_source=qr",
"labels": ["campaign", "summer", "updated"]
}'

Response

200 OK

The updated link object.

{
"data": {
"id": "d47f2e1a-8c3b-4a5d-9e6f-1234567890ab",
"short_url": "https://xqr.co/summer24",
"short_code": "summer24",
"destination": "https://example.com/summer-sale-v2?utm_source=qr",
"enabled": true,
"labels": ["campaign", "summer", "updated"],
"routing_rules": [],
"scan_count": 1483,
"last_scan_at": "2026-03-20T09:12:44Z",
"expires_at": "2026-09-30T23:59:59Z",
"created_at": "2026-03-01T10:00:00Z",
"updated_at": "2026-03-21T15:45:00Z"
},
"meta": {
"request_id": "req_3c4d5e6f70890123",
"rate_limit": {
"limit": 600,
"remaining": 596,
"reset": 1742572800
}
}
}

Was this page helpful?