Rolebase Developers
API Reference

role

Defines the purpose, domain, accountabilities, and other aspects of a position or function within an organization. Each circle is associated with a role.

Fields

FieldTypeDescription
iduuidUnique identifier for the role
orgIduuidReference to the organization
nameStringName of the role
purposeStringThe role’s purpose or mission
domainStringAreas of authority and control
accountabilitiesStringList of accountabilities
checklistStringChecklist of recurring responsibilities
indicatorsStringPerformance indicators to track
notesStringAdditional notes
archivedBooleanWhether the role is archived (default: false)
baseBooleanWhether this is a base role (default: false)
singleMemberBooleanWhether the role can only have one member (default: false)
parentLinkBooleanWhether the role can be linked to parent circles (default: false)
colorHueSmallintColor hue for visual representation (optional)

Relationships

Object Relationships:

  • org β€” The organization this role belongs to

Array Relationships:

  • circles β€” Circles that use this role

Query Examples

List Roles in an Organization

query GetRoles($orgId: uuid!) {
  role(where: { orgId: { _eq: $orgId } }) {
    id
    name
  }
}

Get a Specific Role with Full Details

query GetRole($id: uuid!) {
  role_by_pk(id: $id) {
    id
    name
    purpose
    domain
    accountabilities
    checklist
    indicators
    notes
  }
}

Mutation Examples

Create a Role

mutation CreateRole {
  insert_role_one(
    object: {
      orgId: "your-org-id"
      name: "Software Engineer"
      purpose: "Develop and maintain software applications"
      domain: "Application codebase and development tools"
      accountabilities: "Write clean code, Review PRs, Debug issues"
      checklist: "Daily code review, Weekly status updates"
      indicators: "Code quality metrics, Bug resolution time"
      notes: "Focus on maintainable and scalable code"
      singleMember: false
    }
  ) {
    id
    name
    purpose
  }
}

Update a Role

mutation UpdateRole {
  update_role_by_pk(
    pk_columns: { id: "role-id" }
    _set: {
      name: "Senior Software Engineer"
      accountabilities: "Lead development, Mentor team members, Architect solutions"
    }
  ) {
    id
    name
    accountabilities
  }
}

Permissions

  • View β€” All organization members can view roles
  • Create β€” Owners can create any role. Admins and Members can create non-base roles
  • Update β€” Owners can update any role. For non-base roles: if the organization has protectGovernance disabled, Admins and Members can update them. Circle leaders can also update roles within their circles
  • Delete β€” Only available through the Hasura admin API
Info Circle Notes

Base roles (base: true) are fundamental to the organization and can only be modified by owners. The singleMember flag restricts assignment to one person. The combination of purpose, domain, and accountabilities defines the complete scope of the role.