---
title: "Initialize passcode login"
method: POST
path: "/passcode/login/initialize"
tags: ["Passcode"]
deprecated: true
---

# Initialize passcode login

`POST /passcode/login/initialize`

> **Deprecated.**

Initialize a passcode login for the user identified by `user_id`. Sends an email
containing the actual passcode to the user's primary email address or to the address specified
through `email_id`. Returns a representation of the passcode.

## Request body

- object
  - `user_id` string, uuid4, required
  - `email_id` string, uuid4

## Response `200`

Successful passcode login initialization

- Passcode — Representation of a passcode
  - `id` string, uuid4
  - `ttl` integer — Lifespan of a passcode in seconds
  - `created_at` string, date-time — Time of creation of the passcode

## Other responses

- `400` — Bad Request
- `500` — Internal server error

---

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