> For the complete documentation index, see [llms.txt](https://docs.emsigner.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emsigner.com/apis/api-reference/authentication/otp-generation.md).

# OTP Generation

## GET /api/Public/GenerateOtp/GenerateCustomerOtp

> Generate customer OTP

```json
{"openapi":"3.0.1","info":{"title":"emSigner Core API","version":"v1"},"tags":[{"name":"GenerateOtp"}],"servers":[{"url":"https://demoapi-core.emsigner.com","description":"Demo / Sandbox"},{"url":"{baseUrl}","description":"Custom environment","variables":{"baseUrl":{"default":"https://demoapi-core.emsigner.com","description":"Base URL of your emSigner environment (e.g. production or on-prem API host)"}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT access token from POST /auth/token. Paste the token without the \"Bearer \" prefix.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"messages":{"type":"array","items":{"type":"string"},"nullable":true},"errorCode":{"type":"integer","format":"int32"},"errorKey":{"type":"string","nullable":true},"response":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto"}},"additionalProperties":false},"emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto":{"type":"object","properties":{"isOtpSent":{"type":"boolean"},"message":{"type":"string","nullable":true},"subscriberId":{"type":"integer","format":"int32"},"otpGeneratedDateTime":{"type":"string","format":"date-time","nullable":true},"remainingAttempts":{"type":"integer","format":"int32","nullable":true},"nextAttemptTime":{"type":"string","format":"date-time","nullable":true},"maskedEmail":{"type":"string","nullable":true},"maskedMobile":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/api/Public/GenerateOtp/GenerateCustomerOtp":{"get":{"tags":["GenerateOtp"],"parameters":[{"name":"emailId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}}},"summary":"Generate customer OTP","operationId":"get_GenerateOtp_GenerateCustomerOtp"}}}}
```

## POST /api/Public/GenerateOtp/GenerateOtp

> Generate OTP

```json
{"openapi":"3.0.1","info":{"title":"emSigner Core API","version":"v1"},"tags":[{"name":"GenerateOtp"}],"servers":[{"url":"https://demoapi-core.emsigner.com","description":"Demo / Sandbox"},{"url":"{baseUrl}","description":"Custom environment","variables":{"baseUrl":{"default":"https://demoapi-core.emsigner.com","description":"Base URL of your emSigner environment (e.g. production or on-prem API host)"}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT access token from POST /auth/token. Paste the token without the \"Bearer \" prefix.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"emSignerCoreAPI.Shared.DTOs.GenerateOtpRequestDto":{"required":["emailId"],"type":"object","properties":{"emailId":{"minLength":1,"type":"string","format":"email"},"browserInfo":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.BrowserInfo"}},"additionalProperties":false},"emSignerCoreAPI.Shared.DTOs.BrowserInfo":{"type":"object","properties":{"browserName":{"type":"string","nullable":true},"browserVersion":{"type":"string","nullable":true},"osName":{"type":"string","nullable":true},"osVersion":{"type":"string","nullable":true},"device":{"type":"string","nullable":true},"ipAddress":{"type":"string","nullable":true},"timeZone":{"type":"string","nullable":true}},"additionalProperties":false},"emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"messages":{"type":"array","items":{"type":"string"},"nullable":true},"errorCode":{"type":"integer","format":"int32"},"errorKey":{"type":"string","nullable":true},"response":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto"}},"additionalProperties":false},"emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto":{"type":"object","properties":{"isOtpSent":{"type":"boolean"},"message":{"type":"string","nullable":true},"subscriberId":{"type":"integer","format":"int32"},"otpGeneratedDateTime":{"type":"string","format":"date-time","nullable":true},"remainingAttempts":{"type":"integer","format":"int32","nullable":true},"nextAttemptTime":{"type":"string","format":"date-time","nullable":true},"maskedEmail":{"type":"string","nullable":true},"maskedMobile":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/api/Public/GenerateOtp/GenerateOtp":{"post":{"tags":["GenerateOtp"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.Shared.DTOs.GenerateOtpRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/emSignerCoreAPI.ViewModels.ReturnObject`1[[emSignerCoreAPI.Shared.DTOs.GenerateOtpResponseDto, emSignerCoreAPI, Version=3.0.5.1, Culture=neutral, PublicKeyToken=null]]"}}}}},"summary":"Generate OTP","operationId":"post_GenerateOtp_GenerateOtp"}}}}
```
