Skip to main content

Admin API

The Admin API provides endpoints for programmatically managing which engineers are onboarded and offboarded in Bilanc. This is useful for automating user lifecycle management — for example, syncing your Active Directory or GitHub organisation membership with Bilanc. Users can be identified by their email address or GitHub username.
These endpoints require an Organisation API Key. To generate one, click your name in the bottom-left corner of the Bilanc app, select Account Settings, then navigate to Organisation API Keys. If you don’t see this page, contact an owner in your organisation.

Base URL

Authentication

All Admin API requests require an API key in the Authorization header:

List Onboarded Users

Retrieve all currently onboarded users in your organisation, including their name, email, and GitHub username.

Parameters

This endpoint does not require any request body or query parameters.

Example

Response

Response Fields

array
List of onboarded users, each containing:
  • merged_user_id — Unique identifier for the user in Bilanc
  • name — The user’s display name
  • email — The user’s primary email address
  • github_username — The user’s GitHub login
integer
Total number of onboarded users returned.

Onboard Users

Onboard one or more users by providing their email addresses and/or GitHub usernames. Bilanc will match these against existing users in your data sources and add them as onboarded engineers.

Request Body

string[]
List of email addresses to onboard. At least one of email_addresses or github_usernames must be provided.
string[]
List of GitHub usernames to onboard. At least one of email_addresses or github_usernames must be provided.
You can provide both email_addresses and github_usernames in the same request. Bilanc will match users against either identifier.

Example

Response

Response Fields

string
A summary of the result, e.g. "Users were successfully onboarded" or "All users are already onboarded".
integer
Number of users that were newly onboarded.
string[]
List of Bilanc user IDs that were onboarded.
integer
Total number of users matched from the provided identifiers.
object
Contains any identifiers that could not be matched to existing users:
  • email_addresses — Unmatched email addresses
  • github_usernames — Unmatched GitHub usernames
string[]
List of warnings, e.g. ["Some users were not found"] if any identifiers could not be matched.

Partial Matches

If some identifiers are found and others are not, the endpoint will onboard the matched users and return the unmatched identifiers in the not_found field. Check warnings to see if any identifiers were not found.

Offboard Users

Offboard one or more users by providing their email addresses and/or GitHub usernames. This removes the users from your onboarded engineers list.

Request Body

string[]
List of email addresses to offboard. At least one of email_addresses or github_usernames must be provided.
string[]
List of GitHub usernames to offboard. At least one of email_addresses or github_usernames must be provided.

Example

Response

Response Fields

string
A summary of the result, e.g. "Users were successfully offboarded".
integer
Number of users that were offboarded.
string[]
List of Bilanc user IDs that were offboarded.
object
Contains any identifiers that could not be matched to onboarded users:
  • email_addresses — Unmatched email addresses
  • github_usernames — Unmatched GitHub usernames
string[]
List of warnings if any identifiers could not be matched.

Error Responses

All Admin API endpoints return standard HTTP error codes:

Example Error Response


Common Use Cases

  • Sync with Active Directory: Automate onboarding and offboarding by comparing your AD/SAML user list with Bilanc’s onboarded users
  • New starter automation: Trigger onboarding via CI/CD or a script when new engineers join your GitHub organisation
  • Leaver removal: Automatically offboard users when they leave the organisation
  • Slack workflow integration: Build a Slack workflow that triggers onboarding/offboarding via these endpoints