---
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. Only one local node is allowed per instance;
attempting to create a second local node returns 409. Remote nodes require
an API URL pointing to another Sencho instance and an API token for
authentication.
Requires `node:manage` permission. Node type is immutable after creation.

**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, or a local node already exists.
- `500` — Internal server error.

---

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