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

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

ক্যাম্পেইন ও বিজ্ঞাপন

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

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

ধাপগুলো: ক্যাম্পেইন বানান (খসড়া) → বিজ্ঞাপন যোগ করুন (প্রতিটা মানুষের হালাল যাচাইয়ে যায়) → শুরু করুন (পুরো বাজেট ওয়ালেট থেকে একবারে আটকে রাখা হয়) → দরকার হলে থামান, আবার চালান বা শেষ করুন (বাকি বাজেট ফেরত)। ড্যাশবোর্ডের সব নিয়ম এখানেও খাটে, আর API দিয়ে যাচাই কখনো এড়ানো যায় না। নতুন বিস্তারিত গাইড: developers.halaladz.com। নিচের বিস্তারিত ইংরেজিতে।

Campaigns and creatives

The flow

  1. POST /quotes to see the price (optional; saves nothing).
  2. POST /campaigns makes a draft goal campaign.
  3. POST /uploads, PUT the file, then POST /campaigns/{id}/creatives. Each creative goes to the halal review (pending or ai_passed); only a HalalAdz reviewer approves it.
  4. POST /campaigns/{id}/launch pays the whole budget from your wallet into the campaign reserve in one ledger transaction; the campaign goes to in_review, then active.
  5. POST /campaigns/{id}/pause and /resume as you need; POST /campaigns/{id}/end ends it for good and returns the unspent budget at once.

Full guide with samples in curl, JavaScript, PHP and Python: developers.halaladz.com/campaigns. Every POST / PATCH needs an Idempotency-Key.

Live keys run the very same checks as the dashboard wizard; a request the dashboard would refuse is refused here with the same error code.

List and read campaigns

GET /campaigns

Scope reports:read or campaigns:write. Query: status (draft, in_review, active, paused, exhausted, ended, rejected, suspended), limit, cursor.

curl "https://api.halaladz.com/api/v1/campaigns?status=active&limit=20" \
  -H "Authorization: Bearer $HZ_KEY"

GET /campaigns/{id}

curl https://api.halaladz.com/api/v1/campaigns/123 -H "Authorization: Bearer $HZ_KEY"
{"id": 123, "name": "Eid dates offer", "status": "active", "goal": "orders", "pricing": "CPC", "platforms": ["website", "app", "telegram"], "totalBudgetMicros": "4500000000", "spentMicros": "1200000000", "startsAt": "2026-11-26T04:00:00.000Z", "endsAt": "2026-12-01T04:00:00.000Z", "createdAt": "2026-11-25T10:12:00.000Z"}

Price a goal

POST /quotes

Scope campaigns:write. Body: goal, platforms, targetUnits (exact count) or budgetMicros, optional declaredCategory / priceCategory. Answers totalMicros, unitPriceMicros, minBudgetMicros, quoteKey and the per-platform lines. Saves nothing.

curl -X POST https://api.halaladz.com/api/v1/quotes \
  -H "Authorization: Bearer $HZ_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
  -d '{"goal": "orders", "declaredCategory": "food", "platforms": ["website", "app"], "targetUnits": "500"}'

Create a campaign

POST /campaigns

Scope campaigns:write. The same body as the dashboard wizard's goal campaign. Send targetUnits (exactly that many clicks or views; the budget is units × one unit price) or budgetMicros.

FieldNotes
nameUp to 200 characters
goalbrand, orders, installs, video or members
declaredCategoryA content category code (e.g. food); priceCategory is optional
halalConfirmedMust be true: you confirm the product and the ad are halal
targetUnits / budgetMicrosDigits in a string
platformswebsite, app, telegram, whatsapp, youtube, facebook, instagram, tiktok; each once; each must fit the length
durationHours12, 24 or n × 24 (up to the admin maximum)
startModeafter_review, or date with startDate (YYYY-MM-DD) and startTime (HH:mm)
targeting, freqCapAs in the dashboard (countries, areas, content categories, devices …)
curl -X POST https://api.halaladz.com/api/v1/campaigns \
  -H "Authorization: Bearer $HZ_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: eid-campaign-1" \
  -d '{ "name": "Eid dates offer", "goal": "orders", "declaredCategory": "food", "halalConfirmed": true, "targeting": { "countries": ["BD"] }, "targetUnits": "500", "platforms": ["website", "app", "telegram"], "durationHours": 120, "startMode": "after_review" }'

