ByteChef LogoByteChef
Automation

API Keys

Workspace API keys that authenticate calls to MCP servers and A2A servers, bound to one workspace and one environment.

A workspace API key is bound to one workspace and one environment. It authenticates calls to MCP servers and A2A servers that require authentication. The key you present must match both the workspace and the environment of the server or API you call.

API keys are also used by the API Platform, which is not generally available yet.

Availability

Workspace API keys are available in the Community and Enterprise Editions. The page is listed under Current Workspace in the Settings sidebar.

For account-scoped keys used for administration and the management MCP server, see Admin API Keys. Both pages share the same layout, dialogs, and actions.

The page

Settings → API Keys shows the note "Do not share your API key with others or expose it in the browser or other client-side code." and, once at least one key exists, a New API Key button. A key belongs to the environment selected in the left sidebar header. With no keys yet, the page shows an empty state titled No API Keys with a New API Key button (for users who can create keys).

ColumnDescription
NameThe label you gave the key.
Secret KeyA masked preview. The full secret is shown only once, at creation.
Created DateWhen the key was created.
Last Used DateWhen the key last authenticated a request. Updated at most once a minute.
Created ByWho created it.

Each row ends with an edit (pencil) and a delete (trash) icon.

Who can manage keys

A key authenticates as the user who created it, so it is a personal credential:

  • Workspace editors and admins create keys in their workspace and see, rename and delete their own keys. They do not see other members' keys.
  • Workspace viewers cannot create keys.
  • Tenant administrators see and manage every key in the workspace.

In Community Edition every user can create, view, and delete keys.

Workspace and environment binding

A new key is bound to the workspace you are in and to the environment active in the Environment selector at the moment of creation. Switching the selector re-lists the keys for that environment; it does not move an existing key.

Create a key

  1. Confirm the Environment selector is set to the environment the key should be bound to.
  2. Click New API Key, enter a Name of at least 2 characters, and click Create API Key.
  3. The dialog switches to Save your API Key and shows the full secret exactly once. Click Copy, store the secret somewhere safe, then click Done.

The full key cannot be viewed again through ByteChef. If you lose it, delete the key and create a new one.

Rename a key

Click the edit (pencil) icon, change the Name, and click Save. Only the name changes; the secret is unaffected.

Revoke a key

Deleting a key revokes it; there is no enable/disable toggle. Click the delete (trash) icon and confirm in the Are you absolutely sure? dialog. Any client presenting the deleted key is rejected immediately; other keys are unaffected.

Creation and deletion are recorded in the audit log as WORKSPACE_API_KEY_CREATED and WORKSPACE_API_KEY_DELETED.

Authenticating a call

Send the key as a Bearer header:

Authorization: Bearer <your-api-key>

Target the key's environment with the X-ENVIRONMENT header: DEVELOPMENT, STAGING, or PRODUCTION (case-insensitive). It defaults to PRODUCTION when omitted. An unknown value, or an environment that does not match the key, is rejected with 401.

For example, this request reads the agent card of an A2A server in the Development environment with a key created there:

curl "https://your-bytechef-host.example.com/api/automation/a2a/<secretKey>/.well-known/agent-card.json" \
  -H "Authorization: Bearer <your-api-key>" \
  -H "X-ENVIRONMENT: DEVELOPMENT"

The same two headers work on an MCP server URL.

How is this guide?

Last updated on

On this page