মূল অংশে যান
HalalAdz
  • বিজ্ঞাপনদাতা
  • পাবলিশার
  • হালাল নীতি
  • শিখুন
  • প্রশ্নোত্তর
English সাইন ইন
মেনু
  • বিজ্ঞাপনদাতা
  • পাবলিশার
  • হালাল নীতি
  • শিখুন
  • প্রশ্নোত্তর
  • গাইড
  • কীভাবে কাজ করে
  • টেলিগ্রাম চ্যানেল
  • যোগাযোগ
English সাইন ইন বিজ্ঞাপন দেওয়া শুরু করুন
  1. হোম
  2. ডেভেলপার API

ডেভেলপারদের জন্য

HalalAdz পাবলিক API

OpenAPI 3.1: api.halaladz.com/api/v1/openapi.json

  • শুরু
  • ক্যাম্পেইন ও বিজ্ঞাপন
  • রিপোর্ট ও আয়
  • ওয়েবহুক

সংক্ষেপে

HalalAdz API দিয়ে আপনার নিজের সফটওয়্যার (দোকানের সার্ভার, ERP, এজেন্সির টুল) ড্যাশবোর্ডের কাজগুলো করতে পারে: ক্যাম্পেইন বানানো, বিজ্ঞাপন যোগ, শুরু ও থামানো, রিপোর্ট দেখা; প্রকাশকেরা আয় আর টাকা তোলার হিসাব দেখতে পারেন।

  • টাকার অঙ্ক সব দেশের অ্যাকাউন্টের জন্য টাকায় (BDT, মাইক্রো একক); বিদেশে অন্য মুদ্রায় পাঠানো পেমেন্টে সেই মুদ্রা, পাঠানো অঙ্ক আর রেটও থাকে। দিন গোনা হয় বাংলাদেশের সময়ে (UTC+৬)।
  • আগে পরীক্ষার চাবি (hz_test_) বানান: এটা আসল ক্যাম্পেইন, টাকা বা রিপোর্টে হাত দেয় না, কিন্তু ড্যাশবোর্ডের মতো একই যাচাই চালায়।
  • চাবি বানাবেন: ড্যাশবোর্ড → সেটিংস → API চাবি। চাবি শুধু একবার দেখানো হয়; পাসওয়ার্ডের মতো গোপন রাখুন।
  • আসল চাবি (hz_live_) ড্যাশবোর্ডের একই নিয়ম মানে: হালাল যাচাই, সর্বনিম্ন বাজেট, ওয়ালেট থেকে টাকা।
  • খবর পেতে (বিজ্ঞাপন পাস/বাতিল, লক্ষ্যে পৌঁছানো, ব্যালেন্স কম): সেটিংস → ওয়েবহুক।
  • সীমা: সাধারণত আসল চাবি মিনিটে 120বার, পরীক্ষার চাবি মিনিটে 60বার; HalalAdz বদলাতে পারে — এখনকার সীমা GET /me-এ দেখা যায়।
  • প্রকাশকেরাও ওয়েবহুক পান: টাকা তোলা অনুমোদন বা পাঠানো হলে, মাসের আয় চূড়ান্ত হলে, জায়গা পাস বা বাতিল হলে।

নিচের পুরো গাইড ইংরেজিতে।

HalalAdz Public API

Start in three steps

  1. In the dashboard open Settings → API keys and make a test key (hz_test_…). Choose what it may do (its scopes). The key is shown once; keep it like a password.
  2. Call the API with it: everything works, nothing real changes.
  3. When your integration works, make a live key (hz_live_…) and switch.
curl https://api.halaladz.com/api/v1/me \
  -H "Authorization: Bearer hz_test_1a2b3c4d_YOUR_SECRET"

Base URL and format

Base URL: https://api.halaladz.com/api/v1. JSON in, JSON out (Content-Type: application/json). The full machine-readable description is OpenAPI 3.1: https://api.halaladz.com/api/v1/openapi.json (no key needed).

  • Money is always integer micros as a JSON string in the platform currency (BDT), for accounts in every country: "1500000" = 1.50. A JSON number for money is refused. Accounts outside Bangladesh: wallets, prices and earnings are still BDT; a payout sent in another currency also carries payoutCurrency, payoutAmountMicros and fxRateE12 (how many units of that currency one taka bought, × 1012, fixed when the payout was requested) — see Payouts.
  • Ids are numbers, times ISO-8601 UTC (convert them to your own time zone), days YYYY-MM-DD business days in Bangladesh time (Asia/Dhaka, UTC+6) for every account, wherever it is.
  • Lists take ?limit=1..200 (default 50) and ?cursor=, newest first, and answer {"items": [...], "nextCursor": 123 | null}. Pass nextCursor back as cursor.

Keys: live and sandbox

Send the key as Authorization: Bearer <key> (or X-Api-Key: <key>). Only the key's prefix and a peppered hash are stored by HalalAdz.

KeyWhat it does
hz_live_…Real campaigns, ads, wallet and reports. Every request goes through exactly the same checks as the dashboard: halal review, minimum budget, the profile check, the wallet. Write scopes on live keys only after HalalAdz turned them on, and each live key has a daily spend limit set by HalalAdz.
hz_test_…Sandbox. The same validation and the same human halal review run; campaigns are test campaigns paid with test money (never your wallet), shown only on your own places with Test ads on, never to real publishers. Reports and earnings answer zeros. Events of test campaigns go to your TEST endpoints.

A key acts with the current role of the team member who made it, cut down to its scopes. If that member is removed, the key stops (401 key_owner_removed); if they become read-only, writes are refused.

