The Marvia API uses secure API keys to authenticate and authorize access to its services. API keys allow you to interact with Marvia's API and are required for all API requests.Every request to the Marvia API must include an API key in the Authorization header.Requirements#
To generate and use API keys, you must:Have an active Marvia account
Have access to the Marvia Admin Dashboard
If you do not have an account or are a new customer, please reach out to our support team at support@getmarvia.com. They will guide you through the setup process and help you get started.Generating an API Key#
API keys can be generated for either the staging or production environment, and can be scoped to specific permissions. Follow the steps below to create a new key.
Step 1: Log In#
Go to the Marvia Admin Dashboard:Use your admin credentials to log in.
Step 2: Navigate to Marvia API Settings#
Navigate to the sidebar and click Settings
Go to Connections → Marvia API
Navigate to Marvia API Settings
Step 3: Start a New API Key#
Click on the New API key button
Generate a New API Key Page
In the New API key panel, provide the following details:Name: A descriptive name for your key (e.g., "Staging Client App", "Production Integration")
Environment: Select the environment the key should be issued for: Staging or Production
Permissions: Select the specific permissions (roles) the key should have, such as Read Locations, Update Users, Delete Groups, Read Users, Update Groups, etc. Only select the permissions your integration actually needs.
Configure name, environment, and permissions
Selecting an environment (Staging or Production)
Note: Choose permissions carefully and follow the principle of least privilege, only grant the access your integration needs. Permissions can include read, update, and delete actions across resources such as Locations, Users, and Groups.
Once you've configured the name, environment, and permissions, click New API key to generate the key.
Step 5: Copy and Secure the Key#
Important: The API key will only be shown once. For security reasons, you won't be able to view it again.
Store it securely (e.g., in an environment variable, secrets manager, or encrypted config file)
Do not share or expose your key publicly
If you lose the key, you'll need to generate a new one by repeating the above steps.
Step 6: Lost or Regenerating a Key#
If the API key is lost, no worries, simply return to the Marvia Admin dashboard and generate a new one following the same steps above.You can also delete / revoke the lost key as shown below.
Making Authenticated API Requests#
Include your API key in the Authorization header
Be sent to the base URL matching the environment your key was generated for (staging or production)
Example Request#
Note: Use the staging host (e.g., api-v2.staging.getmarvia.com) for keys generated with the Staging environment, and the corresponding production host for keys generated with the Production environment.