---
title: "Finalize OTP session"
method: POST
path: "/auth/otp/finalize"
tags: ["auth"]
---

# Finalize OTP session

`POST /auth/otp/finalize`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/auth/otp/finalize`
- Auth: none declared

Finalize an email OTP sign-in session.

## Request body

- object
  - `authToken` string, required
  - `organizationId` string: Provide this OR newOrganizationName.
  - `newOrganizationName` string

## Response `200`

Successful response

- object
  - `ok` boolean, required
  - `result` object, required
    - `organization` object
      - `id` string, required
      - `name` string, required
      - `slug` string, required
    - `sessionExpiresAt` number

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `500`: Server error

---

[API](https://skmtc.dev/dench/apis/dench-api.md) - [All operations](https://skmtc.dev/dench/apis/dench-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dench/apis/dench-api/revisions/4a145b38f19c?raw)
