Rolebase Developers

Custom Integrations

Build custom integrations and automations using the Rolebase GraphQL API.

Overview

Rolebase exposes a GraphQL API backed by Hasura. You can use this API to build custom integrations, scripts, or dashboards that interact with your organizational data.

API Access

  • The API endpoint is available at your Nhost project’s GraphQL URL.
  • Authentication is handled via Nhost auth tokens.
  • Refer to the API Reference for available queries, mutations, and entity schemas.

Authentication

To authenticate API requests, you need an API key or a user auth token:

  • API keys can be created from the organization settings. They provide programmatic access scoped to a specific organization.
  • User auth tokens are obtained through the Nhost authentication flow and carry the permissions of the authenticated user.

Include the token in the Authorization header:

Authorization: Bearer <your-token>

Example Use Cases

  • Sync tasks with an external project management tool (Jira, Asana, Trello).
  • Build a Slack bot that posts meeting summaries to a channel.
  • Create a custom dashboard that aggregates data across organizations.
  • Automate role assignments based on external HR data.
  • Export meeting history and decisions to a reporting tool.

Example: Fetching Organization Roles

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

Example: Creating a Task

mutation CreateTask($input: task_insert_input!) {
  insert_task_one(object: $input) {
    id
    title
    status
  }
}
Lamp On API-Based Migration

For large organizations migrating from another tool, writing a script that reads your existing data and creates entities via the GraphQL API is the most flexible approach.

User Apps

Rolebase supports user apps (OAuth-connected applications like calendar integrations). If you are building an integration that needs to act on behalf of a user, you can use the user app framework.

See the API Reference for details on the user_app and api_key entities.

Next Steps