Company API
Manage employees from your own systems with a company API key - list people, create a person with teams, get a one-time sign-in link, block and unblock. How it differs from a workspace's own API token, with curl examples.
The company API lets your systems manage people: a developer portal such as Backstage, an HR system, an onboarding script.
A company API key
Section API keys in the admin console creates a key that starts with eggk_.
- It is shown once. Eggent keeps only its hash.
- The list shows when each key was last used.
- A key can be revoked at any moment.
Not to be confused with a workspace's API token. The token in Settings → API inside one workspace talks to that one agent: sends it a message, as described in API for integrations. A company key manages people across the company and cannot talk to anyone's agent.
Requests
Every request carries Authorization: Bearer eggk_… and goes to the console's address.
# The company and its people
curl -H "Authorization: Bearer $EGGENT_KEY" https://eggent.company.tld/api/org/<company>
# Create a person
curl -X POST -H "Authorization: Bearer $EGGENT_KEY" -H "Content-Type: application/json" \
-d '{"name": "Anna", "login": "anna@company.tld", "teams": ["Backend"]}' \
https://eggent.company.tld/api/org/<company>/members
# A one-time sign-in link for that person
curl -X POST -H "Authorization: Bearer $EGGENT_KEY" \
https://eggent.company.tld/api/org/<company>/members/<id>/signin-link
The answer to creating a person carries their id. The sign-in link works once.
Blocking and unblocking
curl -X POST -H "Authorization: Bearer $EGGENT_KEY" https://eggent.company.tld/api/org/<company>/members/<id>/block
curl -X POST -H "Authorization: Bearer $EGGENT_KEY" https://eggent.company.tld/api/org/<company>/members/<id>/unblock
Blocking works as in the console: open sessions end and the workspace stops (Blocking a person).
A button in your portal
With company sign-in on, a portal button does not need the API at all: link it to the company's SSO sign-in address (https://eggent.company.tld/sso/<company>/login). The person signs in with the company account and their workspace is created on the first sign-in.
Use the API when the portal should create the person ahead of time, with their teams, for example from a Backstage scaffolder action that calls POST /api/org/<company>/members and hands the person a sign-in link.
Every call made with a company key is recorded in the activity log.