# Tayl API docs

Tayl is a learning platform for small businesses, especially in hospitality. Its Public API lets an organisation's own systems and agents manage people and groups, assign training, author courses, report on training with summaries and the tasks, completions and certificates behind them, and receive webhook events. Each API key belongs to one organisation and reaches only its data.

- **Base URL:** `https://tayl.pro`, with every path under `/api/v1/`. Staging is `https://demo.tayl.pro`.
- **Authentication:** send `Authorization: Bearer tayl_live_…` with every request, over HTTPS.
- **Keys:** an organisation key acts for the organisation; an organisation admin creates it in Tayl under **Settings > Public API**. Once they turn personal keys on, anyone who manages people, training or content can create a personal key, which acts as them and never does more than they can in Tayl.
- **AI assistants:** Claude, ChatGPT and others connect to Tayl's MCP server at `https://tayl.pro/mcp`. Each person signs in and chooses what their assistant may do; it then calls this API as them, with tools that read these docs.
- **Format:** JSON requests and responses. Every docs page is also markdown: add `.md` to its URL, or send `Accept: text/markdown`.

## Check your key first

Before anything else, call `GET https://tayl.pro/api/v1/api-keys/current` with any active key. It says how much of each section below the key can use and what's in the way; [Start here](https://tayl.pro/api/v1/docs/start-here.md) explains its answer.

```bash
curl --header "Authorization: Bearer $TAYL_API_TOKEN" https://tayl.pro/api/v1/api-keys/current
```

## Sections

Fetch the section your task needs. Each holds its guide, every operation it covers and the schemas they use, linking to the page that holds any it leaves out, such as course blocks.

| Section | Covers | Operations | Size |
| --- | --- | --- | --- |
| [Start here](https://tayl.pro/api/v1/docs/start-here.md) | Check what an API key can do before calling anything else. | 1 | about 8 KB |
| [People and groups](https://tayl.pro/api/v1/docs/people.md) | Sync people and groups from an HR system, matched by your own IDs, and manage group categories and who belongs to which group. | 31 | about 46 KB |
| [Assigning training](https://tayl.pro/api/v1/docs/assigning.md) | Assign courses, pathways and signable documents from the content library to people and groups, and change or archive those assignments. | 16 | about 43 KB |
| [Reporting](https://tayl.pro/api/v1/docs/reporting.md) | Report on who has or hasn't completed training, by person, site or content, with summaries of the figures Tayl shows and the tasks, completions and certificates behind them. | 16 | about 57 KB |
| [Course authoring](https://tayl.pro/api/v1/docs/course-authoring.md) | Build, change and publish the organisation's own courses, for example from a presentation, whole or a chapter or page at a time. | 32 | about 96 KB |
| [Webhooks](https://tayl.pro/api/v1/docs/webhooks.md) | React to events such as completions by subscribing an HTTPS endpoint, verifying signatures, and inspecting and retrying deliveries. | 10 | about 49 KB |
| [Course document format](https://tayl.pro/api/v1/docs/course-document.md) | Write a course's content with every block type and question kind, and the course, chapter, page and outline documents that hold them. |  | about 59 KB |
| [Conventions](https://tayl.pro/api/v1/docs/conventions.md) | Requests, scopes, personal keys, errors, rate limits, retries, pagination, incremental sync, IDs, bulk requests and course write concurrency. |  | about 9 KB |
| [Errors](https://tayl.pro/api/v1/docs/errors.md) | Every error code, what it means and how to fix it. |  | about 12 KB |

## Conventions in brief

- **Errors** return `{"errors": [{"code": …, "message": …, "documentation_url": …}], "request_id": …}`. Branch on the HTTP status and `code`, not the message; each `documentation_url` explains how to fix it. Keep `request_id` for support.
- **Rate limits** are per key, per second. A `429` carries `Retry-After`: wait at least that long.
- **Lists** take `page` and `per_page` (up to 100). Follow the `Link` header's `rel="next"` URL until there isn't one.
- **Strict requests:** an unknown query parameter, or a body sent to an operation that takes none, returns `400` instead of being ignored.
- **Course writes** need the `etag` from your last read or write, sent as `If-Match`.
- **Retries:** a timeout or `5xx` on a write may still have succeeded. Read the resource back before retrying.

[Conventions](https://tayl.pro/api/v1/docs/conventions.md) covers each in full, with incremental sync, external IDs and bulk requests.

## Keeping the key safe

Keep keys out of source control, URLs, logs, email and support messages, and give each integration its own key so one can be revoked alone. Connect an AI assistant you chat with to `https://tayl.pro/mcp` rather than pasting a key into the chat. An agent should never repeat a key back, store it anywhere else, or send it anywhere but Tayl.

## Not available yet

- Having a group category make subgroups by another. Turn subgroups on and off in Tayl.
- Historical reports and trends. Build them from completions for now.
- Uploading videos, SCORM packages, PDFs or documents. Videos can be YouTube or Vimeo links.
- Course categories and tags, preview links, and settings outside the course document, such as certification and captions, for an organisation's own courses.
- Webhook events for courses.
- Authoring pathways, signable documents or resources.
- Marking a course as drafted by AI.

## Kept out of the API by design

The API automates administration and authoring for an organisation. It never acts as a learner or stands in for people talking to people, so these stay with people in Tayl:

- **Learning and its evidence:** completing a course, pathway or document for someone; recording progress, quiz or knowledge-check answers or SCORM results; signing documents; sign-offs; manual completions and training history imports.
- **People talking to people:** Chat, News comments and reactions, and reading or bookmarking as a person.
- **Moderation:** Chat reports, blocks, redactions and oversight, and News comment moderation.

When a request needs one of these, send the person to Tayl rather than looking for a workaround. Reading the evidence, through tasks, completions and certificates, is available.

## The full specification

[https://tayl.pro/api/v1/openapi.json](https://tayl.pro/api/v1/openapi.json) is the complete OpenAPI 3.1 description, about 457 KB. It's too large to read whole, so use the sections above. People exploring the API interactively can import it into a tool such as Postman.
