Docs
Developers

Authenticate and choose scopes

Send API keys, choose scopes, and understand why a key stops working.

Every request needs an API key in the Authorization header:

Authorization: Bearer enl_...

Keys start with enl_. Treat them like passwords: keep them in a secret manager, never in source code or a browser.

Choose scopes

Each key has a set of scopes, per resource and access level. A request to an endpoint whose scope the key lacks returns 403 with the code missing_scope. Writing a resource includes reading it. Give each integration only the scopes it uses.

ScopeAllows
members:readMembers, including a group’s members
members:writeUpdating, suspending, and reactivating members
invites:readPending and past invites
invites:writeInviting people and revoking invites
groups:readGroups
groups:writeCreating, renaming, and deleting groups, and changing who is in them
departments:readDepartments
materials:readPublished courses, policies, and surveys
learning_paths:readLearning paths and their steps
learning_paths:writeAssigning and unassigning learning paths
assignments:readAssignments, with their status and due dates
assignments:writeAssigning and unassigning materials
attempts:readSubmitted attempts, passed or failed
reports:readThe users and materials reports from the Reports page

GET /organisation needs no scope.

Understand who a key acts as

A key acts as the Admin or Owner who created it. Enlytning checks that person’s role on every request, and the activity log records the key against them. An Admin or Owner can reassign a key to another Admin or Owner in Settings > API Keys. Only an Owner can make a key act as an Owner.

A key can’t suspend the person it acts as. Suspending that person another way, in the app or with another key, pauses the key until someone reassigns it.

Know why a key stops working

StatusCodeMeaningFix
401invalid_api_keyThe header is missing, or the key doesn’t existCheck you sent the whole key
401api_key_revokedSomeone revoked the keyCreate a new key
401api_key_expiredThe key reached its expiry dateCreate a new key
403key_pausedThe person the key acts as left the organisation or is no longer an Admin or OwnerReassign the key in Settings > API Keys
403public_api_not_in_planThe organisation’s plan no longer includes the APIUpgrade to Professional

A paused key resumes as soon as you reassign it. You don’t need to change the key in your integration.

On this page