---
title: "Create device challenge"
url: https://hexelstudio.com/docs/api/titan-user/person/devices-challenge
---

# Create device challenge

**POST** `/titan/user/devices:challenge`

A single-use enrollment challenge for the caller, valid five minutes; at most five outstanding (DEVICE_LIMIT). attestation_required is present (true) only where the deployment requires a key attestation at enrollment. Authorized by the caller's own user-route token; a device belongs to the token's subject and another person's is NOT_FOUND; NOT_FOUND unless phone enrollment is on.

## Headers

- `Authorization: string`

  `Bearer <token>`. The person's user-route token: a user access token from the deployment's identity provider for an audience only the person routes accept, carrying their use claim. The Gateway verifies it; the edge does not. A session's token is refused here, and a user-route token is refused as a session's. Served only while the deployment turns the person routes on; NOT_FOUND otherwise.

## Returns

`200` Successful response; exact status varies by operation. (`object`)

- `attestation_required: optional boolean`

  One of: `true`

- `audience: string`

- `challenge: string`

- `expires_at: string`

## Errors

- `default` Rejected request.

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/titan/user/devices:challenge' \
  --header "Authorization: Bearer $ACCESS_TOKEN"
```

### Response (200)

```json
{
  "attestation_required": true,
  "audience": "string",
  "challenge": "string",
  "expires_at": "2026-01-01T00:00:00Z"
}
```

### Response (default)

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