Skip to content
API reference

Ad routing

Whose campaign is whose, and the leads waiting for an owner (agencies).

POST/ad-routing/assign

Decide which client a campaign belongs to

Every waiting lead of the campaign is filed with that client, and so is every future one.

Body fieldTypeNotes
platformstringup to 20 characters
scope requiredone of campaign, form, page, account, source
externalId requiredstringat least 1 characters. up to 80 characters
targetId requiredstring
labelstring or null
applyToWaitingbooleandefault true
viaone of inbox, rulesdefault "rules"
curl -X POST https://crm.anibrosdesign.com/api/v1/ad-routing/assign \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"platform":"text","scope":"campaign","externalId":"text","targetId":"text"}'

Responses: 200 400 401 402 429

GET/ad-routing/campaigns

Get campaigns (ad routings)

ParameterInTypeNotes
platformqueryone of meta, google, bing, linkedin, tiktok, other
qquerystringup to 100 characters
daysqueryintegerat least 1. up to 365
curl -X GET https://crm.anibrosdesign.com/api/v1/ad-routing/campaigns \
  -H "Authorization: Bearer crm_live_xxxxxxxx"

Responses: 200 400 401 429

POST/ad-routing/discard

Discard (ad routings)

Body fieldTypeNotes
key requiredstringat least 3 characters. up to 160 characters
curl -X POST https://crm.anibrosdesign.com/api/v1/ad-routing/discard \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"key":"text"}'

Responses: 200 400 401 402 429

POST/ad-routing/events/{id}/assign

Assign (ad routings)

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
targetId requiredstring
curl -X POST https://crm.anibrosdesign.com/api/v1/ad-routing/events/{id}/assign \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"targetId":"text"}'

Responses: 200 400 401 402 404 429

PUT/ad-routing/keywords/{id}

Set keywords (ad routing)

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
keywords requiredlist of stringup to 40 items
curl -X PUT https://crm.anibrosdesign.com/api/v1/ad-routing/keywords/{id} \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["text"]}'

Responses: 200 400 401 402 404 412 429

GET/ad-routing/overview

The ad routing overview

What waits, which campaigns are owned, and the defaults (agency owners and administrators).

curl -X GET https://crm.anibrosdesign.com/api/v1/ad-routing/overview \
  -H "Authorization: Bearer crm_live_xxxxxxxx"

Responses: 200 401 429

GET/ad-routing/rules

Get rules (ad routings)

curl -X GET https://crm.anibrosdesign.com/api/v1/ad-routing/rules \
  -H "Authorization: Bearer crm_live_xxxxxxxx"

Responses: 200 401 429

PATCH/ad-routing/rules/{id}

Change rules (ad routing)

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
targetId requiredstring
curl -X PATCH https://crm.anibrosdesign.com/api/v1/ad-routing/rules/{id} \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"targetId":"text"}'

Responses: 200 400 401 402 404 412 429

DELETE/ad-routing/rules/{id}

Remove rules (ad routing)

ParameterInTypeNotes
id requiredpathstring (uuid)
curl -X DELETE https://crm.anibrosdesign.com/api/v1/ad-routing/rules/{id} \
  -H "Authorization: Bearer crm_live_xxxxxxxx"

Responses: 200 400 401 402 404 429

PUT/ad-routing/settings

Set settings (ad routings)

Body fieldTypeNotes
matchNames requiredboolean
curl -X PUT https://crm.anibrosdesign.com/api/v1/ad-routing/settings \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"matchNames":true}'

Responses: 200 400 401 402 412 429

GET/ad-routing/unrouted

Leads waiting for an owner

Leads whose client could not be proven, grouped by campaign, masked until someone decides.

curl -X GET https://crm.anibrosdesign.com/api/v1/ad-routing/unrouted \
  -H "Authorization: Bearer crm_live_xxxxxxxx"

Responses: 200 401 429

GET/ad-routing/waiting-count

Get waiting count (ad routings)

curl -X GET https://crm.anibrosdesign.com/api/v1/ad-routing/waiting-count \
  -H "Authorization: Bearer crm_live_xxxxxxxx"

Responses: 200 401 429

Something missing or unclear? Tell us.

Chat on WhatsApp