More
Limits and error codes
Request limits
| Key | Per minute (per key) | Per hour (per key) |
|---|---|---|
| Live | 120 requests a minute | at most 1,000 requests an hour |
| Test | 60 requests a minute | at most 1,000 requests an hour |
Both limits count every call: a key may burst up to its minute limit, but never more than 1,000 in one hour. HalalAdz may change the minute limit (between 10 and 1,000 a minute); your current limits are in GET /me rateLimitPerMinute and rateLimitPerHour. Calls are counted before the IP allowlist and account checks, so refused calls count too.
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed in this minute |
X-RateLimit-Remaining | Requests left in this minute |
X-RateLimit-Reset | Seconds until the minute window starts again |
X-RateLimit-Hour-Limit | Requests allowed in this hour |
X-RateLimit-Hour-Remaining | Requests left in this hour |
X-RateLimit-Hour-Reset | Seconds until the hour window starts again |
Over either limit you get 429 rate_limited with Retry-After: <seconds> — wait that long, then retry.
| Other limits | Value |
|---|---|
| Days per report request | up to 92 (more → 400 range_too_long) |
| IP allowlist per key | up to 20 addresses or ranges |
| Call log kept | 90 days |
| Active keys per account | up to 20 |
| Webhook addresses per account | up to 10 |
| Items per list page | up to 200 |
Idempotency-Key | Required on every POST / PATCH / DELETE; a repeat with the same key gets the first answer for 24 hours |
| Live key spend per day | The limit HalalAdz sets (0 at first) |
| Open test campaigns | up to 1,000,000 BDT of test money |
Error codes
Every error has the same shape:
{ "error": "validation_error", "message": "from: Invalid date", "issues": [{ "path": "from", "message": "Invalid date" }] }| Status | When | What to do |
|---|---|---|
400 validation_error | The query or body is wrong | issues lists every problem |
401 invalid_api_key | Missing, wrong or stopped key | Check the key; make a new one if needed |
401 key_owner_removed | The member who made the key left the team | Have a current member make a new key |
403 insufficient_scope | The key lacks this scope | Make a key with the right scope |
403 ip_not_allowed | Called from an address not on the key's IP allowlist | Add the address to the list, or call from the right server |
403 not_an_agency | An agency report asked by a non-agency account | Use the agency account's key |
400 range_too_long | More than 92 days in one request | Split the range into several requests |
400 idempotency_key_required | A POST / PATCH / DELETE without an Idempotency-Key header | Send a new value per action (e.g. a UUID) |
422 idempotency_key_reused | The same Idempotency-Key with a different request | Use a new value for a new action |
409 idempotency_in_progress | The first request with this key is still running | Retry a bit later with the same key |
403 campaign_write_off | HalalAdz has not turned campaign writes on for live keys (making such a key: 422) | Use a test key; write to HalalAdz for live |
403 spend_limit_reached | This key's daily spend limit would be passed | details shows what is left; retry tomorrow or ask for a higher limit |
409 budget_locked | Budget or dates changed on a launched campaign | Create a new campaign |
409 price_changed | The price changed before launch | Check details.totalMicros and send again |
402 insufficient_funds | Not enough money in the wallet | Add money |
422 test_money_cap | Too much test money in open test campaigns | End old test campaigns |
409 launch_in_dashboard | Launching a dashboard copy (duplicate / relaunch) through the API | Launch it in the dashboard, or create a new campaign with the API |
409 resume_in_dashboard | Resuming a pay-as-you-go campaign through the API | Resume it in the dashboard |
409 test_campaign | Offering a test campaign to real creators | Use a campaign paid from your wallet |
410 review_by_halaladz | Tried to fake a review decision in the sandbox | A HalalAdz person reviews it; wait for the webhook |
403 live_key_owner_only | Someone other than the owner tried to make a live key or change its IP list | Ask the account owner |
403 forbidden | Wrong account kind (e.g. a publisher key on an advertiser report) | Use a key of the right account |
403 account_suspended | The account is not active | Write to support@halaladz.com |
403 sandbox_only | A test-only request sent with a live key | Use a test key |
404 not_found | Does not exist, belongs to another account, or is a campaign of the other key kind (test / live) | Check the id and the key |
429 rate_limited | Over the limit | Retry after Retry-After seconds |
5xx | A problem on our side | Retry a bit later; check status |