Docs
Project Key

Project Key

Every MaskAPI project comes with a unique Project Key. This key is required when calling any API endpoint you create on the platform. It allows MaskAPI to correctly identify, route, and isolate requests to the right project environment.


🔑 What is the Project Key?

The Project Key is a secure, auto-generated token that uniquely identifies your MaskAPI project. When you send an API request to any endpoint hosted by MaskAPI, you must include this key in the request headers. It helps us:

  • 🔁 Route the request to the correct project

  • 🔒 Enforce isolation between projects

  • ⚙️ Apply project-specific rules such as timeouts and authentication


🚀 Example Usage

Let’s say you created a GET /users endpoint. Here’s how you would call it using curl:

curl https://mask.maskapi.dev/api/v1/users \
  -H "Content-Type: application/json" \
  -H "x-mapi-key: [your-project-key]"

Note: Replace [your-project-key] with the actual key from your MaskAPI project settings.


🛠️ How to Find Your Project Key

  1. Select your project

  2. Go to the "Settings" tab

  3. Under "Project Key" section, you’ll find your Project Key

  4. Click "Copy" to copy the key securely

Warning: Your Project Key is secret. Do not expose it in public repositories or client-side code (like in frontend JavaScript). Use environment variables or server-side storage to protect it.