Rotate the edge static token (old token invalidated immediately)
curl --request POST \
--url http://0.0.0.0:3000/v1/edges/{id}/rotate-token \
--header 'Authorization: Bearer <token>'import requests
url = "http://0.0.0.0:3000/v1/edges/{id}/rotate-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://0.0.0.0:3000/v1/edges/{id}/rotate-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://0.0.0.0:3000/v1/edges/{id}/rotate-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://0.0.0.0:3000/v1/edges/{id}/rotate-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://0.0.0.0:3000/v1/edges/{id}/rotate-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://0.0.0.0:3000/v1/edges/{id}/rotate-token")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"edge": {
"id": 1,
"name": "casa-1",
"org_id": null,
"user_id": "user_abc123",
"location": "home",
"status": "pending",
"capabilities": {},
"last_seen_at": null,
"paired_at": null,
"created_at": "2026-05-21T10:00:00Z"
},
"edge_token": "edge_xY9zW8vU..."
}{
"error": "unauthorized"
}{
"error": "forbidden"
}{
"message": "not found"
}Edges
Rotate the edge static token (old token invalidated immediately)
POST
/
v1
/
edges
/
{id}
/
rotate-token
Rotate the edge static token (old token invalidated immediately)
curl --request POST \
--url http://0.0.0.0:3000/v1/edges/{id}/rotate-token \
--header 'Authorization: Bearer <token>'import requests
url = "http://0.0.0.0:3000/v1/edges/{id}/rotate-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://0.0.0.0:3000/v1/edges/{id}/rotate-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://0.0.0.0:3000/v1/edges/{id}/rotate-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://0.0.0.0:3000/v1/edges/{id}/rotate-token"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://0.0.0.0:3000/v1/edges/{id}/rotate-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://0.0.0.0:3000/v1/edges/{id}/rotate-token")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"edge": {
"id": 1,
"name": "casa-1",
"org_id": null,
"user_id": "user_abc123",
"location": "home",
"status": "pending",
"capabilities": {},
"last_seen_at": null,
"paired_at": null,
"created_at": "2026-05-21T10:00:00Z"
},
"edge_token": "edge_xY9zW8vU..."
}{
"error": "unauthorized"
}{
"error": "forbidden"
}{
"message": "not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
ID da organização para contexto (opcional). Quando presente, filtra recursos da org.
Path Parameters
ID numérico do edge
⌘I