# Create a new edge gateway (/docs/api-reference/edges/EdgesController_create)

`POST /api/edges`

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

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

Creates a pending edge record + issues a single-use claim code. Returns the plaintext claim code ONCE — it is immediately hashed at rest.

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "description": "The organization this edge belongs to",
      "example": "12345678-1234-1234-1234-123456789012"
    },
    "factoryId": {
      "type": "string",
      "description": "Factory slug the edge is deployed to (optional — can be assigned later)",
      "example": "acme-penang"
    },
    "name": {
      "type": "string",
      "description": "Human-readable edge name shown in the UI",
      "example": "Acme Edge 01",
      "minLength": 1,
      "maxLength": 120
    },
    "region": {
      "type": "string",
      "description": "Data residency region for this edge",
      "example": "sg",
      "enum": [
        "sg",
        "my",
        "eu",
        "us"
      ],
      "default": "sg"
    },
    "notes": {
      "type": "string",
      "description": "Internal notes about this edge",
      "example": "Installed in control cabinet next to CNC-01"
    }
  },
  "required": [
    "organizationId",
    "name"
  ]
}
```

## Responses

### 201: Edge created with claim code

### 403: Not a member of the target organization