Browse the docs

Generate 2FA session id

GET /v1/public/2fa/session/id

Step 1 of card activation: returns a fresh session_id to pass to the OTP create and activate calls. No authentication required.

Request

Authentication: none.

Example request

cURL

curl --request GET \
     --url 'https://api.themooncard.com/v1/public/2fa/session/id'

Responses

200 Success
FieldTypeDescription
session_id requiredstringFresh session id (uuid). Send it as session_id on the OTP create and activate calls.

JSON

{
  "session_id": "0d7f3a2b-5c1e-4f6a-9b8d-2e4c6a8b0d1f"
}
500 Error

Unexpected server error. Body is { message: "Internal server error", code: "INTERNAL_SERVER_ERROR" }.

The body is the standard error object: see Errors.

Last updated August 16, 2026