People
List People
Returns a paginated list of people in the current workspace. Usestarting_after or ending_before to page through large collections.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.people.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.people.list();
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
}
Show Response
Show Response
{
"object": str,
"data": [{
"id": str,
"account_id": str,
"email": str,
"display_name": str,
"avatar_url": Optional[str],
"roles": List[str],
"groups": List[str],
"status": Literal["PERSON_STATUS_UNSPECIFIED", "PERSON_STATUS_PENDING", "PERSON_STATUS_ACTIVE"],
"last_activity": date, # optional
"created_at": date,
"updated_at": date,
}],
"has_more": bool,
}
{
object: string;
data: {
id: string;
accountId: string;
email: string;
displayName: string;
avatarUrl?: string;
roles: string[];
groups: string[];
status: "PERSON_STATUS_UNSPECIFIED" | "PERSON_STATUS_PENDING" | "PERSON_STATUS_ACTIVE";
lastActivity?: Date;
createdAt: Date;
updatedAt: Date;
}[];
hasMore: boolean;
}
Create a Person
Invites one or more people to the current workspace. If an email is not already registered, a new account is created and an invitation email is sent. Existing accounts are linked directly to the workspace.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.people.create(emails=[
"<value 1>",
"<value 2>",
])
# 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.people.create({
emails: [
"<value 1>",
"<value 2>",
],
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"emails": List[str], # required
"roles": List[str], # optional
"groups": List[str], # optional
}
{
emails: string[]; // required
roles?: string[];
groups?: string[];
}
Show Response
Show Response
{
"people": [{
"id": str,
"account_id": str,
"email": str,
"display_name": str,
"avatar_url": Optional[str],
"roles": List[str],
"groups": List[str],
"status": Literal["PERSON_STATUS_UNSPECIFIED", "PERSON_STATUS_PENDING", "PERSON_STATUS_ACTIVE"],
"last_activity": date, # optional
"created_at": date,
"updated_at": date,
}],
}
{
people: {
id: string;
accountId: string;
email: string;
displayName: string;
avatarUrl?: string;
roles: string[];
groups: string[];
status: "PERSON_STATUS_UNSPECIFIED" | "PERSON_STATUS_PENDING" | "PERSON_STATUS_ACTIVE";
lastActivity?: Date;
createdAt: Date;
updatedAt: Date;
}[];
}
Retrieve a Person
Retrieves the details of an existing workspace member or invited user by their person ID.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.people.get(person_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.people.get({
personId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"person_id": str, # required
}
{
personId: string; // required
}
Show Response
Show Response
{
"person": {
"id": str,
"account_id": str,
"email": str,
"display_name": str,
"avatar_url": Optional[str],
"roles": List[str],
"groups": List[str],
"status": Literal["PERSON_STATUS_UNSPECIFIED", "PERSON_STATUS_PENDING", "PERSON_STATUS_ACTIVE"],
"last_activity": date, # optional
"created_at": date,
"updated_at": date,
},
}
{
person: {
id: string;
accountId: string;
email: string;
displayName: string;
avatarUrl?: string;
roles: string[];
groups: string[];
status: "PERSON_STATUS_UNSPECIFIED" | "PERSON_STATUS_PENDING" | "PERSON_STATUS_ACTIVE";
lastActivity?: Date;
createdAt: Date;
updatedAt: Date;
};
}
Delete a Person
Removes a member or invited user from the workspace. API keys owned by the removed user are cascade revoked. The response body is empty when the delete succeeds.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.people.delete(person_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.people.delete({
personId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"person_id": str, # required
}
{
personId: string; // required
}
Update a Person
Updates the roles and group assignments of a workspace member. Omitted fields keep their current values.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.people.update(person_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.people.update({
personId: "<id>",
updatePersonRequest: {},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"person_id": str, # required
"roles": List[str], # optional
"groups": List[str], # optional
"clear_roles": Optional[bool],
"clear_groups": Optional[bool],
}
{
personId: string; // required
updatePersonRequest: { // required
roles?: string[];
groups?: string[];
clearRoles?: boolean;
clearGroups?: boolean;
};
}
Show Response
Show Response
{
"person": {
"id": str,
"account_id": str,
"email": str,
"display_name": str,
"avatar_url": Optional[str],
"roles": List[str],
"groups": List[str],
"status": Literal["PERSON_STATUS_UNSPECIFIED", "PERSON_STATUS_PENDING", "PERSON_STATUS_ACTIVE"],
"last_activity": date, # optional
"created_at": date,
"updated_at": date,
},
}
{
person: {
id: string;
accountId: string;
email: string;
displayName: string;
avatarUrl?: string;
roles: string[];
groups: string[];
status: "PERSON_STATUS_UNSPECIFIED" | "PERSON_STATUS_PENDING" | "PERSON_STATUS_ACTIVE";
lastActivity?: Date;
createdAt: Date;
updatedAt: Date;
};
}
Resend Invitation
Resends the invitation email to a pending workspace member. Has no effect if the person has already accepted.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.people.resend_invitation(person_id="<id>", resend_invitation_request={})
# 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.people.resendInvitation({
personId: "<id>",
resendInvitationRequest: {},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"person_id": str, # required
"resend_invitation_request": Dict[str, Any], # required
}
{
personId: string; // required
resendInvitationRequest: Record<string, unknown>; // required
}
Show Response
Show Response
{
"person": {
"id": str,
"account_id": str,
"email": str,
"display_name": str,
"avatar_url": Optional[str],
"roles": List[str],
"groups": List[str],
"status": Literal["PERSON_STATUS_UNSPECIFIED", "PERSON_STATUS_PENDING", "PERSON_STATUS_ACTIVE"],
"last_activity": date, # optional
"created_at": date,
"updated_at": date,
},
}
{
person: {
id: string;
accountId: string;
email: string;
displayName: string;
avatarUrl?: string;
roles: string[];
groups: string[];
status: "PERSON_STATUS_UNSPECIFIED" | "PERSON_STATUS_PENDING" | "PERSON_STATUS_ACTIVE";
lastActivity?: Date;
createdAt: Date;
updatedAt: Date;
};
}