# Request limits, safe retries, and plan features.

Limits protect your WhatsApp number and the service for every business. When a limit is reached, the API responds 429 with a `Retry-After` header (seconds).

Sumber: https://klikflow.id/docs/en/api/limits-and-plans

## API v2 limits

- Requests per minute, per live key: set by the plan (default 300).
- Messages per day, per business across all live keys: set by the plan (default 5,000). Reset at midnight in your business's time zone, which is set in Settings › Business profile (Pengaturan › Profil bisnis).
- WhatsApp (scan QR) chats to new numbers: 50 per key per day.
- Test keys: 60 requests per minute and 100 messages per day, separate from the plan quota.
- Your plan's limits appear in Settings › API & Webhook (Pengaturan › API & Webhook).

## Limit headers

Every API v2 response carries `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (seconds until the per-minute limit opens again). 429 responses add `Retry-After`: for the daily limit, its value is the number of seconds until midnight in the business's time zone.

## Safe retries (Idempotency-Key)

Send an `Idempotency-Key` header (for example a new UUID per message) on every API v2 `POST` and `PATCH`. Keys are kept for 24 hours per API key.

- A repeat with the same key and content gets the first response again, with the header `Idempotency-Replayed: true`; the message is not sent twice.
- The same key with different content is refused with `idempotency_conflict` (409).
- While the first request is still being processed, a repeat gets `request_in_progress` (409) with `Retry-After: 2`.
- 5xx, 429 and `request_in_progress` responses are not stored, so a repeat with the same key is processed again.

## When to retry

- Retry only after a 429 (wait for `Retry-After`), a 5xx, or a dropped connection, with the same Idempotency-Key.
- Do not retry after a 4xx other than 429: fix the request first.
- Mention the `request_id` (also in the `Request-Id` header) when you contact Klik Flow support. Find the request in Settings › API & Webhook › Request log (Log permintaan).

## Plan features

API v2 live keys need a plan with the API feature; test keys work on every plan. WhatsApp numbers over the plan's quota are paused and their sends are refused with `channel_paused`.
