Rolebase Developers

GraphQL API

Access and manage your Rolebase organizations programmatically through the GraphQL API.

API Keys

Generate API keys from Settings > API keys in the app. These keys authenticate all requests to the API, and to the tRPC API as well.

GraphQL Endpoint

Production: https://api.rolebase.io/graphql

Local development: http://localhost:8888/graphql

The API is powered by Hasura, so you can refer to the Hasura documentation for advanced query capabilities.

Try queries live in the GraphQL Playground. For backend procedures that go beyond CRUD, see the tRPC API.

Quick Start

Using curl

Terminal window
curl -X POST https://api.rolebase.io/graphql \
-H "x-api-key: YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"query": "{ org { id, name } }"}'

Using Apollo Client

import {
ApolloClient,
InMemoryCache,
createHttpLink,
gql,
} from '@apollo/client'
// Create the client with auth headers
const client = new ApolloClient({
link: createHttpLink({
uri: 'https://api.rolebase.io/graphql',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
},
}),
cache: new InMemoryCache(),
})
// Example query
const { data } = await client.query({
query: gql`
query GetOrganization {
org {
id
name
}
}
`,
})
Lamp On Authentication

Include the x-api-key header in every request. Your API key determines which organization data you can access and what operations are permitted.

Entities

Each entity supports standard GraphQL operations (query, mutation) depending on your API key permissions.

Organization & Members

Circles & Roles

Meetings