> ## Documentation Index
> Fetch the complete documentation index at: https://www.help.creatora.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Make your first GraphQL request

> Authenticate, identify your Platform, create a private Course, and read it back.

Creatora's GraphQL endpoint is `https://api.creatora.io/graphql`. The [Playground](https://api.creatora.io/playground) is available for exploring the API, and the [SDL](https://api.creatora.io/sdl) contains the current GraphQL schema. These examples use direct HTTP requests.

## Get your JWT

Sign in as an Administrator and open **Admin Panel → Platform → API → Developer**. Copy the JWT shown there and keep it private. Send it with the `Bearer` scheme. Administrator requests also need the access-mode header:

```http theme={null}
Authorization: Bearer <JWT>
X-CREATORA-ACCESS-MODE: administrator
Content-Type: application/json
```

Without `X-CREATORA-ACCESS-MODE: administrator`, requests use Student mode even when the JWT belongs to an Administrator.

## 1. Identify your account and Platform

Replace `<JWT>` with your JWT:

```bash theme={null}
curl 'https://api.creatora.io/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <JWT>' \
  -H 'X-CREATORA-ACCESS-MODE: administrator' \
  --data '{"query":"query IdentifyCaller { me { id } platform { id host } }","variables":{}}'
```

The response's `me.id` identifies the authenticated account; `platform.id` identifies its Platform. Check for `errors` as well as `data` before using the result.

## 2. Create a private Course

This request creates a real Course on your Platform. Use a test Platform or a Course you intend to keep. Set the base Offer price in your Platform's currency; `0.0` makes the base Offer free.

```bash theme={null}
curl 'https://api.creatora.io/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <JWT>' \
  -H 'X-CREATORA-ACCESS-MODE: administrator' \
  --data '{"query":"mutation CreateCourse($name: String!, $price: Double!) { createCourse(name: $name, defaultOfferPrice: $price) { id name status } }","variables":{"name":"My first API course","price":0.0}}'
```

Keep the returned `createCourse.id`. The mutation creates a **Private Course** and its automatic base Offer. It does **not** publish the Course.

The [`createCourse` mutation reference](/en/api/reference/mutations/createCourse) lists the supported arguments and return fields.

## 3. Read the Course back

Replace `<COURSE_ID>` with the `id` returned by `createCourse`:

```bash theme={null}
curl 'https://api.creatora.io/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <JWT>' \
  -H 'X-CREATORA-ACCESS-MODE: administrator' \
  --data '{"query":"query GetCourse($courseId: UUID!) { courseById(courseId: $courseId) { id name status } }","variables":{"courseId":"<COURSE_ID>"}}'
```

Check that the returned ID and name match the Course you created and that its status is `private`.

If `createCourse` times out or returns an ambiguous result, check the Courses list in the Admin Panel before calling it again. A second call can create a duplicate. Course names are not unique, so if you cannot tell whether the first Course was created, investigate before retrying.

For the relationship among Courses, Students, Offers and Orders, continue with [Core concepts](/en/api/core-concepts). For headers, errors and pagination, see [API conventions](/en/api/api-conventions).
