Troubleshooting

Mock API Studio Troubleshooting

Resolve common authentication, synchronization, schema, port, query, and relationship problems in Mock API Studio. Start with the exact CLI or validation message, then use the focused checks below.

The API token is invalid or expired

Run the logout command, create or retrieve a valid account token in the dashboard, and start the interactive CLI again. Confirm that MOCK_API_TOKEN or --token is not overriding the saved value.

Shell
npx mock-api-studio-cli logout
npx mock-api-studio-cli whoami
npx mock-api-studio-cli

The local port is already in use

Stop the process using the configured port, change the project default, or pass a one-time override to start.

Shell
npx mock-api-studio-cli start customer-portal --port 4500

The project has no routes

Confirm the project contains a resource with a valid path, an exported response binding, and at least one enabled operation. Resolve all model-workspace diagnostics, save the resource, then restart the CLI.

A query returns HTTP 400

Check the project query parameter names and the endpoint sortable-field allowlist. Invalid sort fields return 400 by design; requested page sizes are constrained by the endpoint maximum.

Nested requests or deletes fail

A nested route returns 404 when the parent does not exist. Parent deletion returns 409 while child rows still reference it. Delete the children first or use an existing parent key.

Dashboard changes are missing locally

Stop and restart the CLI to synchronize saved changes. There is no live watch mode. If a model or configuration change alters the compatibility hash, accept regeneration after preserving local records you need.

Related questions

Where should I ask for account or billing help?

Use the public Contact page and choose the relevant support category. Do not include API tokens or passwords in the request.

Keep exploring

Last updated September 17, 2026. Product behavior described here is verified against the current Mock API Studio runtime.