BlueForge Docs

client.org.addMember

Add a member to an organisation.

Signature

class Client {
  org: {
    addMember(orgId: string, userId: string, role: string): Promise<{ success: boolean }>
  }
}

Parameters

NameTypeRequiredNotes
orgId
stringyesOrganisation ID
userId
stringyesUser ID to add
role
stringyesRole:
admin
,
member
,
viewer

Throws

ErrorCondition
AuthError
Insufficient permissions
NotFoundError
Organisation or user not found
ConflictError
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}