Data Models

Permissions

Permissions define what actions a user can perform within an organization.

Permission Model

Permissions follow a resource:action format. They are grouped into roles and assigned to users through organization memberships.

PermissionDescription
users:readView user profiles and listings
users:writeCreate, update, and delete users
orgs:manageManage organization settings and billing
webhooks:manageCreate and configure webhook endpoints

Checking Permissions

check-perms.ts
const allowed = await interna.permissions.check({
  userId: "usr_2xK9mPqR",
  permission: "users:write",
  organizationId: "org_4tL3nWqX",
});
// { allowed: true }