---
title: "Create device enrollment"
url: https://hexelstudio.com/docs/api/titan/registry/device-enrollments
---

# Create device enrollment

**POST** `/titan/registry/device-enrollments`

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

## Body parameters

- `public_key: string`

- `runtime_principal_id: string`

- `valid_until: optional string`

## Returns

`201` Success (`object`)

- `agent_id: string`

- `created_at: string`

- `deployment_id: string`

- `enrollment_id: string`

- `identity_binding_id: string`

- `maximum_assurance: string`

- `public_key: string`

- `public_key_thumbprint: string`

- `runtime_principal_id: string`

## Errors

- `400` Invalid request
- `401` Unauthenticated
- `403` Forbidden
- `404` Not found
- `409` Conflict
- `500` Internal error

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/titan/registry/device-enrollments' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "public_key": "string",
  "runtime_principal_id": "string",
  "valid_until": "2026-01-01T00:00:00Z"
}'
```

### Response (201)

```json
{
  "agent_id": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "deployment_id": "string",
  "enrollment_id": "string",
  "identity_binding_id": "string",
  "maximum_assurance": "string",
  "public_key": "string",
  "public_key_thumbprint": "string",
  "runtime_principal_id": "string"
}
```

### Response (400)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (401)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (403)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (404)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (409)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (500)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```
