- Home
- Connecting other systems
- Creating and revoking API keys
Creating and revoking API keys
An API key lets an external system reach your Learnient account without a person signing in. It belongs to the account rather than to you, so it keeps working when you leave.
A key cannot archive the person who created it. When that person leaves, archive them in Learnient instead: find them on the Users page, open the actions menu at the end of their row and choose Archive.
An API key is for connecting another system. To let people use an AI app such as Claude or Microsoft Copilot with Learnient, use AI connections instead, which work as the person using the app rather than as the account: see Setting up AI connections.
Adding people through the API with an email address or a mobile number
Section titled “Adding people through the API with an email address or a mobile number”Creating a person through the API needs an email, a mobile_number, or both. The email can be left out only when your organisation has connected WhatsApp and the person’s role can’t see other people’s data, the same rule as adding someone by hand. A create with neither, or without an email where one is needed, is refused with a 422 that says why. Updating someone without sending email keeps the email address they have. See When someone can go without an email address.
What a key can do is described in the Learnient Public API documentation: every endpoint, the fields it returns, how to send the key with each request, and the errors to expect. Webhooks, for being told when something changes, have their own webhook reference.
Sending CSV files from your HR system with an API key
Section titled “Sending CSV files from your HR system with an API key”An API key can also send your HR system’s CSV export to a CSV HR connection through the API. Your system sends each file to POST /v1/integrations/{connection}/files, with the connection’s HR connection ID (on its Files tab) in place of {connection}. The key needs the integrations:write scope, which every key created on this page has. A file can be up to 20 MB, as .csv or .txt, and a file identical to one already sent is refused. The details are in the Integration section of the Public API documentation.
Where it is
Section titled “Where it is”Choose Admin, then Integrations in the left-hand menu and API keys.
Creating one
Section titled “Creating one”- Choose New API key.
- Give it a name. Name it after the system that will use it, not after yourself — the name is how you will know which key to revoke in two years.
- Create it, and copy the key immediately.
The key is shown once
Section titled “The key is shown once”The full key is returned when you create it and is never stored. Learnient keeps a hashed version to check against, so nothing can show you the key again — not the screen, not support, not the database.
The list shows a masked fragment, enough to tell two keys apart and not enough to use.
So paste it into wherever it is going before you close the dialog. If you lose it, the only path forward is revoking the key and creating another, which means updating whatever was using it.
What the list tells you
Section titled “What the list tells you”Name, the masked key, Status, Last used and Created.
Last used is the column worth reading. A key with no last-used date is one nothing has ever authenticated with — usually a setup that was never finished. A key last used months ago is a candidate for revoking, and checking that before an audit asks you is the cheaper order.
Revoking
Section titled “Revoking”Revoking stops the key working. It moves to the Revoked tab, where it stays as a record of what existed rather than disappearing.
Revoke immediately if a key has been committed to a repository, pasted into a ticket, or shared with somebody who has left. There is no way to rotate a key in place — you create the new one, move the integration across, then revoke the old one, in that order so nothing is down in between.
Keys can also expire
Section titled “Keys can also expire”A key can carry an expiry date, after which it stops working without anybody revoking it.
Use it for anything temporary — a migration, a contractor’s script, a trial integration. A key with an end date is one you cannot forget to clean up.
If you are pointing a tool at the API
Section titled “If you are pointing a tool at the API”The screen suggests pointing an AI coding tool at llms.txt rather than at the documentation. That file describes the API in a form a model reads more reliably than prose, and it is the faster route to a working integration.

