---
title: "Register a new node"
method: POST
path: "/api/nodes"
tags: ["Nodes"]
---

# Register a new node

`POST /api/nodes`

Adds a new local or remote node. Remote nodes require an API URL pointing to
another Sencho instance and an API token for authentication.
Requires `node:manage` permission.

**Note:** API tokens cannot manage nodes.

## Request body

- object
  - `name` string, required
  - `type` 'local' | 'remote', required
  - `compose_dir` string — Base directory for Compose stacks (defaults to `/app/compose`).
  - `is_default` boolean — Set as the default node.
  - `api_url` string — Remote Sencho instance URL (required for remote nodes).
  - `api_token` string — API token for authenticating with the remote Sencho instance.

## Response `200`

Node created.

- object
  - `success` boolean, required
  - `id` integer, required — New node ID.
  - `warning` string — Warning if the remote URL uses plain HTTP.

## Other responses

- `400` — Validation error.
- `403` — Insufficient permissions or license tier.
- `409` — Node name already exists.
- `500` — Internal server error.

---

[API](https://skmtc.dev/studio-saelix/apis/sencho-api.md) · [All operations](https://skmtc.dev/studio-saelix/apis/sencho-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/studio-saelix/sencho-api/revisions/c62bbceae824/schema)
