Onramp

Initiate onramp verification

Changed on

Initiates OTP verification by sending a 6-digit code to the user via the specified channel (SMS or email). Returns a verificationId that must be passed to the Submit Onramp Verification endpoint along with the OTP code within 10 minutes.

Access to this API requires allowlisting. During Onramp Headless API onboarding, contact the Onramp team to enable Onramp-managed verification for your application.

post/v2/onramp/verifications

Request

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

Headers

X-Idempotency-Key, string

An optional string request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our Idempotency docs for more information on using idempotency keys.

Request body

InitiateOnrampVerificationRequest required

Request body for initiating an onramp OTP verification.

channel, 'sms' | 'email' required

The OTP delivery channel.

destination, union required

The phone number or email address to send the OTP to.

Example request

{
  "channel": "sms",
  "destination": "+12055555555"
}

Response

Successfully initiated onramp verification.

OnrampVerificationInitiation required

The result of initiating an onramp OTP verification.

verificationId, string required

Identifier returned by this endpoint. Pass to the Submit Onramp Verification endpoint along with the OTP code within 10 minutes.

otpExpiresAt, string date-time required

The deadline for submitting the OTP code (10 minutes from now).

Example response

{
  "verificationId": "onramp_verification_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "otpExpiresAt": "2025-04-24T00:10: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

    3 more changes in this revision