Remplacer un lien court
curl --request PUT \
--url https://api.setteo.io/v1/short-links/{shortLink} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "promo-automne",
"destination_url": "https://example.com/automne",
"label": "Promo automne",
"is_active": false,
"tag_on_sent_id": null,
"tag_on_read_id": null,
"tag_on_clicked_id": 7
}
'import requests
url = "https://api.setteo.io/v1/short-links/{shortLink}"
payload = {
"slug": "promo-automne",
"destination_url": "https://example.com/automne",
"label": "Promo automne",
"is_active": False,
"tag_on_sent_id": None,
"tag_on_read_id": None,
"tag_on_clicked_id": 7
}
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({
slug: 'promo-automne',
destination_url: 'https://example.com/automne',
label: 'Promo automne',
is_active: false,
tag_on_sent_id: null,
tag_on_read_id: null,
tag_on_clicked_id: 7
})
};
fetch('https://api.setteo.io/v1/short-links/{shortLink}', 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://api.setteo.io/v1/short-links/{shortLink}",
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([
'slug' => 'promo-automne',
'destination_url' => 'https://example.com/automne',
'label' => 'Promo automne',
'is_active' => false,
'tag_on_sent_id' => null,
'tag_on_read_id' => null,
'tag_on_clicked_id' => 7
]),
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://api.setteo.io/v1/short-links/{shortLink}"
payload := strings.NewReader("{\n \"slug\": \"promo-automne\",\n \"destination_url\": \"https://example.com/automne\",\n \"label\": \"Promo automne\",\n \"is_active\": false,\n \"tag_on_sent_id\": null,\n \"tag_on_read_id\": null,\n \"tag_on_clicked_id\": 7\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://api.setteo.io/v1/short-links/{shortLink}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"promo-automne\",\n \"destination_url\": \"https://example.com/automne\",\n \"label\": \"Promo automne\",\n \"is_active\": false,\n \"tag_on_sent_id\": null,\n \"tag_on_read_id\": null,\n \"tag_on_clicked_id\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.setteo.io/v1/short-links/{shortLink}")
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 \"slug\": \"promo-automne\",\n \"destination_url\": \"https://example.com/automne\",\n \"label\": \"Promo automne\",\n \"is_active\": false,\n \"tag_on_sent_id\": null,\n \"tag_on_read_id\": null,\n \"tag_on_clicked_id\": 7\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"slug": "promo-ete",
"label": "Promo été",
"destination_url": "https://example.com/landing",
"template_variable_url": "https://stto.io/promo-ete",
"is_active": true,
"clicks_count": 42,
"base_clicks_count": 5,
"tag_on_sent_id": null,
"tag_on_read_id": null,
"tag_on_clicked_id": 7,
"created_at": "2026-07-08T12:00:00Z",
"updated_at": "2026-07-08T12:00:00Z"
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"phone": [
"The phone has already been taken."
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}Liens
Remplacer un lien court
Met à jour un lien court.
PUT
/
v1
/
short-links
/
{shortLink}
Remplacer un lien court
curl --request PUT \
--url https://api.setteo.io/v1/short-links/{shortLink} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "promo-automne",
"destination_url": "https://example.com/automne",
"label": "Promo automne",
"is_active": false,
"tag_on_sent_id": null,
"tag_on_read_id": null,
"tag_on_clicked_id": 7
}
'import requests
url = "https://api.setteo.io/v1/short-links/{shortLink}"
payload = {
"slug": "promo-automne",
"destination_url": "https://example.com/automne",
"label": "Promo automne",
"is_active": False,
"tag_on_sent_id": None,
"tag_on_read_id": None,
"tag_on_clicked_id": 7
}
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({
slug: 'promo-automne',
destination_url: 'https://example.com/automne',
label: 'Promo automne',
is_active: false,
tag_on_sent_id: null,
tag_on_read_id: null,
tag_on_clicked_id: 7
})
};
fetch('https://api.setteo.io/v1/short-links/{shortLink}', 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://api.setteo.io/v1/short-links/{shortLink}",
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([
'slug' => 'promo-automne',
'destination_url' => 'https://example.com/automne',
'label' => 'Promo automne',
'is_active' => false,
'tag_on_sent_id' => null,
'tag_on_read_id' => null,
'tag_on_clicked_id' => 7
]),
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://api.setteo.io/v1/short-links/{shortLink}"
payload := strings.NewReader("{\n \"slug\": \"promo-automne\",\n \"destination_url\": \"https://example.com/automne\",\n \"label\": \"Promo automne\",\n \"is_active\": false,\n \"tag_on_sent_id\": null,\n \"tag_on_read_id\": null,\n \"tag_on_clicked_id\": 7\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://api.setteo.io/v1/short-links/{shortLink}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"promo-automne\",\n \"destination_url\": \"https://example.com/automne\",\n \"label\": \"Promo automne\",\n \"is_active\": false,\n \"tag_on_sent_id\": null,\n \"tag_on_read_id\": null,\n \"tag_on_clicked_id\": 7\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.setteo.io/v1/short-links/{shortLink}")
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 \"slug\": \"promo-automne\",\n \"destination_url\": \"https://example.com/automne\",\n \"label\": \"Promo automne\",\n \"is_active\": false,\n \"tag_on_sent_id\": null,\n \"tag_on_read_id\": null,\n \"tag_on_clicked_id\": 7\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"slug": "promo-ete",
"label": "Promo été",
"destination_url": "https://example.com/landing",
"template_variable_url": "https://stto.io/promo-ete",
"is_active": true,
"clicks_count": 42,
"base_clicks_count": 5,
"tag_on_sent_id": null,
"tag_on_read_id": null,
"tag_on_clicked_id": 7,
"created_at": "2026-07-08T12:00:00Z",
"updated_at": "2026-07-08T12:00:00Z"
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"phone": [
"The phone has already been taken."
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}Authorizations
Token API généré depuis votre espace de travail Setteo.
Path Parameters
Identifiant du lien court.
Example:
1
Body
application/json
Identifiant d’URL unique (lettres, chiffres, tirets et underscores ASCII).
Maximum string length:
255Example:
"promo-automne"
URL de destination. Peut contenir des variables {{variable}} résolues par prospect.
Maximum string length:
2048Example:
"https://example.com/automne"
Maximum string length:
255Example:
"Promo automne"
Example:
false
Example:
null
Example:
null
Example:
7
Response
Lien court mis à jour.
Show child attributes
Show child attributes