---
search:
  tags:
    - servers
    - POST
seo:
  description: >-
    Register a server. The response has the enroll command to run on the server.
    Reference for the POST /api/v1/servers endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Register a server
  badge: POST
title: Register a server
type: openapi-operation
---
Register a server. The response has the enroll command to run on the server.

`POST /api/v1/servers`

**Request body** (`application/json`, required)

- `demo` (boolean)
- `name` (string)

Request body example:

```json
{
  "demo": true,
  "name": "string"
}
```

**Responses**

- `201` — Created
- `default` — Error

Response example, 201:

```json
{
  "enroll_command": "string",
  "enroll_token": "string",
  "server": {
    "cleaning_up": true,
    "cleanup_error": "string",
    "cleanup_kind": "deploy_refusal",
    "cleanup_pending": true,
    "cleanup_since": "string",
    "created_at": "string",
    "database_services": [
      {
        "database_service_id": "string",
        "database_service_name": "string",
        "role": "string"
      }
    ],
    "demo": true,
    "enroll_state": "pending",
    "headscale_node_id": "string",
    "health": {
      "checked_at": "2019-08-24T14:15:22Z",
      "notes": [
        {
          "cause": "unreachable",
          "component": "reachability",
          "message": "string",
          "since": "2019-08-24T14:15:22Z",
          "status": "healthy"
        }
      ],
      "reason": "string",
      "since": "2019-08-24T14:15:22Z",
      "status": "healthy"
    },
    "host": "string",
    "id": "string",
    "in_use": true,
    "livesync_sessions": [
      {
        "id": "string",
        "name": "string"
      }
    ],
    "name": "string",
    "overlay_ip": "string",
    "port": 0,
    "reachable": true,
    "rebuild_pending": true,
    "retry_cleanup_refusal": "string",
    "slots": [
      {
        "kind": "database_service",
        "member_name": "string",
        "owner_name": "string"
      }
    ],
    "ssh_user": "string",
    "state": "in_use"
  }
}
```
