Mon-Fri 10am - 6pm
Update URL Link
Base URL for your account: https://cpaas.studio
PUT
/api/v1/urlinks/{id}
Updates name, slug, redirect URL, or auto-renew settings. Modifying link details resets status to pending for administrator re-approval.
Parameters
| Param | Type | Required | Notes |
|---|---|---|---|
name |
string, max 255 | yes | Updated label. |
slug |
string, max 100 | yes | Updated unique slug. |
redirect_url |
url, max 2048 | yes | Updated destination URL. |
auto_renew |
boolean | no | Updated auto-renew toggle. |
Request example
curl -X PUT "https://cpaas.studio/api/v1/urlinks/15" \
-H "X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Sale Updated",
"slug": "summer-promo",
"redirect_url": "https://example.com/promotions/summer-v2",
"auto_renew": true
}'
<?php
$ch = curl_init('https://cpaas.studio/api/v1/urlinks/15');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Summer Sale Updated',
'slug' => 'summer-promo',
'redirect_url' => 'https://example.com/promotions/summer-v2',
'auto_renew' => true,
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Success response (data)
{
"id": 15,
"name": "Summer Sale Updated",
"slug": "summer-promo",
"redirect_url": "https://example.com/promotions/summer-v2",
"status": "pending",
"auto_renew": true,
"clicks_count": 42,
"expires_at": "2027-09-16T17:46:25+00:00",
"created_at": "2026-09-16T17:46:25+00:00"
}
Errors
| Code | Status | When |
|---|---|---|
URL_LINK_NOT_FOUND |
404 | No link with that ID belongs to your account. |
REQ_VALIDATION_FAILED |
422 | Invalid parameters or duplicate slug. |
Notes
- Editing resets the link status to "pending", requiring admin re-approval.
Need more context? See Getting started for authentication, the response envelope, and the full error-code reference.