Skip to content
API reference

Ad spend

What was spent per channel and campaign.

GET/spend

List spend

Needs the permission attribution:read.

ParameterInTypeNotes
fromquerystring
toquerystring
curl -X GET https://crm.anibrosdesign.com/api/v1/spend \
  -H "Authorization: Bearer crm_live_xxxxxxxx"

Responses: 200 400 401 403 429

POST/spend

Create a spend

Needs the permission attribution:manage.

ParameterInTypeNotes
Idempotency-KeyheaderstringAny unique string up to 128 characters. Repeating the request with the same key returns the first response. up to 128 characters
Body fieldTypeNotes
source requiredone of website, referral, portal, direct, meta_ads, google_ads, walk_in, other
campaignstring or null
periodStart requiredstring
periodEnd requiredstring
amount requirednumberat least 0. up to 999999999999
notestring or null
curl -X POST https://crm.anibrosdesign.com/api/v1/spend \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"source":"website","campaign":"text","periodStart":"text","periodEnd":"text","amount":0}'

Responses: 201 400 401 402 403 429

POST/spend/import

Import (spends)

Needs the permission attribution:manage.

Body fieldTypeNotes
csv requiredstringat least 1 characters. up to 900000 characters
dryRunbooleandefault false
curl -X POST https://crm.anibrosdesign.com/api/v1/spend/import \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"csv":"text","dryRun":false}'

Responses: 200 400 401 402 403 429

PATCH/spend/{id}

Change a spend

Needs the permission attribution:manage.

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
campaignstring or null
periodStartstring
periodEndstring
amountnumberat least 0. up to 999999999999
notestring or null
curl -X PATCH https://crm.anibrosdesign.com/api/v1/spend/{id} \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"campaign":"text","periodStart":"text","periodEnd":"text"}'

Responses: 200 400 401 402 403 404 412 429

DELETE/spend/{id}

Delete a spend

Needs the permission attribution:manage.

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

Responses: 204 400 401 402 403 404 429

Something missing or unclear? Tell us.

Chat on WhatsApp