---
title: "Create Challenge"
method: POST
path: "/users/me/passkeys/challenge"
tags: ["Users"]
---

# Create Challenge

`POST /users/me/passkeys/challenge`

Mints the challenge a browser needs to run a WebAuthn ceremony against the authenticated user's own passkeys. A `registration` challenge enrolls a new passkey; a `deletion` challenge is bound to the one passkey named by `passkey_id` and proves the user still holds it. Challenges are single-use and expire 5 minutes after they are issued, so send a fresh `Idempotency-Key` per ceremony — a replayed key returns the original challenge, which may already have expired. Requires a user session.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `challenge_type` 'registration' | 'deletion', required — The ceremony this challenge is for.
  - `passkey_id` string — The passkey the ceremony targets, prefixed `wcred_`. Required when `challenge_type` is `deletion`, ignored otherwise.

## Response `200`

challenge minted

- object
  - `challenge` string, required — The challenge to pass to the WebAuthn ceremony, base64url-encoded without padding.

## Other responses

- `400` — Invalid Parameters
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Resource not found

---

[API](https://skmtc.net/whop/apis/whop-api.md) · [All operations](https://skmtc.net/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whop/whop-api/versions/db0883548bc5/schema)
