Update URL
curl --request PUT \
--url https://pref.rio/link/api/urls/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Updated description",
"destination": "https://new-example.com",
"expires_at": "2024-12-31T23:59:59Z",
"image_url": "https://new-example.com/image.jpg",
"short_path": "new-custom-path",
"title": "Updated Title"
}
'import requests
url = "https://pref.rio/link/api/urls/{id}"
payload = {
"description": "Updated description",
"destination": "https://new-example.com",
"expires_at": "2024-12-31T23:59:59Z",
"image_url": "https://new-example.com/image.jpg",
"short_path": "new-custom-path",
"title": "Updated Title"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Updated description',
destination: 'https://new-example.com',
expires_at: '2024-12-31T23:59:59Z',
image_url: 'https://new-example.com/image.jpg',
short_path: 'new-custom-path',
title: 'Updated Title'
})
};
fetch('https://pref.rio/link/api/urls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pref.rio/link/api/urls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Updated description',
'destination' => 'https://new-example.com',
'expires_at' => '2024-12-31T23:59:59Z',
'image_url' => 'https://new-example.com/image.jpg',
'short_path' => 'new-custom-path',
'title' => 'Updated Title'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pref.rio/link/api/urls/{id}"
payload := strings.NewReader("{\n \"description\": \"Updated description\",\n \"destination\": \"https://new-example.com\",\n \"expires_at\": \"2024-12-31T23:59:59Z\",\n \"image_url\": \"https://new-example.com/image.jpg\",\n \"short_path\": \"new-custom-path\",\n \"title\": \"Updated Title\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://pref.rio/link/api/urls/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated description\",\n \"destination\": \"https://new-example.com\",\n \"expires_at\": \"2024-12-31T23:59:59Z\",\n \"image_url\": \"https://new-example.com/image.jpg\",\n \"short_path\": \"new-custom-path\",\n \"title\": \"Updated Title\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pref.rio/link/api/urls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Updated description\",\n \"destination\": \"https://new-example.com\",\n \"expires_at\": \"2024-12-31T23:59:59Z\",\n \"image_url\": \"https://new-example.com/image.jpg\",\n \"short_path\": \"new-custom-path\",\n \"title\": \"Updated Title\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-01-01T12:00:00Z",
"description": "A great website",
"destination": "https://example.com",
"expires_at": "2024-12-31T23:59:59Z",
"id": "550e8400-e29b-41d4-a716-446655440000",
"image_url": "https://example.com/image.jpg",
"short_path": "abc123",
"title": "My Website",
"updated_at": "2024-01-01T12:00:00Z"
}{}{}{}urls
Update URL
Update an existing short URL
PUT
/
urls
/
{id}
Update URL
curl --request PUT \
--url https://pref.rio/link/api/urls/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Updated description",
"destination": "https://new-example.com",
"expires_at": "2024-12-31T23:59:59Z",
"image_url": "https://new-example.com/image.jpg",
"short_path": "new-custom-path",
"title": "Updated Title"
}
'import requests
url = "https://pref.rio/link/api/urls/{id}"
payload = {
"description": "Updated description",
"destination": "https://new-example.com",
"expires_at": "2024-12-31T23:59:59Z",
"image_url": "https://new-example.com/image.jpg",
"short_path": "new-custom-path",
"title": "Updated Title"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Updated description',
destination: 'https://new-example.com',
expires_at: '2024-12-31T23:59:59Z',
image_url: 'https://new-example.com/image.jpg',
short_path: 'new-custom-path',
title: 'Updated Title'
})
};
fetch('https://pref.rio/link/api/urls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pref.rio/link/api/urls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Updated description',
'destination' => 'https://new-example.com',
'expires_at' => '2024-12-31T23:59:59Z',
'image_url' => 'https://new-example.com/image.jpg',
'short_path' => 'new-custom-path',
'title' => 'Updated Title'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pref.rio/link/api/urls/{id}"
payload := strings.NewReader("{\n \"description\": \"Updated description\",\n \"destination\": \"https://new-example.com\",\n \"expires_at\": \"2024-12-31T23:59:59Z\",\n \"image_url\": \"https://new-example.com/image.jpg\",\n \"short_path\": \"new-custom-path\",\n \"title\": \"Updated Title\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://pref.rio/link/api/urls/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated description\",\n \"destination\": \"https://new-example.com\",\n \"expires_at\": \"2024-12-31T23:59:59Z\",\n \"image_url\": \"https://new-example.com/image.jpg\",\n \"short_path\": \"new-custom-path\",\n \"title\": \"Updated Title\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pref.rio/link/api/urls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Updated description\",\n \"destination\": \"https://new-example.com\",\n \"expires_at\": \"2024-12-31T23:59:59Z\",\n \"image_url\": \"https://new-example.com/image.jpg\",\n \"short_path\": \"new-custom-path\",\n \"title\": \"Updated Title\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-01-01T12:00:00Z",
"description": "A great website",
"destination": "https://example.com",
"expires_at": "2024-12-31T23:59:59Z",
"id": "550e8400-e29b-41d4-a716-446655440000",
"image_url": "https://example.com/image.jpg",
"short_path": "abc123",
"title": "My Website",
"updated_at": "2024-01-01T12:00:00Z"
}{}{}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
URL ID
Body
application/json
URL update request
Response
OK
Example:
"2024-01-01T12:00:00Z"
Example:
"A great website"
Example:
"https://example.com"
Example:
"2024-12-31T23:59:59Z"
Example:
"550e8400-e29b-41d4-a716-446655440000"
Example:
"https://example.com/image.jpg"
Example:
"abc123"
Example:
"My Website"
Example:
"2024-01-01T12:00:00Z"
⌘I
