> For the complete documentation index, see [llms.txt](https://docs.enclaive.cloud/nitride/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enclaive.cloud/nitride/api/totp.md).

# TOTP

## Create TOTP token

> Creates a new Time-based One-Time Password token. The UUID will be generated by the API.

```json
{"openapi":"3.0.2","info":{"title":"Enclaive auth-ratls API","version":"0.0.0-0"},"servers":[{"url":"http://localhost:8200","description":"Local development server"}],"paths":{"/v1/auth/ratls/totp":{"put":{"tags":["TOTP"],"summary":"Create TOTP token","description":"Creates a new Time-based One-Time Password token. The UUID will be generated by the API.","operationId":"createTotp","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpCreate_totpRequest"}}}},"responses":{"200":{"description":"TOTP token created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpCreate_totpResponse"}}}},"400":{"description":"Invalid request body"}}}}},"components":{"schemas":{"TotpCreate_totpRequest":{"type":"object","properties":{"created":{"type":"integer","description":"Creation timestamp","format":"int64"},"expiration":{"type":"integer","description":"Expiration timestamp","format":"int64"},"policy":{"type":"string","description":"Name of the policy to allow updates for"}},"required":["expiration","policy"]},"TotpCreate_totpResponse":{"type":"object","properties":{"request_id":{"type":"string"},"lease_id":{"type":"string"},"renewable":{"type":"boolean"},"lease_duration":{"type":"integer"},"data":{"type":"object","properties":{"created":{"type":"integer","description":"Creation timestamp, set by the plugin","format":"int64"},"expiration":{"type":"integer","description":"Expiration timestamp","format":"int64"},"policy":{"type":"string","description":"Name of the policy to allow updates for"},"uuid":{"type":"string","description":"Generated UUID for the TOTP token","format":"uuid"}}},"wrap_info":{"type":"null"},"warnings":{"type":"null"},"auth":{"type":"null"}}}}}}
```

## Delete TOTP token

> Removes a specific TOTP token. Returns success even if token doesn't exist.

```json
{"openapi":"3.0.2","info":{"title":"Enclaive auth-ratls API","version":"0.0.0-0"},"servers":[{"url":"http://localhost:8200","description":"Local development server"}],"paths":{"/v1/auth/ratls/totp/{uuid}":{"delete":{"tags":["TOTP"],"summary":"Delete TOTP token","description":"Removes a specific TOTP token. Returns success even if token doesn't exist.","operationId":"deleteTotp","responses":{"200":{"description":"TOTP token deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpDelete_Response"}}}}}}}},"components":{"schemas":{"TotpDelete_Response":{"type":"object","properties":{"request_id":{"type":"string"},"lease_id":{"type":"string"},"renewable":{"type":"boolean"},"lease_duration":{"type":"integer"},"data":{"type":"object"},"wrap_info":{"type":"null"},"warnings":{"type":"null"},"auth":{"type":"null"}}}}}}
```
