> ## Documentation Index
> Fetch the complete documentation index at: https://developers.1-funnel.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Create and verify challenges

> Start an OTP challenge and verify a submitted code.

<Warning>
  **Developer Preview**

  This documentation describes the upcoming 1Funnel External Integration API.

  The documented API endpoints and authentication services are not yet available
  for public integration.

  You can explore the API specifications, request and response schemas, webhook
  events, and integration guides.

  Sandbox and production availability will be announced separately.
</Warning>

## Create

`POST /v1/businesses/{businessId}/otp/challenges`

Permission: `otp.challenge.create`. Supports idempotency and returns `202` on
durable acceptance per the OpenAPI contract.

## Verify

`POST /v1/businesses/{businessId}/otp/challenges/{challengeId}/verify`

Permission: `otp.challenge.verify`.

```bash theme={null}
curl -X POST "https://api.sandbox.1-funnel.org/v1/businesses/{businessId}/otp/challenges/{challengeId}/verify" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"123456"}'
```

```java theme={null}
// Illustrative Java sketch — not a complete SDK
HttpRequest request = HttpRequest.newBuilder()
  .uri(URI.create(base + "/v1/businesses/" + businessId + "/otp/challenges/" + challengeId + "/verify"))
  .header("Authorization", "Bearer " + token)
  .header("Content-Type", "application/json")
  .POST(HttpRequest.BodyPublishers.ofString("{\"code\":\"123456\"}"))
  .build();
```

Approved error mappings include expired and locked challenge conditions. Never
log verification codes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.