internal

Bulk Assign Role

Attach one role to a batch of the company's active users in a single step.

Handy for migration (put everyone on the same company role at once) and for recovery — selecting all users and assigning the global full_user role restores broad access after a botched migration. Additive only: it never removes a role, so it's safe to re-run and doesn't undo anything; strip stale roles afterward via the per-user move flow.

The role must be this company's own or a shared global role (never the staff kobalt_admin). DB-only like the rest of the migration flow (nothing mirrored to SuperTokens); caches are cleared per newly-attached user so the change takes effect at once.

post/internal/migration/companies/{company_id}/bulk-assign-role

Request

  • Base URL
    https://api.kobaltlabs.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.kobaltlabs.com/internal/migration/companies/{company_id}/bulk-assign-role
  • Auth
    none declared

Path parameters

company_idstring uuid required

Request body

user_idsstring[] required
role_idstring uuid required

Response

Successful Response

role_idstring required
role_namestring required
users_totalinteger required
users_assignedinteger required
users_already_hadinteger required

Changes

No recorded changes to this operation across all 8 revisions of this API.