Enroll device
/titan/user/devicesEnroll a phone: proof is a compact JWS with header exactly {alg: ES256, kid: the key's thumbprint, typ: titan-device-enrollment+jwt}, signed by the key being enrolled, over {aud: the challenge's audience, sub: the caller, challenge, push_provider, push_token, app_id (optional), apns_environment (optional), iat, exp} (the push target equal to this request's: provider and token both empty for none, app_id and apns_environment left out when empty and only with a token, apns_environment only for apns; exp - iat at most 120 s; the signature low-S). At most five active devices (DEVICE_LIMIT); a key already active is DEVICE_EXISTS; an unused challenge of the caller's own is required (CHALLENGE_INVALID). When the caller has a trusted phone (past its 24 hour waiting period), endorsement is required (ENDORSEMENT_REQUIRED): a JWS {alg: ES256, kid: that phone's device_id, typ: titan-device-endorsement+jwt} over {aud, sub, challenge, thumbprint (of the new key), iat, exp}; without one, a step-up. The new phone signs only its push updates until trusted_at. A step-up is a user token whose auth_time is within the deployment session profile's device_step_up_max_age_seconds (default 300) and whose amr, when present, names a second factor; without one, 401 STEP_UP_REQUIRED with WWW-Authenticate: Bearer error="insufficient_user_authentication". Key attestation: where the deployment requires one (its challenge response says attestation_required), attestation is required (ATTESTATION_REQUIRED) and must verify (ATTESTATION_INVALID) against Apple's or Google's published roots for one of the deployment's apps: android-key (platform android), the attested key's certificate chain, leaf first, each DER in base64url without padding; the leaf's key must be public_key, generated in a TEE or StrongBox on a device with a locked bootloader and a verified boot, no certificate on Google's attestation status list, and its attestation challenge the binding below; apple-app-attest (platform ios), the attestation object from DCAppAttestService.attestKey in base64url without padding, made with the binding below as clientDataHash. The binding is SHA-256 of the UTF-8 string "titan-device-attestation-v1\n" + audience + "\n" + challenge + "\n" + the key's thumbprint (lowercase hex). The body may then be up to 96 KiB. With the deployment's status list refresh on, an Android attestation while the list held is older than its maximum age is 503 ATTESTATION_STATUS_STALE (retry later). Where the deployment refuses unattested phones (unattested_phones refuse_signatures), an endorsement from a phone without an attestation is DEVICE_ATTESTATION_REQUIRED, and such phones do not count as trusted (a step-up enrolls). Elsewhere attestation is accepted and not read. 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
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.
Body parameters
The APNs environment the token was issued for (apns only)
One of: "sandbox", "production"
The app the push token belongs to: an iOS bundle id or an Android package name
The phone's key attestation, bound to this enrollment; read only where the deployment requires one. android-key carries only certificate_chain, apple-app-attest only attestation_object
One of: "ios", "android"
Uncompressed SEC 1 P-256 point, base64url without padding
One of: "apns", "fcm"
Returns
201Successful response; exact status varies by operation.object
What the phone's key attestation said at enrollment; present for a phone enrolled where the deployment required one at the time. null (with attestation_missing) for a phone without one where the deployment now requires attestation; absent elsewhere
present (true) only where the deployment requires attestation and this phone has none (enrolled before): under the deployment's unattested_phones allow it is still trusted; under refuse_signatures its decisions, endorsements, logins and revocations of another trusted phone are refused (DEVICE_ATTESTATION_REQUIRED) until it is re-enrolled with an attestation
One of: true
One of: "ios", "android"
One of: "sandbox", "production"
The last push delivery failure to this phone: a status or transport error, never a response body
One of: "active", "revoked"
Errors
- defaultRejected request.