# prov.attest.devices.enroll

prov.attest.devices.enroll in Python SDK. Enrolls a phone in your key's own carrier; the server assigns its hardware tier.

## Signature

```python
prov.attest.devices.enroll(**body: Any = …) -> Any
```

## Parameters

- `**body` (Any, optional)

## Returns

`Any`

## HTTP operation

[`POST /v1/attest/devices`](https://provenanceauth.com/docs/api/devices.md#post-v1-attest-devices): Enroll your device

## Errors

- [`attest_not_set_up`](https://provenanceauth.com/docs/platform/errors.md#attest_not_set_up)
- [`attestation_key_revoked`](https://provenanceauth.com/docs/platform/errors.md#attestation_key_revoked)
- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`device_already_enrolled`](https://provenanceauth.com/docs/platform/errors.md#device_already_enrolled)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/devices`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x", "Content-Type": "application/json" },
  body: JSON.stringify({ "platform": "ios" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/attest/devices", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}, json={
    "platform": "ios"
}).json()
```
