Delay
You can delay a request by providing delay_seconds when enqueuing. The request will be held and executed after the specified delay.
Usage
curl -X POST "https://v2-api.zeplo.io/queues/QUEUE_ID/enqueue" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "POST",
"url": "https://your-api.com/send-reminder",
"body": "{\"user_id\": 42}",
"delay_seconds": 1800
}'
This will execute the request after 30 minutes (1800 seconds).
Examples
| Use case | delay_seconds |
|---|---|
| Send welcome email 5 min after signup | 300 |
| Reminder notification after 1 hour | 3600 |
| Delete temp data after 24 hours | 86400 |
| 30-day account cleanup | 2592000 |
How it works under the hood
- ≤ 15 minutes — The request is held in the queue with a native delay. Execution is near-instant once the delay expires.
- > 15 minutes — The request is scheduled via a one-time timer that fires at the exact delay time, then enqueues the request for immediate execution.
Both paths are handled automatically. You just set delay_seconds and Zeplo picks the optimal routing.
Combining delay with retry
If a delayed request fails, retries begin immediately after the first execution attempt (not after another delay). The delay_seconds only applies to the initial execution.