Answers 201 with the budget view (id, campaignId, totalMicros, the lines) and quote. Typical refusals: 422 below_min_budget (with minBudgetMicros), 422 rate_unavailable, 422 duration_too_short, 422 start_in_past, 400 validation_error.

Add creatives

POST /uploads

Scope creatives:write. Body {"contentType": "image/png", "sizeBytes": 48211} (image/jpeg, png, webp, gif, video/mp4, webm). Answers uploadUrl, headers and assetUrl. PUT the file to uploadUrl with exactly those headers, then use assetUrl.

curl -X POST https://api.halaladz.com/api/v1/uploads \
  -H "Authorization: Bearer $HZ_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
  -d '{"contentType": "image/png", "sizeBytes": 48211}'

# then upload the file to the uploadUrl you got, with the headers you got
curl -X PUT "<uploadUrl>" -H "Content-Type: image/png" --data-binary @banner.png

POST /campaigns/{id}/creatives

Body: format (banner_300x250, banner_320x50, native, interstitial, video_muted, telegram_post …), landingUrl (https; blocked domains are refused with 422 domain_blocked), assetUrl for display and video formats, optional title, body, cta, hasPeople. Answers 201 with reviewStatus pending or ai_passed — never approved: only a HalalAdz person approves an ad, also for test keys. The webhook creative.approved / creative.rejected tells you the result.

curl -X POST https://api.halaladz.com/api/v1/campaigns/123/creatives \
  -H "Authorization: Bearer $HZ_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
  -d '{"format": "banner_300x250", "assetUrl": "<assetUrl>", "title": "Fresh dates", "landingUrl": "https://shop.example.com/dates"}'

GET /campaigns/{id}/creatives

curl https://api.halaladz.com/api/v1/campaigns/123/creatives -H "Authorization: Bearer $HZ_KEY"

Launch

POST /campaigns/{id}/launch

Body {"expectedTotalMicros": "<the total you saw>", "quoteKey"?: "..."}. Re-prices at today's rates and moves the whole total from the wallet into the campaign reserve in one ledger transaction; status in_review. Same as POST /campaigns/{id}/submit.

AnswerMeaning
200Paid and sent to review
402 insufficient_fundsdetails: totalMicros, balanceMicros, missingMicros. Add money in the dashboard wallet
409 price_changeddetails.totalMicros is the new total: check it and launch again with it
422 no_creativesAdd at least one ad first
403 spend_limit_reachedLive key: today's launches + this total go over the key's daily spend limit (set by HalalAdz; 0 = none yet)
422 test_money_capTest key: more than one million BDT of test money in open test campaigns
409 invalid_status, 409 already_paidOnly a draft (or rejected) campaign can be launched
curl -X POST https://api.halaladz.com/api/v1/campaigns/123/launch \
  -H "Authorization: Bearer $HZ_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-123" \
  -d '{"expectedTotalMicros": "4500000000"}'

Change budget and dates

PATCH /campaigns/{id}

Send only what changes: targetUnits or budgetMicros, platforms, startMode, startAt, durationHours, name. The price is quoted again. Only before launch (draft, or rejected with its money returned) — after launch the budget is paid and locked (409 budget_locked), as in the dashboard.

curl -X PATCH https://api.halaladz.com/api/v1/campaigns/123 \
  -H "Authorization: Bearer $HZ_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
  -d '{"targetUnits": "300", "durationHours": 240}'

Pause, resume and end

POST /campaigns/{id}/pause

POST /campaigns/{id}/resume

POST /campaigns/{id}/end

Only an active campaign can be paused and only a paused one resumed; otherwise 409 invalid_status. end is for good: the unspent budget goes back at once.

curl -X POST https://api.halaladz.com/api/v1/campaigns/123/pause -H "Authorization: Bearer $HZ_KEY" -H "Idempotency-Key: $(uuidgen)"
curl -X POST https://api.halaladz.com/api/v1/campaigns/123/resume -H "Authorization: Bearer $HZ_KEY" -H "Idempotency-Key: $(uuidgen)"
curl -X POST https://api.halaladz.com/api/v1/campaigns/123/end -H "Authorization: Bearer $HZ_KEY" -H "Idempotency-Key: $(uuidgen)"

With a test key

With a hz_test_ key the same calls make a test campaign: the same checks and the same human halal review (a review decision cannot be simulated — POST /sandbox/creatives/{id}/review answers 410 review_by_halaladz). Its budget is test money, never your wallet; it shows only on your own places with Test ads on, never to real publishers; ending it returns the test money to the test wallet. See webhooks in the sandbox.

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

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