Skip to main content
The Moflay API uses API keys to authenticate public API requests. Send the key as a Bearer token in the Authorization header.

API key prefixes

The API key determines the business, environment, and permissions for the request. Do not pass business or environment IDs in public API requests.

Create and store keys

Create keys in the API Keys dashboard. Copy the raw key when it is created and store it in your secret manager or deployment environment variables.
Treat API keys like passwords. Do not commit them to source code, expose them in frontend apps, or share them in support tickets.

Permissions

Each key has a permission set. Current public API permissions include:

Authentication errors

Missing API key

If you do not include the Authorization header, the API returns 401 Unauthorized.

Invalid API key

If the key is incorrect, malformed, or not found, the API returns 403 Forbidden.

Insufficient permissions

If the key does not have the permission required by an endpoint, the API returns 422 Unprocessable Entity.