Links · links.update
PUT/links/{id}links.update
Update a link
Change an existing link. Send the fields you want to change; the id in the path identifies the link.
- Base URL
- https://api.redirhub.com/v1
- Auth
- Bearer token
- Idempotent
- Yes
- Returns
- application/json
The request
Send a JSON body to PUT /links/{id}. Every field is optional — send only what you want to set. The id path segment identifies the record.
# Update a link
curl -X PUT "https://api.redirhub.com/v1/links/9f2a7c31-4b8e-4a02-9d1f-0c6b7e5a1d44" \
-H "Authorization: Bearer $REDIRHUB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"qr": {
"theme": "light",
"color": "string",
"logo": true,
"show_url": true,
"margin": "s"
}
}'Path parameters
| Parameter | Description |
|---|---|
| idRequiredstring |
Body parameters
| Field | Description |
|---|---|
| qroptionalobject |
The response
A 200 returns the record as JSON.
{
"id": "9f2a7c31-4b8e-4a02-9d1f-0c6b7e5a1d44",
"handler": "string",
"host": "go.acme.com",
"alias": "spring-sale",
"url": "https://go.acme.com/spring-sale",
"https": true,
"file": null,
"destination": "https://acme.com/campaigns/spring",
"destinations": [
"https://acme.com/campaigns/spring"
],
"destination_routing": "weighted",
"plugins": [
"analytics"
],
"has_password": true,
"total_clicks": 1,
"type": "link",
"title": "Spring Sale 2026",
"description": "Landing page for the spring campaign",
"status": "301",
"paused_by": "user",
"forward_path": true,
"forward_query": true,
"utm": {
"source": "string",
"medium": "string",
"campaign": "string",
"term": "string",
"content": "string"
},
"qr": {
"theme": "string",
"color": "string",
"logo": true,
"show_url": true,
"margin": "string"
},
"monitor": "false",
"is_notify": false,
"is_switch_unbroken_destination": false,
"tags": [
"campaign",
"q2"
],
"created_by": "user@acme.com",
"creator": {
"id": "9f2a7c31-4b8e-4a02-9d1f-0c6b7e5a1d44",
"name": "Acme"
},
"created_via": "api",
"created_at": "2026-08-01T09:14:22Z",
"updated_at": "2026-08-01T09:14:22Z",
"expired_at": null
}Status codes
200
SuccessThe updated record. Its handler and source URL never change; short links also take a partial
qr style, or null to remove the QR code. A change to its destinations, UTM parameters, redirect type, status or password is added to its history.401
UnauthenticatedUnauthenticated
422
Validation failedA field was rejected.
errors lists every field with its reason.429
Too many requestsToo many requests
482
Bad requestThe action would exceed a plan limit of the current workspace.
484
Bad requestThe workspace role of the authenticated user is too low for this action.
What usually comes next
One call is rarely the whole job. These are the endpoints most integrations reach for around this one.
