---
title: "Enroll an edge"
method: POST
path: "/api/v1/edge/enroll"
tags: ["Edge"]
---

# Enroll an edge

`POST /api/v1/edge/enroll`

## Request

- Base URL: `https://pcp.example.com`
- URL: `https://pcp.example.com/api/v1/edge/enroll`
- Auth: none required

Exchanges the shared enrollment key in the body for a per-edge token. No other credential is needed.

## Request body

- EdgeEnrollRequest: EdgeEnrollRequest schema
  - `edge_version` string
  - `enrollment_key` string, required
  - `hostname` string
  - `name` string, required
  - `organization_id` string, uuid
  - `protocol_version` integer
  - `system_info` object
    - `arch` string, nullable
    - `go_version` string, nullable
    - `kernel` string, nullable
    - `kloset_version` string, nullable
    - `num_cpu` integer, nullable
    - `os` string, nullable
    - `total_memory` integer, nullable

## Response `200`

OK

- EdgeEnrollResponse: EdgeEnrollResponse schema
  - `edge_id` string, uuid
  - `protocol_version` integer
  - `supported` boolean
  - `token` string

## Other responses

- `400`: Bad Request _(validation or deserialization error)_
- `500`: Internal Server Error _(panics)_
- `default`

---

[API](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1.md) - [All operations](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/revisions/2ac049494a01?raw)
