lead-folders
Organize leads into folders for calling and outreach.
Create a lead folder
Creates a lead folder in the caller's (or an admin/manager's chosen) workspace. Non-admin/manager callers always become the sole `allowedUsers` entry regardless of what they pass; admins/managers can set `allowedUsers` explicitly, filtered down to members of the target workspace. `offerProfile` is the default offer for AI openers of leads in the folder and is only set for admin/manager callers.
List lead folders
Lists lead folders with their lead/contacted/phone counts and pin state. Non-admin/manager callers only see folders where they are in `allowedUsers` (or the folder has none set); when no `workspace` filter is given, integration-managed folders (leadconnector/heyreach) are deduplicated to one per unique name, scoped to workspaces where that integration is actually enabled.
Edit a lead folder
Updates a lead folder. Non-admin/manager callers must already be in `allowedUsers` to edit it, and cannot change `allowedUsers` themselves; special folders (leadconnector/heyreach, see `SpecialFolderIds`) only allow updating `profile` and `allowedUsers`, since the rest is integration-managed. Changing `workspace` as an admin/manager re-points every lead currently in the folder to the new workspace.
Get a lead folder
Fetches a single lead folder by ID or special folder ID.
Delete a lead folder
Permanently deletes a lead folder (non-admin/manager callers must be in `allowedUsers`). Special integration-managed folders (leadconnector/heyreach) cannot be deleted this way.