Hawkings uses API keys for all authentication. There are two flavours and they look almost identical — pick the one that fits your case.Documentation Index
Fetch the complete documentation index at: https://docs.hawkings.education/llms.txt
Use this file to discover all available pages before exploring further.
Key shapes
| Shape | Looks like | Carries |
|---|---|---|
| Short | hk-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | A user identity |
| Long | hk-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX-{platform} | User + platform |
X are hex characters; {platform} is the 24-char workspace identifier.
Pass the key to the SDK
The SDK readsHAWKINGS_API_KEY and HAWKINGS_PLATFORM from the
environment by default. You can also pass them in code:
Scopes
Every key has one or more scopes. The default key issued in the dashboard carriesread:* and write:* for everything in its workspace.
For machine-to-machine integrations create scoped keys:
| Scope | What it allows |
|---|---|
read:courses | List, retrieve, expand Course, Cohort, Unit, Lesson. |
write:courses | Above + create / update / delete authoring resources. |
read:students | List students and their progress. |
write:submissions | Create submissions (use this for student-facing apps). |
ai:generate | Run *.generate*() calls. |
ai:grade | Run submissions.gradeWithAi(). |
End-user authentication
If you’re building a student-facing product, you don’t want to ship your platform-wide key to a browser. Use the token flow:read:lessons, write:submissions, ai:tutor. It expires in 24 hours.
Multiple workspaces
A user with access to several workspaces can list them and switch:Rotating a key
Rotating is non-disruptive:- Issue a new key in the dashboard.
- Deploy it.
- Revoke the old one.
authentication_error
on the next request.