Skip to content

API — Getting Started

The Mengi Cloud API lets you manage clusters, deployments, databases and more programmatically. Every request is authenticated with an API key.

The base URL is:

https://api.mengi.cloud

For the full list of endpoints, see the API Reference.

1. Create an API key

  1. Open the Mengi Cloud dashboard and go to Settings → API keys.
  2. Create a new API key. It is shown once — copy it now. Keys start with mc_.

2. Set it as an environment variable

Keep the key out of your shell history and source files:

Terminal window
export MENGI_API_KEY="mc_your_api_key_here"

3. Authenticate

Send the key as a Bearer token in the Authorization header on every request:

Authorization: Bearer mc_your_api_key_here

4. Make your first request

List your deployments:

Terminal window
curl -X GET https://api.mengi.cloud/deployments \
-H "Authorization: Bearer $MENGI_API_KEY"

A 200 OK with a JSON body means your key works. A 401 means the key is missing or invalid.

Security

  • Never share your API key or commit it to version control. Use environment variables or a secret manager.
  • Treat a key like a password: it carries your account’s permissions.
  • Rotate keys periodically, and delete any key you no longer use from Settings → API keys.

Lists are paginated. Pass skip and limit query parameters to page through results.