API key management
Create and manage your organization's API keys: workspace, expiration, permissions, MCP server access.
This page explains what Dastra API keys are used for and how to create and manage them. Only organization owners have access to them.
Uses of API keys
Create a Dastra API client to retrieve or modify data outside the application. This client can be server-to-server (Client credential) or JavaScript (Authorization code). To find out more, please read the Dastra API authentication documentation.
Configure a data subject request widget (public key only). Read the documentation about DSR forms.
Configure a cookie widget (public key only). Read the documentation related to cookies.
Connect an AI tool to the Dastra MCP server. Read the MCP server documentation.
Where to manage API keys
Click the gear icon in the top bar (Organization settings), then Api keys & MCP in the left menu. The direct address is https://app.dastra.eu/general-settings/api.
The page has three tabs:
API keys: the list of keys. For each key it shows the name, the last use (Never if the key has not been used) and the workspace. The Expired badge marks a key whose expiration date has passed, and the
MCPbadge a key allowed to access the MCP server.MCP Server: connect an AI tool to the Dastra MCP server. See The MCP server.
tenantId & workspaceId: the identifier of the organization (TENANT ID) and of each workspace (WORKSPACE ID), with a button to copy them. API calls that ask for these identifiers use them.
Create an API key
In the API keys tab, click Create a new Api key.
Enter the Name of the key.
To restrict the key to one workspace, choose it in Select a specific workspace. If you choose none, the key applies to All workspaces.
Choose the Expiration: Unlimited, 30 days, 180 days, 365 days or Custom date.
For Give this api key full permissions?, answer Yes for a key without restrictions, or No to tick only the permissions the key can use.
Click Create.

The API key details panel opens. It shows:
the public key (
client_id) and the private key (client_secretor API key), which is masked and can be copied from the panel;the Regenerate private key button, which generates a new private key without deleting the API key;
the workspace, the MCP server access, the last use and the expiration of the key;
the Permissions of the key, which you can adjust with the edit button;
the allowed CORS origins and the allowed redirect URIs, to fill in if you use the API in JavaScript with OAuth2 (Authorization code).

Use a key with the MCP server
If your plan includes the MCP server (Dastra AI Pro), the creation window offers the Allow this key to access the MCP server (requires a specific workspace) option. Turn it on and choose a workspace: the MCP server refuses a key without this option or without a workspace. Allowed keys carry an MCP badge in the list. See The MCP server.
Replace or delete a key
Last updated
Was this helpful?