Organisation
Manage org profile, membership (invite, remove), and plan usage with recall.org.
The organisation is the root tenancy unit in Recall. Every agent, namespace, and API key belongs to exactly one org. The recall.org resource lets you inspect and manage that root layer programmatically — useful for onboarding automation, compliance reporting, and pre-flight capacity checks before bulk operations.
org.profile(options?)
recall.org.profile(options?: TransportRequestOptions): Promise<OrgProfile>Returns the org's current profile.
Returns
idstringalwaysnamestringalwaysslugstringalwayscreatedAtstringalwaysExample
const profile = await recall.org.profile()
console.log(`Org: ${profile.name} (${profile.slug})`)Errors
UNAUTHORIZED401fatalFORBIDDEN403fataladmin scope.org.patchProfile(changes, options?)
recall.org.patchProfile(
changes: { name?: string },
options?: TransportRequestOptions
): Promise<OrgProfile>Update mutable fields on the org profile. Currently only name is patchable. Returns the full updated OrgProfile.
slug is immutable once set during org creation. If you need to change it, contact support — it requires a migration of all dashboard links and webhook URLs that reference the slug.
Parameters
changes.namestringoptionaloptionsTransportRequestOptionsoptionalExample
const updated = await recall.org.patchProfile({ name: 'Acme AI (Production)' })
console.log('Name updated to:', updated.name, 'at', updated.createdAt)Errors
UNAUTHORIZED401fatalFORBIDDEN403fataladmin scope.VALIDATION_ERROR422fatalorg.members(opts?, options?)
recall.org.members(
opts?: { limit?: number; cursor?: string },
options?: TransportRequestOptions
): PagedRequest<OrgMember>Returns a PagedRequest<OrgMember> listing every active member of the org. await for the first page, for await to auto-paginate.
OrgMember (per item)
userIdstringalwaysemailstringalwaysrolestringalwaysowner, admin, or member. See role table below.joinedAtstringalwaysRoles
| Role | Permissions |
|---|---|
owner | Founding user. Immutable — cannot be transferred or removed. |
admin | Full control: manage members, billing, all API keys, all agents. |
member | Read/write memories within assigned agent scope. Cannot manage members or billing. |
Example
// Print all admins
for await (const m of recall.org.members()) {
if (m.role === 'admin' || m.role === 'owner') {
console.log(m.email, m.role)
}
}Errors
UNAUTHORIZED401fatalFORBIDDEN403fataladmin scope.org.inviteMember(email, role, options?)
recall.org.inviteMember(
email: string,
role: 'admin' | 'member',
options?: TransportRequestOptions
): Promise<OrgMember>Sends an email invitation to the specified address. The response reflects the intended member record — the invitee's joinedAt is set optimistically and the record becomes fully active when they log in for the first time. Inviting an address that is already a member is idempotent: the server returns the existing record and does not resend the email.
Parameters
emailstringrequiredrole'admin' | 'member'requiredowner — there is exactly one owner per org.optionsTransportRequestOptionsoptionalExample
const member = await recall.org.inviteMember('engineer@acme.com', 'member')
console.log('Invited:', member.email, 'role:', member.role)Errors
UNAUTHORIZED401fatalFORBIDDEN403fataladmin scope, or caller attempted to assign owner role.VALIDATION_ERROR422fatalorg.removeMember(userId, options?)
recall.org.removeMember(userId: string, options?: TransportRequestOptions): Promise<DeleteResult>Removes a member from the org. The user loses access to the dashboard and all admin-plane operations immediately. Returns DeleteResult: { id, deletedAt }.
Removing a member does NOT auto-revoke their API keys. Keys issued to agents in the org continue to authenticate until you explicitly call recall.keys.delete() on each one. Audit recall.keys.list() after removing a member to revoke any keys they issued.
Example
const result = await recall.org.removeMember('usr_xyz789')
console.log('Removed at:', result.deletedAt)
// Follow up: revoke any keys the user issued
for await (const key of recall.keys.list()) {
if (key.createdBy === 'usr_xyz789') {
await recall.keys.delete(key.id)
}
}Errors
UNAUTHORIZED401fatalFORBIDDEN403fataladmin scope, or caller attempted to remove the owner.NOT_FOUND404fatalorg.plan(options?)
recall.org.plan(options?: TransportRequestOptions): Promise<PlanInfo>Returns current plan tier and real-time usage counters. Use this for pre-flight capacity checks before bulk write operations and for building usage dashboards.
Returns
tierstringalways'free', 'pro', 'enterprise').memoriesUsednumberalwaysmemoriesLimitnumberalways-1 means unlimited.agentsUsednumberalwaysagentsLimitnumberalways-1 means unlimited.namespacesUsednumberalwaysnamespacesLimitnumberalways-1 means unlimited.Limits reset on the billing-cycle anniversary — not on the first of the calendar month. Check PlanInfo rather than assuming a monthly boundary.
Example — pre-flight guard before a bulk import
const plan = await recall.org.plan()
const headroom = plan.memoriesLimit - plan.memoriesUsed
if (plan.memoriesLimit !== -1 && headroom < batchSize) {
throw new Error(
`Only ${headroom} memory slots remain on the ${plan.tier} plan. ` +
`Upgrade or call recall.forget() to free space before importing.`
)
}
// Safe to proceed
await importMemories(batch)Errors
UNAUTHORIZED401fatalFORBIDDEN403fataladmin scope.Was this page helpful?