SDK reference · Python SDK

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

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

Parameters

**bodyAny

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
device_idstring
The phone's device ID. Leave it out and Provenance makes one.
carrier_idstring
Optional. Your key's own carrier; any other is refused.
platformenum
The phone's platform. The tier comes from the evidence, never from this field. One of ios, android.
cert_pemstring
The phone's certificate (PEM). An Android enrollment without it uses the attestation leaf.
key_attestation_chainarray of strings
Android. The key attestation chain, leaf first (PEM or base64 DER).
app_attest_objectstring
iPhone. The App Attest attestation object (base64).
play_integrity_tokenstring
Android. A Play Integrity token, kept as a corroborating signal.
enrollment_challengestring
The challenge from POST /v1/attest/devices/enrollment_challenge the evidence was made over.
webauthn_registrationobject
A passkey registration made over an enrollment challenge.
Show child attributes
attestation_objectstringRequired
The registration's attestation object (base64url).
client_data_jsonstringRequired
The registration's client data JSON (base64url).
challengestringRequired
The enrollment challenge the registration was made over.

Returns

Any The device, with its hardware tier.

HTTP operation

POST /v1/attest/devices: Enroll your device

Errors

Example

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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.