---
title: "Extend OTP Expiry"
method: POST
path: "/extend_otp"
---

# Extend OTP Expiry

`POST /extend_otp`

## Request

- Base URL: `https://api.myotp.app`
- URL: `https://api.myotp.app/extend_otp`
- Auth: none declared. Required headers: `X-API-Key`

Extend an existing OTP expiry time

## Headers

- `X-API-Key` string, required

## Request body

- object
  - `message_id` string, required: Message ID of the OTP to be extended
  - `duration` integer, required: Duration to extend the OTP expiry, in seconds

## Response `200`

OTP expiry successfully extended

- object
  - `status` string: Status of the request
  - `message` string: Message describing the status of the request
  - `expires_at` string, date-time: New expiry time of the OTP

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: OTP message_id not found
- `429`: Too many requests from this IP address. The edge allows 100 requests a minute per client IP with a burst of 100, counted across every endpoint together, so sends and status checks share one budget. Accounts that ask for more are raised to 500 a minute; X-RateLimit-Limit on every response tells you which ceiling applies to you. Wait the number of seconds in Retry-After and repeat the request. Write to support@myotp.app with the addresses you call from and the peak you are designing for if you need a higher limit.

---

[API](https://skmtc.dev/myotp/apis/myotpapp-api.md) · [All operations](https://skmtc.dev/myotp/apis/myotpapp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/myotp/apis/myotpapp-api/revisions/95ed911fdece?raw)
