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

# OTP And Verification

Send and verify one-time passwords for customer authentication.

## Verify the registration OTP before completing registration.

> Verify the registration OTP before completing registration.\
> \
> \*\*Authentication:\*\* Public; tenant validation applies.\
> \
> \*\*Feature area:\*\* Authentication\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/CustomerController.ts\`\
> \
> \*\*Request example provenance:\*\* Source-defined request and response examples.\
> \
> \*\*Response example provenance:\*\* Source-defined request and response examples.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"OTP and verification","description":"Send and verify one-time passwords for customer authentication."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"paths":{"/api/customer/otp-verify":{"post":{"operationId":"postApiCustomerOtpVerify","summary":"Verify the registration OTP before completing registration.","description":"Verify the registration OTP before completing registration.\n\n**Authentication:** Public; tenant validation applies.\n\n**Feature area:** Authentication\n\n**Implementation source:** `src/api/store/controllers/CustomerController.ts`\n\n**Request example provenance:** Source-defined request and response examples.\n\n**Response example provenance:** Source-defined request and response examples.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["OTP and verification"],"responses":{"200":{"description":"Successful response. Source-defined request and response examples.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Error response example. Source-defined request and response examples.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}},"additionalProperties":true}}}}},"requestBody":{"required":true,"description":"The handler looks up an active customer registration OTP using emailId and otp.","content":{"application/json":{"schema":{"type":"object","properties":{"otp":{"type":"string"},"emailId":{"type":"string"}},"additionalProperties":true,"required":["emailId","otp"]}}}}}}}}
```

## Send a registration OTP to the supplied email.

> Send a registration OTP to the supplied email.\
> \
> \*\*Authentication:\*\* Public; tenant validation applies.\
> \
> \*\*Feature area:\*\* Authentication\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/CustomerController.ts\`\
> \
> \*\*Request example provenance:\*\* Source-defined request and response examples.\
> \
> \*\*Response example provenance:\*\* Source-defined request and response examples.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"OTP and verification","description":"Send and verify one-time passwords for customer authentication."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"paths":{"/api/customer/send-otp":{"post":{"operationId":"postApiCustomerSendOtp","summary":"Send a registration OTP to the supplied email.","description":"Send a registration OTP to the supplied email.\n\n**Authentication:** Public; tenant validation applies.\n\n**Feature area:** Authentication\n\n**Implementation source:** `src/api/store/controllers/CustomerController.ts`\n\n**Request example provenance:** Source-defined request and response examples.\n\n**Response example provenance:** Source-defined request and response examples.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["OTP and verification"],"responses":{"200":{"description":"Successful response. Source-defined request and response examples.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Error response example. Source-defined request and response examples.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}},"additionalProperties":true}}}}},"requestBody":{"required":false,"description":"Sample request body. Source-defined request and response examples.","content":{"application/json":{"schema":{"type":"object","properties":{"emailId":{"type":"string"}},"additionalProperties":true}}}}}}}}
```
