---
title: "Create an OTP challenge for a step-up action"
method: POST
path: "/v1/challenges"
tags: ["Challenges"]
---

# Create an OTP challenge for a step-up action

`POST /v1/challenges`

## Request

- Base URL: `https://identity-api.paymongo.com`
- URL: `https://identity-api.paymongo.com/v1/challenges`
- Auth: HTTP bearer

Issues a fresh email OTP via mfa-api bound to the caller's (user, action, device, ip) tuple.

## Request body

- MfaCreateChallengeRequestEnvelopeDTO
  - `data` object
    - `attributes` MfaCreateChallengeRequestDTO
      - `action` string, required
      - `factor` 'email' | 'sms'

## Response `201`

Created

- object: Standard response containing data and its metadata if any
  - `data` object
    - `attributes` MfaCreateChallengeAttributesDTO
      - `expiration_at` integer
      - `factor` string
    - `id` string
    - `type` string
  - `has_more` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `410`: Gone
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `502`: Bad Gateway

---

[API](https://skmtc.dev/paymongo/apis/identity.md) - [All operations](https://skmtc.dev/paymongo/apis/identity/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/identity/revisions/cc3056164874?raw)
