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.Base URL
Authentication
All Admin API requests require an API key in theAuthorization 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
List of onboarded users, each containing:
merged_user_id— Unique identifier for the user in Bilancname— The user’s display nameemail— The user’s primary email addressgithub_username— The user’s GitHub login
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
List of email addresses to onboard. At least one of
email_addresses or github_usernames must be provided.List of GitHub usernames to onboard. At least one of
email_addresses or github_usernames must be provided.Example
Response
Response Fields
A summary of the result, e.g.
"Users were successfully onboarded" or "All users are already onboarded".Number of users that were newly onboarded.
List of Bilanc user IDs that were onboarded.
Total number of users matched from the provided identifiers.
Contains any identifiers that could not be matched to existing users:
email_addresses— Unmatched email addressesgithub_usernames— Unmatched GitHub usernames
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 thenot_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
List of email addresses to offboard. At least one of
email_addresses or github_usernames must be provided.List of GitHub usernames to offboard. At least one of
email_addresses or github_usernames must be provided.Example
Response
Response Fields
A summary of the result, e.g.
"Users were successfully offboarded".Number of users that were offboarded.
List of Bilanc user IDs that were offboarded.
Contains any identifiers that could not be matched to onboarded users:
email_addresses— Unmatched email addressesgithub_usernames— Unmatched GitHub usernames
List of warnings if any identifiers could not be matched.
Error Responses
All Admin API endpoints return standard HTTP error codes:| Status Code | Description |
|---|---|
400 | Bad request — at least one of email_addresses or github_usernames must be provided |
401 | Unauthorised — invalid or missing API key |
404 | No users found matching the provided identifiers |
500 | Internal server error |
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

