Skip to main content

How to Use the Eduqat API with an AI Agent like Claude Code or Codex

Give your AI agent the API key and one sentence telling it to connect to the Eduqat API. It reads the documentation and starts working. No terminal commands are needed to begin, and after that you just ask in plain language.

Quick answer: Open your AI agent, give it your Eduqat API key, and tell it in one sentence to connect to the Eduqat API. It reads the documentation itself and starts working. After that you ask for what you want in plain language.

What this lets you do

The Eduqat API exposes your school to anything that can send an HTTP request. Pairing it with an AI agent means you never write those requests yourself.

Once connected, you can ask things like how many self-paced courses do I have, and which are still draft, or say create a self-paced course called Intro to Design Thinking with three sessions. The agent works out which calls to make, shows them to you, and runs them once you approve.

Typical uses are building courses, sessions, and materials, enrolling learners and checking certificates, and pulling lists out of your school for a report.

This is different from the AI School Assistant. The assistant lives inside your Eduqat Dashboard and needs nothing set up at all. The API is for work outside the dashboard, and for anything you want to script, export, or repeat.

Before you begin

  • An Eduqat API key. There is no self-serve key in the dashboard, so ask your Eduqat account manager for one.

  • An AI agent that can read a web page and run commands, for example Claude Code, Cursor, or Codex.

That is the whole list. You do not need to know how to code, and you do not need to touch a terminal to get started.

Step 1: Get your API key from your account manager

Ask your Eduqat account manager for an API key for your school. Keys are issued per school, and there is no way to generate one yourself from the dashboard.

Two things to know before it arrives:

The key identifies your school on its own. You never send a school id, a user id, or a role alongside it. The server works all of that out from the key.

The key is single tier. There is no separate read only key and no separate write key, so one key grants every operation the API exposes. Treat it like a password.

Step 2: Give your agent the key and one sentence

Open your agent and hand it the key. You can attach the key as a file or paste it into the message, whichever your agent supports.

Then send this.

Connect to the Eduqat API at https://developers.eduqat.com/AGENTS.md using the API key I gave you. Show me each call before you run it.

That is the whole setup. The agent reads Eduqat's guide for AI agents, finds the machine readable specification linked from it, makes a test call to confirm the key works, and tells you what it found.

Pointing the agent at https://developers.eduqat.com/docs works too. It will find its way to the same guide from there.

Step 3: Ask for what you want

Once the agent reports a successful connection, stop thinking about endpoints and just describe the job.

How many self-paced courses do I have, and which ones are still draft?
Create a self-paced course called "Intro to Design Thinking" with 3 sessions. Each session has one video material. Use placeholder URLs for the videos.

Reading and writing both work this way. The agent decides which calls to make, asks permission before each one, and tells you what it did.

From there you can keep going in the same conversation. Asking it to turn an answer into a spreadsheet, or to clean up duplicates it found, is a normal next request.

Step 4: Check the agent actually read the guide

This is the step most people skip, and it is where wrong answers come from.

Watch the agent's tool calls. Before any API call, you should see it fetch the guide, something like this.

WebFetch(domain=developers.eduqat.com, url=/AGENTS.md)

If no fetch happens and the agent goes straight to building requests, it is guessing from its training data rather than reading the current specification. Stop it and say so.

Fetch https://developers.eduqat.com/AGENTS.md before doing anything else.

If you will use this often

Everything above is enough for a one-off job. Two extra steps make repeat work safer and faster. Neither is required.

Keep the key out of your chat history. Pasting the key into a message means it stays in that conversation. Storing it as an environment variable instead lets the agent use it without the value ever appearing in the chat.

On macOS, add this to ~/.zshrc. On Linux, add it to ~/.bashrc.

export EDUQAT_API_KEY="YOUR_API_KEY"

Then reload the shell and confirm it is set.

source ~/.zshrc echo $EDUQAT_API_KEY

On Windows, set it once from Command Prompt or PowerShell, then open a new terminal so the change takes effect.

setx EDUQAT_API_KEY "YOUR_API_KEY"

Now tell the agent to use $EDUQAT_API_KEY instead of giving it the key directly.

Make every new session start ready. Create a folder for Eduqat work and put a project instruction file in it. Every future session you open in that folder is configured before you type anything.

In Claude Code the file is CLAUDE.md. Ask your agent to create it with these contents.

