Returns all users in the current workspace, including their team memberships and workspace roles. Requires a Management Key with user permissions or an authenticated workspace admin session. Standard API keys are not supported.
from orq_ai_sdk import Orqimport oswith Orq( api_key=os.getenv("ORQ_API_KEY", ""),) as orq: res = orq.users.list() # Handle response print(res)
import { Orq } from "@orq-ai/node";const orq = new Orq({ apiKey: process.env["ORQ_API_KEY"] ?? "",});async function run() { const result = await orq.users.list(); console.log(result);}run();
Retrieves one workspace user by workspace-user ID. Requires a Management Key with user permissions or an authenticated workspace admin session. Standard API keys are not supported.
from orq_ai_sdk import Orqimport oswith Orq( api_key=os.getenv("ORQ_API_KEY", ""),) as orq: res = orq.users.get(user_id="<id>") # Handle response print(res)
import { Orq } from "@orq-ai/node";const orq = new Orq({ apiKey: process.env["ORQ_API_KEY"] ?? "",});async function run() { const result = await orq.users.get({ userId: "<id>", }); console.log(result);}run();
Removes a user from the current workspace, refreshes membership state, and revokes API keys owned by that workspace user. Requires a Management Key with user permissions or an authenticated workspace admin session. Standard API keys are not supported.
from orq_ai_sdk import Orqimport oswith Orq( api_key=os.getenv("ORQ_API_KEY", ""),) as orq: res = orq.users.delete(user_id="<id>") # Handle response print(res)
import { Orq } from "@orq-ai/node";const orq = new Orq({ apiKey: process.env["ORQ_API_KEY"] ?? "",});async function run() { const result = await orq.users.delete({ userId: "<id>", }); console.log(result);}run();
Updates a user’s last-activity timestamp and/or workspace role. Omitted fields remain unchanged. Requires a Management Key with user permissions or an authenticated workspace admin session. Standard API keys are not supported.
from orq_ai_sdk import Orqfrom orq_ai_sdk.utils import parse_datetimeimport oswith Orq( api_key=os.getenv("ORQ_API_KEY", ""),) as orq: res = orq.users.update(user_id="<id>", last_activity=parse_datetime("2024-01-01T00:00:00Z")) # Handle response print(res)
import { Orq } from "@orq-ai/node";const orq = new Orq({ apiKey: process.env["ORQ_API_KEY"] ?? "",});async function run() { const result = await orq.users.update({ userId: "<id>", updateUserRequest: { lastActivity: "<value>", }, }); console.log(result);}run();
Creates accounts when necessary, adds each user to the current workspace and specified team, assigns the workspace role, and sends the welcome email for newly created accounts. Requires a Management Key with user permissions or an authenticated workspace admin session. Standard API keys are not supported.
from orq_ai_sdk import Orqimport oswith Orq( api_key=os.getenv("ORQ_API_KEY", ""),) as orq: res = orq.users.create(team_id="<id>", emails=["<value>"]) # Handle response print(res)
import { Orq } from "@orq-ai/node";const orq = new Orq({ apiKey: process.env["ORQ_API_KEY"] ?? "",});async function run() { const result = await orq.users.create({ teamId: "<id>", createUsersRequest: { emails: ["<value>"], }, }); console.log(result);}run();