> ## Documentation Index
> Fetch the complete documentation index at: https://developers.learn.ink/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> How the LearnInk API is structured and authenticated

Use the LearnInk API to power WebView single sign-on and manage user lifecycle actions from your systems.

## In this API reference

The API reference pages in this section are auto-generated from our OpenAPI specification and include:

* Request/response schemas
* Required headers and parameters
* Example payloads and error responses

## Authentication

All API requests are authenticated using a **Bearer API key**.

You can generate and rotate API keys in the LearnInk admin portal:

**Settings → Developers → API Keys**

<img src="https://mintcdn.com/learnink/gBu_O2kjo97ocLn0/images/api_keys.png?fit=max&auto=format&n=gBu_O2kjo97ocLn0&q=85&s=1a51970cc723c62d210bc43a9d4c96a4" alt="LearnInk admin portal API Keys page showing the Generate key button." style={{ width: "100%", maxWidth: 900, height: "auto" }} width="1584" height="592" data-path="images/api_keys.png" />

If your organisation doesn’t have access to this feature, contact [support@learn.ink](mailto:support@learn.ink).

***

## Request conventions

Most endpoints accept and return JSON.

* **Auth header**: `Authorization: Bearer <API_KEY>`
* **Content type**: `Content-Type: application/json` (for JSON request bodies)

<Warning>
  Keep your API key server-side. Do not embed it in mobile apps or other client-side code.
</Warning>

***

## Error handling

Error responses return a JSON body with a `code` and a human-readable `message`. Use the HTTP status code to drive your retry and user-facing behaviour, and log the full response for debugging.

All endpoints are served from:

`https://my.learn.ink`