# Eduqat integration  When I ask you to do anything with Eduqat: 1. Fetch https://developers.eduqat.com/AGENTS.md if you have not already this session. 2. Fetch https://developers.eduqat.com/openapi.json for endpoint schemas. 3. Use the env var $EDUQAT_API_KEY for auth, sent as the x-api-key header. 4. Base URL is https://public-api.eduqat.com unless I say otherwise. 5. Always show me each command before running it.

Codex, Cursor, and other agents each have their own context or instructions file, so check your agent's documentation for where it lives. The contents are the same three facts every time: the URL https://developers.eduqat.com/AGENTS.md, the variable name EDUQAT_API_KEY, and the header name x-api-key.

Check a key yourself. If you want to confirm a key before handing it to anything, run this in a terminal and replace YOUR_API_KEY.

curl -sS "https://public-api.eduqat.com/manage/v1/courses?limit=1" -H "x-api-key: YOUR_API_KEY"

JSON with an items array means the key works. 401 means the key is wrong, and 403 means it is valid but lacks permission for that route.

Keep the key safe

The key grants every operation on your school, so the usual rules apply with no exceptions.

Never commit it. If your agent writes the key into a .env file, keep that file out of git.

Never paste it into a shared chat, a ticket, or a document other people can read. A private session with your own agent is fine, but anything other people can open is not.

If you think it leaked, tell your account manager straight away and ask for a new one.

Troubleshooting

Problem

Likely cause

Fix

401 Unauthorized

The key is missing or wrong

Check that the agent received the whole key, with no line break or trailing space. If you used an environment variable, open a new terminal so it is picked up

403 Forbidden

The key is valid but lacks permission for that route

Ask your account manager to check the key's scope

403 even though the same call works elsewhere

Some HTTP clients send a default user agent that gets blocked

Tell your agent to set an explicit User-Agent header on its requests

404 on an id you just created

The resource belongs to a different school

A cross school id returns 404 rather than 403. Check that the key belongs to the school you meant

The agent invents field names

It did not read the specification

Say: "Fetch openapi.json and check the request body for that endpoint"

The agent uses Bearer auth

It fell back to the most common pattern

Say: "Auth is the x-api-key header, not bearer"

400 with a message about a column that does not exist

A pagination parameter was sent to an endpoint that does not accept one

Only the courses list accepts limit and page. Tell the agent to drop them elsewhere

400 PRICE_NOT_SET when publishing

The course has no price

Attach a price first, or leave the course as a draft while you test

400 INVALID_COURSE_STATUS

The status value was wrong

The valid values are draft, public, and deactive. There is no published

A quiz or survey has no questions

The two step flow was skipped

Quiz and survey materials need the survey entity created first, then linked. Point the agent at the quiz section of the guide

FAQs

Do I really not need to set anything up?

For a one-off job, no. Give the agent the key and one sentence and it handles the rest. The environment variable and the project file are there for people who will come back to this regularly.

Where do I get an API key?

From your Eduqat account manager. There is no self-serve key in the dashboard, so ask your account manager to issue one for your school.

Do I need to know how to code?

No. You describe what you want in plain language and the agent writes the requests. The only reason to open a terminal is the optional hardening described above.

Is it safe to paste my key into the chat?

In your own private session, yes, with one caveat: the key stays in that conversation's history. If other people can see that history, or you will reuse the key often, store it as an environment variable instead.

Is there a read only key I can use for reports?

No. The key is single tier and grants every operation the API exposes, so there is no safe read only variant. If you only want to read, say so in your first message and review each call before approving it.

Which agents work with this?

Any agent that can read a web page and run commands. Eduqat's own setup guide covers Claude Code, Cursor, and Codex, and the same approach works elsewhere.

Is there a test environment?

Eduqat publishes a sandbox address alongside the production one, but the guide tells you to confirm before relying on it. Check with your account manager rather than assuming it is live for your school.

Why does the agent sometimes get field names wrong?

Because it guessed instead of reading the specification. The machine readable specification at openapi.json is the source of truth for request bodies. Tell the agent to check it for the endpoint it is calling.

Can the agent publish a course for me?

It can, but publishing has its own rules. A course needs a price before it can go public, and the status value is public rather than published. Leaving a course as a draft while you test avoids both.

How do I know the agent is not making things up?

Watch for the fetch of the guide before any API call, and read each command before you approve it. An agent that starts writing requests without fetching anything is working from memory.

Related articles

Still need help?

For anything about the key itself, including a 403 that will not go away, go to your account manager. For a documented path that returns 404, or anything that looks like a bug, reach out through the live chat button in the bottom right corner of your screen and we will look into it with you. The full developer documentation lives at https://developers.eduqat.com/docs.

Did this answer your question?