---
title: "Enroll an authentication factor"
method: POST
path: "/api/cis/v1/identities/{id}/factors"
tags: ["Factors"]
---

# Enroll an authentication factor

`POST /api/cis/v1/identities/{id}/factors`

Create a new authentication factor. For OTP types (EMAIL_OTP, SMS_OTP),
an `otpCode` is returned that must be delivered to the user.
For PASSWORD type, provide the plaintext password in `secret`.

## Request body

- CreateFactorRequest
  - `type` 'EMAIL_OTP' | 'SMS_OTP' | 'PASSWORD' | 'TOTP', required
  - `handle` string — Email or phone for OTP types
  - `secret` string, password — Plaintext password (for PASSWORD type only)

## Response `201`

Factor enrolled

- object
  - `id` string, uuid
  - `identityId` string, uuid
  - `type` 'EMAIL_OTP' | 'SMS_OTP' | 'PASSWORD' | 'TOTP'
  - `status` 'PENDING' | 'VERIFIED' | 'REVOKED'
  - `handle` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `otpCode` string — OTP code (only for EMAIL_OTP/SMS_OTP types)

---

[API](https://skmtc.net/stalela/apis/stalela-cis-customer-identity-service-api.md) · [All operations](https://skmtc.net/stalela/apis/stalela-cis-customer-identity-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stalela/stalela-cis-customer-identity-service-api/revisions/3065faad0b6b/schema)
