---
title: "Create an onramp iOS attestation challenge"
method: POST
path: "/v2/onramp/mobile/attestation/challenges"
tags: ["Onramp (App2App)"]
---

# Create an onramp iOS attestation challenge

`POST /v2/onramp/mobile/attestation/challenges`

## Request

- Base URL: `https://api.cdp.coinbase.com/platform`
- URL: `https://api.cdp.coinbase.com/platform/v2/onramp/mobile/attestation/challenges`
- Auth: HTTP bearer

Issues a one-time challenge for the iOS App Attest device-key **registration** step. Authenticate with a CDP API key. Call this from the partner backend and pass the challenge to the mobile app; do not embed the API key in the client. The project is identified by the API key JWT. The partner app then passes the challenge to `DCAppAttestService.attestKey(keyId, clientDataHash: SHA256(challenge))` and submits the resulting attestation to [Register Onramp iOS Attestation](#operation/registerOnrampIosAttestation).

This is distinct from [Create Onramp Mobile Challenge](#operation/createOnrampMobileChallenge), which issues the per-transaction session challenge. Registration is a one-time, per-device-install operation; iOS-only (Android validates Play Integrity inline per request and has no registration step).

## Response `201`

Attestation challenge created successfully.

- IosAttestationChallenge: A cryptographic challenge for iOS App Attest attestation. Used only by iOS clients - Android uses a different flow with Play Integrity Standard API tokens.
  - `challenge` string, required: Base64-encoded cryptographically secure random challenge (32 bytes). This challenge is one-time use and must be included in the iOS attestation request.
  - `expiresAt` string, date-time, required: Timestamp when the challenge expires. Challenges are valid for 5 minutes.

## Other responses

- `401`: Unauthorized.
- `403`: User forbidden from performing the action.
- `429`: Rate limit exceeded.
- `500`: Internal server error.

## Changes

- **2026-12-01** `06cb41a4fb57`: 4 warning
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `401`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `403`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `429`
  - added the new `policy_not_applicable` enum value to the `errorType` response property for the response status `500`
- **2026-10-22** `fa99d7ef723f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/changes/v2/onramp/mobile/attestation/challenges/post.md)

---

[API](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis.md) - [All operations](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/coinbase/apis/coinbase-developer-platform-apis/revisions/06cb41a4fb57?raw)
