# Claim an edge with a single-use code (public, rate-limited) (/docs/api-reference/edges/EdgesController_claim)

`POST /api/edge/claim`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

Called by the edge agent on first boot. Public endpoint — no bearer token required because the edge has none yet. Rate limit: 5/min per IP.

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "claimCode": {
      "type": "string",
      "description": "The 6-character base32 claim code (unambiguous alphabet — no O/0/I/1). Printed on the physical Quickstart card.",
      "example": "XR742Q",
      "minLength": 6,
      "maxLength": 9
    },
    "csr": {
      "type": "string",
      "description": "PEM-encoded PKCS#10 Certificate Signing Request. When present, we issue an Operational Cert (Phase 1+). When absent, we fall back to a bearer JWT (Phase 0 legacy).",
      "example": "-----BEGIN CERTIFICATE REQUEST-----\nMIIBFjCBvQIBADBfMQ4wDAYDVQQKDAVYZW50cjENMAsGA1UECwwERWRnZTE+\n...\n-----END CERTIFICATE REQUEST-----"
    }
  },
  "required": [
    "claimCode"
  ]
}
```

## Responses

### 200: Claim successful — returns bearer token

### 400: Claim code malformed

### 404: Claim code not recognized

### 409: Device already claimed

### 410: Claim code has expired