AI Agents
AI coding assistants — Claude Code, Cursor, GitHub Copilot, ChatGPT and others — can build a Mockomat mock GraphQL API for you. The assistant uses Mockomat's public GraphQL API, binds your tables to datasets of Mockomat's data pool, and hands you a link that opens the project on the modelling board.
How It Works
You ask your AI for a mock API. The AI creates a guest project, builds the schema, binds tables and attributes to datasets of the data pool, generates the default operations, checks that data comes back, and gives you the project's collaboration link. You open it, and the modelling board shows the project, ready to edit.
No signup and no API key are needed for this.
Example Session
Here is what a typical conversation looks like — from first prompt to queryable data:
> You
I need a mock GraphQL API for an online shop's product catalog —
something I can query in my frontend.
> AI Assistant
I'll create that using Mockomat. Let me check the available datasets...
✓ Found a product dataset in the data pool
✓ Guest project created
✓ Table "Product" — bound to the dataset, attributes mapped to its columns
✓ Default operations generated
✓ Querying first results...
Your mock API is live. The first page of products:
{
"data": {
"products": {
"items": [
{ "name": "…", "category": "…", "price": … },
…
],
"total": …,
"page": 1,
"pageSize": 25
}
}
}
Open the project on the modelling board (collaboration link):
→ https://app.mockomat.com/s/<slug>/collaborate?token=…
Query your API (share token of the project):
→ POST https://api.mockomat.com/mock/<slug>/graphql?token=<share-token>
The project is a guest project and is deleted about 24 hours from now.What the AI Does
The AI calls Mockomat's public GraphQL API at https://api.mockomat.com/public-graphql with plain HTTP requests. A guest session cookie identifies its project; no API key is required.
| Step | What happens |
|---|---|
| 1. Create project | createSessionProject — returns the project with its slug, its preview token and its collaboration token |
| 2. Discover data | availableDataSources / dataSource — the datasets of the pool: import code, column paths, record count, licence and sample documents |
| 3. Create tables | createModellingTable — source.importCode binds the table to a dataset |
| 4. Create attributes | createModellingAttribute — a Data Source (SOURCE) attribute reads the column named in sourceMapping.path, or the column with its own name |
| 5. Add relations | createModellingRelation — optional, e.g. Product → Category |
| 6. Generate operations | generateDefaultGqlOperations — list, detail, create, update and delete per table; the mock API answers the list and detail operations |
| 7. Verify data | runtimeList — queries the mock runtime to confirm that rows come back |
| 8. Hand you the links | the collaboration link /s/<slug>/collaborate?token=… opens the project on the modelling board, ready to edit; the preview link /s/<slug>/preview?token=… shows it read-only |
Guest Projects
AI-created projects are guest projects — temporary, no account required.
- Lifetime: 24 hours, counted from the start of the guest session — in the flow above, the moment the AI creates the project. A cleanup that runs every hour then deletes the project, so it can stay up to an hour longer.
- Limits: the Guest limits — 1 project, 20 tables, 30 attributes per table, 100 mock API requests per day (see Account and Plans).
- Access: the collaboration link opens the project on the board for editing. Keep it private: anyone with the link can join the project.
Signing up does not move an AI-created project into your account: the app moves only the guest project of your own browser. Plan for the project to be deleted when its guest session ends.
Taking Control
The AI gets you started. On the board, you can:
- Refine the model — adjust table positions, rename attributes, change scalar types
- Add relations — connect tables (e.g., Product → Category) visually
- Configure operations — parameters, default sorting and page size of the GraphQL operations
- Adjust data mappings — bind tables and attributes to columns of the imported data (Data Source)
- Import OpenAPI specs — bring in existing API definitions as tables and attributes
The modelling board is the same tool registered users work with. Everything the AI created is editable.
Available Data Sources
Mockomat's data pool provides the data for mock APIs. The AI discovers its datasets with the availableDataSources query.
The pool holds imported datasets: open data where a vetted source exists, generated sample data for the blueprints. For each one, the query returns its column paths, record count, licence and a few sample documents, so the AI can make informed mapping decisions.
Tell Your AI
If your AI doesn't know about Mockomat yet, you can point it in the right direction:
"Use Mockomat's public GraphQL API at https://api.mockomat.com/public-graphql to create a mock GraphQL API for my project. Create a guest project, build the schema, bind it to datasets of the data pool, and give me the collaboration link."
The AI discovers the available queries and mutations through GraphQL introspection and follows the flow above.


The modelling board after opening an AI-generated collaboration link.


A complete AI chat session building a mock API.