client.org.addMember
Add a member to an organisation.
Signature
class Client {
org: {
addMember(orgId: string, userId: string, role: string): Promise<{ success: boolean }>
}
}
Parameters
| Name | Type | Required | Notes |
|---|---|---|---|
| string | yes | Organisation ID |
| string | yes | User ID to add |
| string | yes | Role: , , |
Throws
| Error | Condition |
|---|---|
| Insufficient permissions |
| Organisation or user not found |
| User is already a member |
Examples
await bf.org.addMember('org_abc', 'user_xyz', 'member')
Pitfalls
- Admin only — only org admins can add members
- Role changes — to change a role, remove and re-add the member with the new role
See also
{auto-injected}
Tested against
{auto-injected}