POST /api/v1/business-units/{business_unit_uuid}/members/{action}

Bulk add or remove account members from a business unit. When adding, accounts already assigned to a different business unit are reassigned to this one.

Path parameters

  • business_unit_uuid string Required
  • action string Required

    The action to perform. Allowed: add, remove.

  • business_unit string Required

    The UUID of the business unit.

application/json

Body

  • accounts array[string(uuid)] Required

    UUIDs of accounts to add to or remove from the business unit.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • successful array[string]
    • failed array
POST /api/v1/business-units/{business_unit_uuid}/members/{action}
curl \
 --request POST 'https://api.plannrcrm.com/api/v1/business-units/6ff8f7f6-1eb3-3525-be4a-3932c805afed/members/add' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"accounts":["4f11f190-84fd-49ef-8b9e-fbdbbb44429e","18fd2a0b-f55e-43ea-b2a4-592e4829015d","7b6818aa-ec42-4178-a1b5-9a5b507e0d5c"]}'
Request examples
{
  "accounts": [
    "4f11f190-84fd-49ef-8b9e-fbdbbb44429e",
    "18fd2a0b-f55e-43ea-b2a4-592e4829015d",
    "7b6818aa-ec42-4178-a1b5-9a5b507e0d5c"
  ]
}
Response examples (200)
{
  "successful": [
    "uuid-1",
    "uuid-2"
  ],
  "failed": []
}