# Getting started with the Continuum Learn API

> Create a key in Settings > Website & API > API keys, send it as a Bearer token to https://your-team.continuumlearn.com/api/v2, and start with GET /me. Every response is JSON, every date is UTC and every error has the same shape.

The Continuum Learn API is a REST API over HTTPS. It lets your own systems (a membership database, an intranet, a website or a reporting tool) read your course catalogue, create and update users, manage groups, enrol learners and read their progress.

The API is included on every Continuum Learn plan. There is no separate developer account: you use a key from your own team.

## What you need

- A Continuum Learn team, and an administrator account in it. Only administrators can create API keys.
- A terminal with `curl`, or any HTTP client.

## 1. Create an API key

1. In Continuum Learn, go to **Settings > Website & API**.
2. In the **API keys** card, click **Create API key**.
3. Give the key a name that says what uses it, such as "Intranet sync".
4. Tick the scopes it needs. For this guide, tick `catalogue:read`.
5. Click **Create key**, then copy the key. It starts with `ck_live_` and is shown only once.

Keep the key on your server, in an environment variable or a secrets store. Never put it in browser JavaScript or a mobile app: anyone who has it can act for your team within its scopes. The admin side is described step by step in the help guide [Create and manage API keys](https://continuumlearn.com/help/api-keys).

## 2. Find your base URL

Every request goes to your team's own address, followed by `/api/v2`:

```
https://your-team.continuumlearn.com/api/v2
```

Replace `your-team` with your team's address, the one you sign in at. The team is always taken from the key, never from the address, so a key for one team can never read another team's data.

## 3. Make your first call

`GET /me` returns the team and the key making the request. It needs no scope, so it is a good way to check a key works.

```bash
export CONTINUUM_API_KEY="ck_live_..."

curl https://your-team.continuumlearn.com/api/v2/me \
  -H "Authorization: Bearer $CONTINUUM_API_KEY"
```

```php
<?php
// composer require guzzlehttp/guzzle
$client = new GuzzleHttp\Client([
    'base_uri' => 'https://your-team.continuumlearn.com/api/v2/',
    'headers' => ['Authorization' => 'Bearer '.getenv('CONTINUUM_API_KEY'), 'Accept' => 'application/json'],
]);

$me = json_decode($client->get('me')->getBody(), true);
echo $me['data']['team']['name'];
```

```js
// Node.js 18 or later (built-in fetch)
const res = await fetch('https://your-team.continuumlearn.com/api/v2/me', {
  headers: { Authorization: `Bearer ${process.env.CONTINUUM_API_KEY}` },
});
const me = await res.json();
console.log(me.data.team.name);
```

The response:

```json
{
  "data": {
    "team": {
      "id": 58,
      "name": "Acme Training",
      "url": "https://acme.continuumlearn.com/"
    },
    "key": {
      "name": "Intranet sync",
      "prefix": "ck_live_lVbd",
      "scopes": ["catalogue:read"],
      "created_at": "2026-11-09T14:05:51+00:00",
      "expires_at": null
    }
  }
}
```

If you get a `401` instead, check the key was copied in full and has not been revoked or reached its expiry date. See [Errors](https://continuumlearn.com/developers/errors).

## 4. List your courses

```bash
curl "https://your-team.continuumlearn.com/api/v2/courses?limit=2" \
  -H "Authorization: Bearer $CONTINUUM_API_KEY"
```

Lists come back as `data` plus a `meta` block. When `meta.has_more` is `true`, pass `meta.next_cursor` back as `?cursor=` to get the next page. See [Pagination](https://continuumlearn.com/developers/pagination).

```json
{
  "data": [
    {
      "id": 412,
      "type": "course",
      "title": "Food Safety Level 2",
      "summary": "Everything food handlers need to know.",
      "visibility": "public",
      "price": { "amount": 4500, "currency": "GBP", "display": "£45.00" },
      "url": "https://acme.continuumlearn.com/learn/course/food-safety-level-2/preview"
    }
  ],
  "meta": { "next_cursor": "eyJjb3Vyc2VzLmlkIjo0MTIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0", "has_more": true }
}
```

(The course above is shortened. [Catalogue](https://continuumlearn.com/developers/catalogue) lists every field.)

## Conventions at a glance

| Convention | What to expect |
|---|---|
| Format | JSON in and out. Send `Content-Type: application/json` with a body. |
| Dates | ISO 8601 in UTC, for example `2026-11-09T14:05:51+00:00`. |
| Ids | Integers. External ids from your own systems are strings. |
| Single objects | `{"data": {...}}` |
| Lists | `{"data": [...], "meta": {"next_cursor": "...", "has_more": true}}` |
| Errors | `{"error": {"type", "code", "message", "details"}, "request_id"}`. See [Errors](https://continuumlearn.com/developers/errors). |
| Limits | 300 requests a minute per key. See [Rate limits](https://continuumlearn.com/developers/rate-limits). |
| Retries | Send an `Idempotency-Key` header on POST requests. See [Idempotency](https://continuumlearn.com/developers/idempotency). |
| Request ids | Every response has an `X-Request-Id` header. Quote it when you contact us. |

## Next steps

- [Authentication and scopes](https://continuumlearn.com/developers/authentication): which scope each endpoint needs.
- [Users](https://continuumlearn.com/developers/users) and [Enrolments](https://continuumlearn.com/developers/enrolments): the usual starting point for a membership-system sync.
- [API reference](https://continuumlearn.com/developers/reference): every endpoint, generated from the code. You can download the [OpenAPI spec](https://continuumlearn.com/developers/openapi.json) and import it into Postman.

## Frequently asked questions

### Does the API cost extra?

No. API access is included on every Continuum Learn plan, with the same published rate limits.

### Is there a test or sandbox environment?

Not a separate one yet. Create a key with read-only scopes while you build, and test writes against a test course and a test user in your own team.

### Can I call the API from a web page?

No. The API is for server-to-server use and does not send CORS headers, and a key in a web page would be visible to every visitor. To show courses on a website without a server, use the [website embeds](https://continuumlearn.com/developers/embeds).

### What happened to the old API?

API v1 (the `X-API-Key` team key used by the WordPress plugin) keeps working unchanged, but gets no new features. New integrations should use v2. See [Versioning and deprecation](https://continuumlearn.com/developers/versioning).
