Headlessly

Identity

User, ApiKey — authentication and tenancy.

Identity is backed by WorkOS via oauth.do. Users authenticate, ApiKeys enable programmatic access. Organization is defined in the CRM domain.

User

Authenticated humans — founders, team members, collaborators.

import { Noun } from 'digital-objects'

export const User = Noun('User', {
  name: 'string!',
  email: 'string!##',
  avatar: 'string',
  role: 'Admin | Member | Viewer',
  status: 'Active | Suspended | Invited',
  invite: 'Invited',
  suspend: 'Suspended',
  activate: 'Activated',
})
VerbEventDescription
inviteInvitedSend invite to join organization
suspendSuspendedTemporarily disable access
activateActivatedActivate a user account

ApiKey

Programmatic access — SDK, CI/CD, agent authentication.

export const ApiKey = Noun('ApiKey', {
  name: 'string!',
  keyPrefix: 'string!##',
  scopes: 'string',
  status: 'Active | Revoked | Expired',
  revoke: 'Revoked',
})
VerbEventDescription
revokeRevokedPermanently disable the key

On this page