Skip to content
API reference

Connections

Facebook and Google sign-ins of an account: which clients each may serve and which client each Page and ad account belongs to (agency owners and administrators).

POST/connections/connect

Start a Facebook or Google sign-in

Makes a new connection (or reconnects one) and returns the sign-in address of the provider. A different account never replaces an existing connection.

Body fieldTypeNotes
provider requiredone of meta, google
connectionIdstring or null
curl -X POST https://crm.anibrosdesign.com/api/v1/connections/connect \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"provider":"meta","connectionId":"text"}'

Responses: 200 400 401 402 429

GET/connections/overview

The connections of the account

Every Facebook and Google sign-in, its Pages and ad accounts, who each belongs to, how far each has got, and a routing check (agency owners and administrators).

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

Responses: 200 401 429

DELETE/connections/{id}

Disconnect a Facebook or Google sign-in

Releases its Pages or ad accounts and removes the rules that gave them away; leads already filed are kept.

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

Responses: 200 400 401 402 404 429

POST/connections/{id}/assets/assign

Give a Page or ad account to a client

New leads of the asset go to that client; waiting leads are filed; a campaign with its own owner keeps it. A null client removes the assignment.

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
kind requiredone of page, adaccount
externalId requiredstringat least 1 characters. up to 40 characters
targetIdstring or null
curl -X POST https://crm.anibrosdesign.com/api/v1/connections/{id}/assets/assign \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"kind":"page","externalId":"text","targetId":"text"}'

Responses: 200 400 401 402 404 429

POST/connections/{id}/assets/preview

Preview giving a Page or ad account to a client

What would change, and whether the connection may serve that client. Changes nothing.

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
kind requiredone of page, adaccount
externalId requiredstringat least 1 characters. up to 40 characters
targetIdstring or null
curl -X POST https://crm.anibrosdesign.com/api/v1/connections/{id}/assets/preview \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"kind":"page","externalId":"text","targetId":"text"}'

Responses: 200 400 401 402 404 429

PUT/connections/{id}/reach

Choose which clients a connection may serve

Only the own company of the agency, every client, or the clients listed. Refused with the affected list if a Page or ad account is given to a client that would no longer be allowed.

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
mode requiredone of own, all, selected
clientIdslist of string or nullup to 200 items. default []
releaseAssetsbooleandefault false
curl -X PUT https://crm.anibrosdesign.com/api/v1/connections/{id}/reach \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"mode":"own","clientIds":["text"],"releaseAssets":false}'

Responses: 200 400 401 402 404 412 429

POST/connections/{id}/route-test

Test where a lead would go

Asks the routing, with the Page or ad account, a campaign and a lead form, where such a lead would be filed and why. Files nothing and remembers nothing.

ParameterInTypeNotes
id requiredpathstring (uuid)
Body fieldTypeNotes
assetIdstring or null
campaignIdstring or null
campaignNamestring or null
formIdstring or null
curl -X POST https://crm.anibrosdesign.com/api/v1/connections/{id}/route-test \
  -H "Authorization: Bearer crm_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"assetId":"text","campaignId":"text","campaignName":"text"}'

Responses: 200 400 401 402 404 429

Something missing or unclear? Tell us.

Chat on WhatsApp