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 field | Type | Notes |
|---|---|---|
provider required | one of meta, google | |
connectionId | string 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.
| Parameter | In | Type | Notes |
|---|---|---|---|
id required | path | string (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.
| Parameter | In | Type | Notes |
|---|---|---|---|
id required | path | string (uuid) |
| Body field | Type | Notes |
|---|---|---|
kind required | one of page, adaccount | |
externalId required | string | at least 1 characters. up to 40 characters |
targetId | string 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.
| Parameter | In | Type | Notes |
|---|---|---|---|
id required | path | string (uuid) |
| Body field | Type | Notes |
|---|---|---|
kind required | one of page, adaccount | |
externalId required | string | at least 1 characters. up to 40 characters |
targetId | string 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.
| Parameter | In | Type | Notes |
|---|---|---|---|
id required | path | string (uuid) |
| Body field | Type | Notes |
|---|---|---|
mode required | one of own, all, selected | |
clientIds | list of string or null | up to 200 items. default [] |
releaseAssets | boolean | default 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.
| Parameter | In | Type | Notes |
|---|---|---|---|
id required | path | string (uuid) |
| Body field | Type | Notes |
|---|---|---|
assetId | string or null | |
campaignId | string or null | |
campaignName | string or null | |
formId | string 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.