Scopes

ScopeAllowsAccount
reports:readList campaigns, read reportsAdvertiser
campaigns:writeCreate, quote, change budget and dates, launch, pause, resume and end campaignsAdvertiser
creatives:writeUpload files and add creatives (they always go to halal review)Advertiser
conversions:writeSend server-to-server conversions (POST /v1/conversions)Advertiser
earnings:readEarnings and payoutsPublisher

GET /me

The key's account, kind, mode, scopes, role and rate limit.

curl https://api.halaladz.com/api/v1/me \
  -H "Authorization: Bearer hz_test_1a2b3c4d_YOUR_SECRET"
{"accountId": 42, "accountKind": "advertiser", "mode": "test", "keyPrefix": "hz_test_1a2b3c4d", "scopes": ["campaigns:write", "reports:read"], "role": "owner", "rateLimitPerMinute": 60}

Rate limits

Per key, per minute: by default 120 requests for a live key, 60 for a test key. HalalAdz may change them; GET /me (rateLimitPerMinute) and X-RateLimit-Limit always show your current limit. Every answer carries:

HeaderMeaning
X-RateLimit-LimitRequests allowed in this minute
X-RateLimit-RemainingRequests left in this minute
X-RateLimit-ResetSeconds until the window starts again

Over the limit you get 429 rate_limited with Retry-After: <seconds>. Wait that long, then retry.

Idempotency keys

Every POST, PATCH and DELETE must send Idempotency-Key: <1-200 letters, digits, _ . : -> (else 400 idempotency_key_required). The first answer is kept for 24 hours: a repeat with the same key and the same body gets the same answer with Idempotent-Replayed: true (a launch is never paid twice). The same key with another body is 422 idempotency_key_reused; while the first request still runs, 409 idempotency_in_progress. A 5xx answer frees the key so you can retry.

curl -X POST https://api.halaladz.com/api/v1/campaigns/123/launch \
  -H "Authorization: Bearer $HZ_KEY" \
  -H "Idempotency-Key: launch-order-7781" \
  -H "Content-Type: application/json" \
  -d '{"expectedTotalMicros": "300000000"}'

Errors

Every error is {"error": "<code>", "message": "...", "issues"?: [{"path", "message"}], "details"?: {...}}.

StatusWhen
400 validation_errorThe body or query is wrong; issues lists every problem
401 invalid_api_keyMissing, malformed, wrong or revoked key
401 key_owner_removedThe member who made the key left the account
403 insufficient_scopeThe key lacks the scope
403 forbiddenWrong account kind for this endpoint, or the maker's role may not write
403 campaign_write_offA live key with write scopes while HalalAdz has not turned the campaign write API on for live keys
403 spend_limit_reachedThe live key's daily spend limit would be passed (details: limitMicros, usedMicros, remainingMicros)
403 account_suspendedThe account is not active
404 not_foundDoes not exist, or belongs to another account
402 / 409 / 422A business rule: insufficient_funds, price_changed, invalid_status, no_creatives, below_min_budget, domain_blocked …
429 rate_limitedToo many requests; see Retry-After

Next

  • Campaigns and creatives
  • Reports, earnings and payouts
  • Webhooks
HalalAdz

সারা বিশ্বের জন্য হালাল, ব্র্যান্ড-নিরাপদ বিজ্ঞাপন। টাকা কাটে আপনার লক্ষ্য অনুযায়ী।

প্রোডাক্ট

  • বিজ্ঞাপনদাতা
  • পাবলিশার
  • টেলিগ্রাম চ্যানেল
  • ফেসবুক ও ইউটিউব ক্রিয়েটর
  • হোয়াটসঅ্যাপ
  • কীভাবে কাজ করে
  • হালাল নীতি
  • যা কখনো দেখাই না
  • যাচাই যেভাবে কাজ করে

শিখুন ও সাহায্য

  • শিখুন
  • গাইড
  • প্রশ্নোত্তর
  • Axon Dynamics সম্পর্কে
  • যোগাযোগ
  • অ্যাপ নিন
  • সাইন ইন
  • ডেভেলপার / API

আইনি তথ্য

  • প্রাইভেসি নীতি
  • সেবার শর্তাবলি
  • বিজ্ঞাপনদাতার শর্তাবলি
  • পাবলিশার ও ক্রিয়েটরের শর্তাবলি
  • ডেটা মোছা
  • পার্সোনালাইজড বিজ্ঞাপন

যোগাযোগ

  • support@halaladz.com
  • privacy@halaladz.com
  • টেলিগ্রাম গ্রুপ (প্রশ্ন ও আলোচনা)
  • টেলিগ্রাম বট @HalalAdzBot
  • Read in English

© 2026 HalalAdz. HalalAdz, Axon Dynamics-এর একটি প্রোডাক্ট।

প্রতিষ্ঠান: Axon Dynamics · ঠিকানা: Cha-63/3, Uttar Badda, Badda, Dhaka 1212, Bangladesh · ফোন: +8801865052200 · ই-মেইল: support@halaladz.com

IP Geolocation by DB-IP · জায়গার নাম: GeoNames (CC BY 4.0) · উপজেলা ও থানার নাম: OCHA / BBS (HDX) (CC BY-IGO) · উপজেলার বাংলা নাম: Bangladesh GeoCode (Nuhil Mehdy) (MIT) · বিনিময় হার: Rates By Exchange Rate API

সব ট্রেডমার্ক ও লোগো তাদের মালিকদের; এখানে ব্যবহার মানে অংশীদারিত্ব বা সমর্থন নয়।