---
title: "Update a challenge for a user"
method: PATCH
path: "/users/{userID}/challenges/{challengeID}"
tags: ["Challenges"]
---

# Update a challenge for a user

`PATCH /users/{userID}/challenges/{challengeID}`

Updates a challenge for a user by given `userID` and `challengeID`. For example, this can be used to change the challenge status from `pending` to `completed`.

## Path parameters

- `userID` string, required
- `challengeID` string, required

## Request body

- ChallengeUpdateReq
  - `value` string, required

## Response `200`

Challenge has been updated.

- Challenge
  - `challengeID` string, required
  - `type` 'email_otp' | 'email_link' | 'sms_otp', required
  - `identifierValue` string, required
  - `value` string, required
  - `expires` integer, required
  - `status` 'pending' | 'completed' | 'expired', required

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/corbado/apis/corbado-backend-api.md) · [All operations](https://skmtc.dev/corbado/apis/corbado-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corbado/corbado-backend-api/revisions/1f6143efe426/schema)
