Onramp (App2App)

Register a device key for iOS App Attest

Changed on

Verifies an iOS App Attest attestation payload and registers the device's public key for future assertion validation. The server checks that the attestation is genuine and signed by Apple, that the bundle ID is in the partner's allowed mobile clients list, and that the challenge issued by Create Onramp iOS Attestation Challenge is fresh and unused.

This is a one-time, per-device-install operation; iOS-only (Android validates Play Integrity inline per request and has no registration step). For security, all client-side verification failures are returned as an opaque 400 invalid_request — the response never reveals which specific check failed.

The Apple App Attest keyId is supplied only in the request body (ios.keyId). Do not put keyId in the URL — App Attest key IDs are standard base64 and frequently contain /, which breaks path routing at the edge.

Idempotency is provided by ios.keyId itself: the server upserts the device public key on (app, keyId), so repeating registration for the same key replaces the stored public key rather than creating a duplicate. This endpoint does not accept X-Idempotency-Key — ios.keyId is the natural idempotency key for the registration resource. The challenge remains single-use and is claimed on first receipt. The challenge identifies the project; the device does not supply a CDP project ID.

post/v2/onramp/mobile/attestation/registrations

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP none

Request body

IosAttestationRegistrationRequest required

Request to register device public key for iOS App Attest attestation. This endpoint is iOS-only. Android devices use Play Integrity Standard API tokens sent directly in request headers instead.

challenge, string required

The challenge received from the challenge endpoint.

ios, IosAttestationPayload required

iOS App Attest payload for verification.

Example request

{
  "challenge": "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY=",
  "ios": {
    "keyId": "abc123def456",
    "attestation": "b2F1dGhEYXRhQUFDSmdhVWRpY0FBQ1VqZw==",
    "bundleId": "com.example.myapp"
  }
}

Response

Attestation verified successfully. Device public key registered for assertion validation.

IosAttestationRegistrationResponse required

Response confirming successful attestation verification and device key registration. The device public key is now stored for validating future assertion signatures.

keyId, string required

The key identifier that was registered. Include this value in subsequent Create Onramp Mobile Session requests as ios.keyId.

platform, 'ios' required

The mobile platform that was attested (iOS only).

appId, string required

The verified Apple application identifier in teamID.bundleID format. This is not a CDP project ID.

attestedAt, string date-time required

Timestamp when the attestation was performed.

Example response

{
  "keyId": "abc123def456",
  "platform": "ios",
  "appId": "ABCDE12345.com.example.myapp",
  "attestedAt": "2026-02-03T10:30:00Z"
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status