Skip to main content
POST
/
api
/
v1
/
machines
/
register
Register Machine
curl --request POST \
  --url https://api.example.com/api/v1/machines/register \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "machine_name": "<string>",
  "hostname": "<string>",
  "platform": "<string>",
  "architecture": "<string>",
  "daemon_version": "<string>",
  "machine_id": "<string>",
  "directories": [
    "<string>"
  ],
  "metadata": {}
}
'
{
  "machine": {
    "id": "<string>",
    "name": "<string>",
    "status": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "hostname": "<string>",
    "platform": "<string>",
    "architecture": "<string>",
    "daemon_version": "<string>",
    "last_seen_at": "2023-11-07T05:31:56Z",
    "metadata": {}
  },
  "machine_token": "<string>",
  "machine_token_expires_in": 123,
  "machine_ws_path": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request to register or re-register a daemon machine.

machine_name
string
required

Friendly name unique per user

hostname
string
required

OS hostname of the machine

platform
string
required

Operating system platform (e.g. linux, darwin)

architecture
string
required

CPU architecture (e.g. x86_64, arm64)

daemon_version
string
required

Semantic version of the running daemon

machine_id
string | null

Existing machine identifier when re-registering

directories
string[]

Absolute paths reported by the daemon

metadata
Metadata · object

Arbitrary key-value metadata about the machine

Response

Successful Response

Response after a successful machine registration.

machine
MachineDescriptor · object
required

Registered machine descriptor

machine_token
string
required

Short-lived JWT token for machine WebSocket authentication

machine_token_expires_in
integer
required

Seconds until the machine token expires

machine_ws_path
string
required

WebSocket path the daemon should connect to