Skip to main content
POST
/
v1
/
edges
Create an edge and generate its static token (shown once)
curl --request POST \
  --url http://0.0.0.0:3000/v1/edges \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "casa-1",
  "location": "home"
}
'
{
  "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_aB3cD4eF..."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Organization-Id
string

ID da organização para contexto (opcional). Quando presente, filtra recursos da org.

Body

application/json
name
string
required

Nome do edge (ex: casa-1)

location
enum<string>
required
Available options:
cloud,
home
kind
enum<string>
Available options:
integration,
automation

Response

Edge created. edge_token is returned only once.

edge
object
edge_token
string

Token estático mostrado uma única vez. Guarde no .env do worker.