Actualizar enlace compartido
curl --request PATCH \
--url https://api.locatebyteli.com/devices/share/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"devices": [
"<string>"
],
"ttl": 123
}
'import requests
url = "https://api.locatebyteli.com/devices/share/{id}"
payload = {
"devices": ["<string>"],
"ttl": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({devices: ['<string>'], ttl: 123})
};
fetch('https://api.locatebyteli.com/devices/share/{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://api.locatebyteli.com/devices/share/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'devices' => [
'<string>'
],
'ttl' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.locatebyteli.com/devices/share/{id}"
payload := strings.NewReader("{\n \"devices\": [\n \"<string>\"\n ],\n \"ttl\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.locatebyteli.com/devices/share/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"devices\": [\n \"<string>\"\n ],\n \"ttl\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.locatebyteli.com/devices/share/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"devices\": [\n \"<string>\"\n ],\n \"ttl\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"account": "660e8400-e29b-41d4-a716-446655440000",
"devices": ["770e8400-e29b-41d4-a716-446655440000", "990e8400-e29b-41d4-a716-446655440000"],
"acl": ["aa0e8400-e29b-41d4-a716-446655440000"],
"revoked": false,
"expires_at": "2026-03-20T02:00:00Z",
"unique_views": 5,
"last_accessed_at": "2026-03-18T12:00:00Z",
"created_at": "2026-03-15T00:00:00Z"
}
Shared Sessions
Actualizar enlace compartido
Actualiza un enlace de compartición existente (dispositivos o tiempo de expiración)
PATCH
/
devices
/
share
/
{id}
Actualizar enlace compartido
curl --request PATCH \
--url https://api.locatebyteli.com/devices/share/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"devices": [
"<string>"
],
"ttl": 123
}
'import requests
url = "https://api.locatebyteli.com/devices/share/{id}"
payload = {
"devices": ["<string>"],
"ttl": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({devices: ['<string>'], ttl: 123})
};
fetch('https://api.locatebyteli.com/devices/share/{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://api.locatebyteli.com/devices/share/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'devices' => [
'<string>'
],
'ttl' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.locatebyteli.com/devices/share/{id}"
payload := strings.NewReader("{\n \"devices\": [\n \"<string>\"\n ],\n \"ttl\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.locatebyteli.com/devices/share/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"devices\": [\n \"<string>\"\n ],\n \"ttl\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.locatebyteli.com/devices/share/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"devices\": [\n \"<string>\"\n ],\n \"ttl\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000",
"account": "660e8400-e29b-41d4-a716-446655440000",
"devices": ["770e8400-e29b-41d4-a716-446655440000", "990e8400-e29b-41d4-a716-446655440000"],
"acl": ["aa0e8400-e29b-41d4-a716-446655440000"],
"revoked": false,
"expires_at": "2026-03-20T02:00:00Z",
"unique_views": 5,
"last_accessed_at": "2026-03-18T12:00:00Z",
"created_at": "2026-03-15T00:00:00Z"
}
Authorization
string
default:"Bearer "
required
API Key. Formato:
Bearer lbt_•••Path Parameters
uuid
required
ID del enlace de compartición
Body Parameters
string[]
Nueva lista de UUIDs de dispositivos a compartir
integer
Nuevo tiempo de vida en segundos (recalcula la fecha de expiración)
Ambos campos son opcionales. Solo se actualizan los campos enviados.
Respuesta
Retorna el objetoUserShare actualizado.
uuid
ID del enlace de compartición
uuid
ID de la cuenta propietaria
string[]
Lista actualizada de IDs de dispositivos compartidos
string[]
Lista de UUIDs de permisos de acceso
boolean
Si el enlace fue revocado
datetime
Fecha de expiración actualizada
integer
Número de vistas únicas
datetime
Último acceso al enlace
datetime
Fecha de creación del enlace
Comportamiento
- Si se envían
devices, valida que todos existan y el usuario tenga acceso. - Si se envía
ttl, recalcula la fecha de expiración. - Invalida la caché del token.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"account": "660e8400-e29b-41d4-a716-446655440000",
"devices": ["770e8400-e29b-41d4-a716-446655440000", "990e8400-e29b-41d4-a716-446655440000"],
"acl": ["aa0e8400-e29b-41d4-a716-446655440000"],
"revoked": false,
"expires_at": "2026-03-20T02:00:00Z",
"unique_views": 5,
"last_accessed_at": "2026-03-18T12:00:00Z",
"created_at": "2026-03-15T00:00:00Z"
}
Errores
| Código | Descripción |
|---|---|
400 | Parámetros o UUID inválidos |
404 | Enlace no encontrado |
500 | Error interno |
⌘I