Mon-Fri 10am - 6pm
Renew URL Link
Base URL for your account: https://cpaas.studio
POST
/api/v1/urlinks/{id}/renew
Renews an approved URL link for an additional 1 year period. Consumes 1 URLinks credit (urlinks.link). Only approved links can be renewed.
Parameters
| Param | Type | Required | Notes |
|---|---|---|---|
id |
integer | yes | The ID of the URL link to renew. |
Request example
curl -X POST "https://cpaas.studio/api/v1/urlinks/15/renew" \
-H "X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
<?php
$ch = curl_init('https://cpaas.studio/api/v1/urlinks/15/renew');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'],
CURLOPT_POST => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Success response (data)
{
"id": 15,
"name": "Summer Promo Landing Page",
"slug": "summer-promo",
"redirect_url": "https://example.com/promotions/summer-2026",
"status": "approved",
"auto_renew": true,
"clicks_count": 42,
"expires_at": "2028-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. |
URL_LINK_NOT_APPROVED |
422 | Link is pending, rejected, or disabled. |
URL_LINK_EXPIRED |
422 | Link has passed its expiration date and requires renewal. |
URL_LINK_DISABLED |
422 | Link has been disabled by an administrator. |
BILLING_INSUFFICIENT_CREDITS |
402 | Account balance has fewer than 1 URLinks credit. |
Notes
- Renews the link expiration date by +1 year from current expiry (or from today if expired).
Need more context? See Getting started for authentication, the response envelope, and the full error-code reference.