Skip to main content
HoneyHive has three families of API key. This page explains what each family is for, how to create, scope, and revoke fine-grained keys, and how to create and revoke ingestion keys. The families differ in how their permissions work:
  • Classic API keys carry a fixed set of permissions for a single scope. What a classic key can do is determined by the kind of key it is, and cannot be changed.
  • Fine-grained API keys carry only the permissions you select when you create the key. Each key is bound to a scope and its descendants, expires on a date you choose, and cannot be edited after creation.
  • Ingestion API keys carry one fixed capability: sending traces and events to a single project. They reach nothing else, never expire, and can be revoked at any time.

Key types

The SDKs, CLI, and API call the classic API key the project API key in their identifiers, as in HH_PROJECT_API_KEY, --project-api-key, projectApiKey, and the project.project_api_key.* permissions. See API Key Permissions for the full set of permissions a classic API key carries.

Fine-grained keys

A fine-grained key is defined by three things you choose when you create it:
  • A scope it is bound to. Control plane keys can be rooted at an organization or workspace. Data plane keys can also be rooted at a project. The root determines everything the key can reach.
  • A set of permissions. You select these individually from the permissions available at that scope. Nothing is selected by default.
  • An expiration date. Required, and capped at 365 days.
None of the three can be changed afterward. To adjust a key’s permissions or move it to a different scope, revoke it and create a replacement. A key belongs to its scope, independently of the person who created it. Removing the creator from the organization does not revoke the key, so production workloads keep running through team changes. Each key records its creator, so administrators can find and revoke keys that are no longer needed. The two kinds authenticate different planes, using a bearer token in the Authorization header:
  • Control plane keys (hh_fgcp_) authenticate the Control Plane API. Set HH_CONTROL_PLANE_API_KEY for the control plane SDK or CLI.
  • Data plane keys (hh_fgdp_) read and manage project data through the project-scoped API. Set HH_DATA_PLANE_API_KEY and pass the target project_id to each project-scoped SDK call, or --project-id to the CLI. Even a project-rooted key needs the project ID in the request.
Neither kind sends telemetry. Use an ingestion key for that.

What a control plane key can call

Control plane keys authenticate the Control Plane API, which manages organizations, workspaces, projects, members, roles, templates, and alerts. Each endpoint requires the permission for its resource and action, such as workspace.project.create to create a project or org.templates.get to read an organization’s templates. The create-key dialog offers the permissions available for your scope, deployment, and organization policy. A permission applies only at its own scope level. org.templates.set does not cover a workspace’s templates, and a workspace-level permission on an organization-rooted key applies to every workspace in the organization. Most permissions do what their name says. Three groups have consequences to weigh before you put them on a key.

Email domains are read-only

org.scope.get reads an organization’s display name and email domains, and org.scope.put renames the organization. A key cannot change email domains. They decide who joins the organization automatically at sign-in, so a leaked key that could add a domain could give its holder a membership that outlasts the key. Change email domains in the organization settings of the HoneyHive app.

Template permissions reach future projects

org.templates.set and workspace.templates.set replace a templates manifest, which decides the evaluators and charts that new projects start with. That includes Python evaluators, which run your code on those projects’ events. A key with either permission therefore affects projects that do not exist yet:
  • org.templates.set reaches projects in workspaces created later, and in existing workspaces whose manifest merges with the organization’s.
  • workspace.templates.set reaches every project created later in that workspace. On an organization-rooted key, it applies to every workspace in the organization.
Existing projects are not changed.

Privileged permissions

Privileged permissions are available on Self-Hosted deployments only. The membership permissions are also unavailable on deployments that enable an SSO group scheme, where your identity provider’s groups decide access at every sign-in.
The roles and membership permissions decide who belongs to an organization and what each person can do in it:
  • org.roles.get and org.roles.set
  • org.membership.list, .add, .remove, and .set_roles, and the same four for workspace.membership and project.membership
A key that carries any of them is single-purpose:
  • It is rooted at the organization. Workspace-rooted keys are never offered these permissions, including the workspace and project membership ones.
  • It carries only privileged permissions. In the create-key dialog, selecting one disables every permission outside the privileged set, and the dialog summarizes what the key will be able to do.
Because the key is rooted at the organization, workspace.membership.* and project.membership.* apply to every workspace or project in it. A membership key cannot be limited to one workspace. HoneyHive offers these permissions only where a leaked key is easier to contain: a self-hosted control plane serves one customer, is operated by that customer, and usually sits on a private network. On other deployments, the roles and member endpoints return 404 and the permissions are not offered.
Treat a key that carries org.roles.set or a set_roles permission as an administrator credential. It is not limited to the access of the person who created it. With org.membership.set_roles, its holder can give an admin role to any member, including an account they control that is already a member, or one they invite with org.membership.add, and then sign in with that account. org.roles.set can redefine any role to grant any permission. The workspace and project set_roles permissions do the same within any workspace or project.
A key cannot leave your organization without someone who can revoke it. A request made with a key is refused with 409 when it would:
  • Save a roles manifest that leaves no signed-in, active member holding org.roles.get, org.roles.set, org.fine_grained_api_key_cp.list, and org.fine_grained_api_key_cp.delete.
  • Remove a signed-in organization member who holds those four permissions, or change that member’s organization roles to a set that no longer grants them.
These checks keep someone in the organization able to find and revoke the key. They do not limit what else the key changes. It can still promote any account, change or remove members who have not signed in yet, and remove members or change roles in a workspace or project. A key that carries both the roles and the membership permissions can remove every administrator but one. Make a refused change in the HoneyHive app, where these checks do not apply. The checks read your roles manifest. When the organization has no valid roles manifest in force, they cannot run, so a key’s request to remove a signed-in organization member or change that member’s organization roles is refused with 409. Without a valid manifest, the Control Plane API also refuses every role change at any level with 409, whether the caller is a key or a signed-in user, because the new roles cannot be checked. See Managing members programmatically for an example.

What a data plane key can call

Data plane keys authenticate the project-scoped API: the data plane endpoints whose paths begin with /v1/projects/{project_id}/, listed in the Data Plane API Reference. Each endpoint requires the permission for its resource and action, such as project.chart.list to list charts, project.experiment_run.put to update an experiment run, or project.annotation_queue.post to create an annotation queue. Listing a collection, or reading across all runs in a project, needs .list. Reading one item and its details, such as a run’s summary, metrics, or comparison, needs .get. For events, a data plane key carries only project.event.get, which covers getting and searching events. Event writes use an ingestion key. The create-key dialog offers the permissions available for your scope and organization policy. Some operations also touch a second resource and need its permission too:
  • Dataset membership. Writes that change which datapoints a dataset holds need dataset and datapoint permissions together:
    • Adding datapoints to a dataset, or creating or updating a dataset with a non-empty datapoints list, needs project.datapoint.post alongside the dataset permission. Updating a dataset with a datapoints list replaces its whole membership.
    • Deleting a dataset also deletes its datapoints, so it needs project.dataset.delete and project.datapoint.delete.
    • Creating a datapoint with a non-empty linked_datasets needs project.dataset.post. Updating linked_datasets needs project.dataset.post and project.dataset.delete, even when the list is empty.
    • Removing a datapoint from a dataset only unlinks it, so it needs only project.dataset.delete. Deleting a datapoint needs only project.datapoint.delete, and also removes it from every dataset.
  • Event reads. Creating datapoints in a batch from events reads those events, so it needs project.event.get alongside project.datapoint.post, plus project.dataset.post when the request sets dataset_id. Running a chart query reads events too, and needs project.event.get rather than a chart permission.
  • Datapoints in a dataset listing. Listing datasets with include_datapoints also needs project.datapoint.list.
The project-scoped endpoints replace the deprecated flat routes, such as /v1/runs and /v1/datasets. Updates use PATCH instead of PUT, with the same behavior: fields you omit stay unchanged. The deprecated routes still accept classic keys but reject data plane keys, and the project-scoped endpoints reject classic keys. Both answer 404, and so does a PUT sent to a project-scoped endpoint, so moving a call to the new endpoint means changing the key, the URL, and for updates the method together. An organization-rooted data plane key can also create project-rooted data plane keys with project.fine_grained_api_key_dp.post, and ingestion keys with project.ingestion_api_key.post. A key with either permission can carry only these key-creation permissions. Keys it creates cannot create more keys. See programmatic key creation for setup and examples. To list metrics with a data plane key, call GET /v1/projects/{project_id}/metrics, which needs project.metric.list. The other metrics endpoints have no project-scoped version and accept only a classic API key. Deprecated routes without a project-scoped replacement, such as the routes that create, update, and delete configurations, also accept only a classic API key until they are removed. Client methods that call only legacy routes also need a classic API key. In each client, every metrics method calls a legacy route, metrics.list included. So does the Python SDK’s deprecated events.get_by_session_id(), which takes no project_id. Use events.export() with a session_id filter and project_id instead. Keep a classic key configured for calls that need it. Adding HH_DATA_PLANE_API_KEY does not change which credential those calls send. Manage existing keys in Settings because data plane keys cannot list or revoke them.

What a fine-grained key can reach

A key reaches its root scope and every scope beneath it, and nothing outside it. For example, a key rooted at a workspace can act on that workspace and on every project inside it, but not on the parent organization or on anything in a sibling workspace. A project-rooted data plane key reaches only that project. Access always requires the corresponding permission on the key. An organization-rooted control plane key reaches the organization’s descendants across data planes. A data plane key is stored on one physical data plane and works only there, including when its root is an organization. If your organization spans multiple physical data planes, create a separate key on each one you need to access and send requests to that plane’s URL. Coverage is evaluated on every request, not fixed at creation. A project created after the key was issued is covered automatically, with no change to the key. Archived scopes drop out of coverage. The root also bounds which permissions the key can be given: the create-key dialog only offers permissions that apply at the root scope or below, so a workspace-rooted key is never offered organization-level permissions. Privileged permissions are offered only on organization-rooted control plane keys.
Because a key covers all current and future descendants of its root on its plane, prefer the narrowest root that works. A workload that accesses one project’s charts can use a project-rooted data plane key.

Creating a fine-grained key

You need the key family’s .list permission to open its tab, .post to create a key, and .delete to revoke one, at the key’s root scope: Default Org Admin, Workspace Admin, and Project Admin roles carry the management permissions at their respective scopes. Project Member carries only .get and .list for data plane keys, so members can view them but cannot create or revoke them. See Permission Reference.
Existing organizations do not automatically receive new role permissions. If the Data Plane tab is unavailable or its create/revoke controls are disabled, an organization admin must add the relevant fine_grained_api_key_dp permissions under Settings > Organization > Roles to the roles that need them (for example, ProjectAdmin and/or ProjectMember).
1

Open the API Keys settings for the scope

Go to Settings > Project, Workspace, or Organization > API Keys, depending on the root you need. Select Data Plane or Control Plane. At project scope, choose Data Plane for fine-grained keys or Classic for classic keys.On the organization’s Data Plane tab, select the physical data plane if a selector appears. The key will work only on that plane.
2

Click Create API Key

Give the key a name that identifies the workload using it, for example chart-reporting. The description is optional. Use it to explain the key’s purpose to whoever inherits it.
3

Set an expiration

Choose one of the presets or a custom date. The default is 90 days and the maximum is 365 days. Plan to create the replacement key before this date.
4

Select permissions

Check only the permissions the workload needs. You cannot add permissions later. On a control plane key, selecting a privileged permission disables every permission outside the privileged set.
5

Copy the key

Click Create Key, then copy the full key value from the dialog and store it in your secret manager. This is the only time the value is shown. HoneyHive stores only a hash of it, so it cannot be recovered or displayed again.
After creation, the key list shows each key as hh_fgcp_<key id>_****** or hh_fgdp_<key id>_******. The visible portion is the key’s id, not part of its secret, so you can match a key in the list to a key in your logs without exposing anything sensitive. Each page lists keys rooted at that scope. Manage workspace- and organization-rooted keys in their own settings, even when those keys also cover a project.

Using a data plane key

For this example, create a data plane key with project.chart.list and set its full value in HH_DATA_PLANE_API_KEY. Copy the Project ID and Data plane URL from the project’s Data Plane tab. Set PROJECT_ID to that ID. If your URL differs from the default, set HH_API_URL for Python or HH_DATA_PLANE_URL for TypeScript and the CLI.
For SDK methods and CLI commands with both a legacy and a project-scoped route, project_id (--project-id in the CLI) selects the route and credential. Chart methods support this from Python SDK 1.7.0, TypeScript API client 1.6.0, and CLI 1.8.0. Dataset, datapoint, and experiment run methods support it from Python SDK 1.8.0, TypeScript API client 1.7.0, and CLI 1.9.0. TypeScript API client 1.7.0 and CLI 1.9.0 also support it for getting and searching events. Python SDK 1.9.0 supports it for event reads, evaluate(), and the experiment result helpers. Where your client has no project-scoped method for an operation, such as annotation queues, call the endpoint over REST with a data plane key. For a method with both routes, the key it sends depends on the keys you configure and whether you pass project_id: Calling these methods without project_id is deprecated. Migrate it by configuring the data plane key and passing the project ID together. A classic key cannot authenticate the scoped route, and a data plane key cannot authenticate the legacy route. HH_DATA_PLANE_API_KEY is strict: it must contain a complete hh_fgdp_ key. A wrong key type or truncated value raises when the client initializes, even if the process does not call a method that uses it. Missing credentials are checked per call. If an authenticated request returns 404, check the data plane URL, project ID, key root, selected permissions, expiration, and revocation status. Authorization denials and missing resources use the same 404 response.

Organization data plane visibility

The organization Data Plane tabs on API Keys and API Key Policy list only the data planes the signed-in user reaches through a workspace membership or a role permission below the organization. With only organization-level grants, you can see No data plane visible, even though the API would serve your keys on that plane. Ask an organization admin to grant the appropriate workspace membership or access below the organization. An empty selector does not mean the organization has no data plane or no keys. Multiple virtual data planes hosted on one physical data plane share one organization key list and one policy.

Revoking a fine-grained key

Open the API Keys page for the scope the key is rooted on and revoke it from the key’s row. Revoking a fine-grained key takes effect immediately. The next request made with that key fails. Revoked and expired keys stay in the list, marked as revoked or expired, alongside who created them, who revoked them, and when. This history lets you audit key usage, including after someone leaves the team, so the list is not meant to be pruned. To rotate a key, create the replacement first, move your workload over to it, then revoke the old key.

Restricting what fine-grained keys can carry

Organizations can narrow the permissions anyone is allowed to put on a fine-grained key. Go to Settings > Organization > API Key Policy, choose Control Plane or Data Plane, and select the allowed permissions. Anything you leave out is unavailable when creating keys governed by that policy. The control plane policy and data plane policies are independent. On the Data Plane tab, select the physical data plane if a selector appears. That policy applies to all organization-, workspace-, and project-rooted data plane keys created on the selected plane only. This is useful when workspace or project admins can mint their own keys but your security team wants to bound their permissions. You need org.roles.get to read the policy and org.roles.set to change it. See custom roles. On Self-Hosted deployments, the Control Plane policy is also how you withhold the privileged permissions from people who can create keys. Four things to know:
  • By default no restriction is applied, and the full set of available permissions is offered.
  • The policy applies when a key is created. Narrowing it does not change or revoke keys that already exist. To withdraw a permission from an existing key, revoke that key directly.
  • A restricted policy lists what is allowed. A permission that a later HoneyHive release makes available to keys stays unavailable until you add it to the policy.
  • API keys cannot read or change a policy. Only signed-in users with the permissions above can.
The organization key list does not show workspace- or project-rooted keys. After narrowing a data plane policy, coordinate with those scope admins to find and revoke existing keys that should lose access.

Ingestion keys

An ingestion key does one job: it lets the HoneyHive tracer SDKs and OTLP exporters send traces and events to a single project. It carries no other capability, which makes it the key to deploy on production servers, where a leaked credential should not be able to read anything back.

What an ingestion key can reach

An ingestion key is bound to exactly one project and authenticates only that project’s ingestion endpoints: the OpenTelemetry traces endpoint and the endpoints that create sessions and create or update events, singly or in batches. That is the whole path the HoneyHive tracer and OTLP exporters use, so tracing works with an ingestion key alone. Every other data plane endpoint rejects an ingestion key with a 404. Use a data plane key for the project-scoped API, which includes reading events back and the runs that evaluate() creates. See Using an ingestion key with the SDKs for configuring these credentials separately.

Why ingestion keys never expire

Ingestion keys have no expiration date. They are deployed across fleets of servers and exporters, and a key that expired on a timer would stop telemetry from every one of them at once, silently. Revocation is the only way an ingestion key stops working. To rotate an ingestion key, create the replacement, move your fleet over to it, then revoke the old key.

Creating an ingestion key

You need project.ingestion_api_key.post on the project, plus .list to open the Ingestion tab. The default Project Admin role carries all four ingestion key permissions, and a custom role can too. Project Member carries .get and .list, so members see the Ingestion tab and its keys but cannot create one. See Permission Reference.
1

Open the project's API Keys settings

Go to Settings > Project > API Keys. The page opens on the Ingestion tab. Classic API keys live on the Classic tab.
2

Click Create API Key

Give the key a name that identifies the fleet or service using it, for example prod-web-servers. The description is optional. Use it to record where the key is deployed.
3

Copy the key

Click Create Key, then copy the full key value and store it where your application runs, as HH_INGESTION_API_KEY in your secret manager. This is the only time the value is shown. HoneyHive stores only a hash of it, so it cannot be recovered or displayed again.
The Ingestion tab also shows your project’s data plane URL. Where it differs from the SDK default, set it as HH_API_URL for the Python SDK or HH_DATA_PLANE_URL for the TypeScript client. OTLP exporters send to <data plane URL>/opentelemetry/v1/traces. After creation, the key list shows each key as hh_ingst_<key id>_******. As with fine-grained keys, the visible portion is the key’s id, not part of its secret, so you can match a key in the list to a key in your logs without exposing anything sensitive.

Using an ingestion key with the SDKs

The data plane clients (the Python SDK, the TypeScript API client, and the CLI) hold ingestion, data plane, and classic keys separately. The ingestion key goes in HH_INGESTION_API_KEY and the data plane key in HH_DATA_PLANE_API_KEY. A classic key, where a process still uses one, stays in HH_API_KEY for Python or HH_PROJECT_API_KEY for TypeScript and the CLI. Each call uses the key its endpoint accepts:
  • Ingestion calls (OTLP export, session start, and event writes) use the ingestion key when one is set, and the classic key otherwise.
  • Project-scoped calls use HH_DATA_PLANE_API_KEY and require a project ID.
  • Other calls use the classic key. That includes a call to a method with both routes that omits the project ID. If the required credential is absent, the SDK or CLI fails before sending the request.
A process that traces and runs experiments sets the ingestion key and the data plane key. With project_id, evaluate() sends its traces with the ingestion key and creates, updates, and reads its run with the data plane key. It requires both keys in that mode, and a classic key does not stand in for the ingestion key. The data plane key needs project.experiment_run.post, project.experiment_run.put, and project.experiment_run.get, plus project.dataset.list and project.datapoint.get when the run reads a dataset stored in HoneyHive. The ingestion key must belong to the project that project_id names. A key from another project sends the traces there, and the run shows no events. A tracing-only process sets only HH_INGESTION_API_KEY. HH_INGESTION_API_KEY is strict. Its value must be a complete hh_ingst_ key, and a wrong key type or incomplete value raises when the tracer or client initializes. Use the typed variable so format mistakes are caught at initialization. An ingestion key placed in the unchecked classic-key variable (HH_API_KEY or HH_PROJECT_API_KEY) is forwarded by calls that use that credential: ingestion requests succeed, while non-ingestion requests sent with it return 404. Project-scoped calls still require a data plane key and fail before sending if it is missing. The control plane SDK is separate. It takes only a control plane fine-grained key in HH_CONTROL_PLANE_API_KEY.

Revoking an ingestion key

Open Settings > Project > API Keys and revoke the key from its row on the Ingestion tab. Revoking requires the project.ingestion_api_key.delete permission, which the default Project Admin role carries and Project Member does not. Revocation takes effect within two minutes rather than immediately: ingestion verifies keys from a cache with a two-minute bound by default, so applications using the key stop sending telemetry within that window. Self-hosted deployments that tune the ingestion key cache get their configured window instead. Revoked keys stay in the list, marked as revoked, alongside who created them, who revoked them, and when.

Security guidance

  • Grant key creation deliberately. A key is limited by its root scope and your organization’s API key policy, not by the access of the person who creates it. Someone who can create keys on a scope can issue a key that acts on every scope beneath it, including projects they cannot access themselves. On Self-Hosted deployments, someone who can create organization-rooted control plane keys can also issue one that carries the privileged permissions. Only grant key creation to people you would trust with that access directly, or narrow the policy.
  • Treat roles and membership keys as administrator credentials. Give each workload its own key with only the privileged permissions it uses, set a short expiration, and revoke the key when the workload is retired.
  • One key per workload. Separate keys for separate systems keep the blast radius small and make it obvious which key to revoke.
  • Store keys in a secret manager. Never store key values in plaintext database rows, files, source code, or logs.
  • Rotate on a schedule. Fine-grained keys expire, which gives you a natural rotation cadence. Replace them before they lapse rather than after a failure. Ingestion keys do not expire, so put their rotation on your own calendar.
  • Put ingestion keys, not classic keys, on production servers. A server that only sends telemetry should hold a credential that can only send telemetry.

Roles and permissions

How permissions and roles work across scopes

Organization hierarchy

How organizations, workspaces, and projects nest

Managing projects

Create and organize projects

Alerts

Monitor cost, latency, errors, and evaluator scores

Log your first trace

Send a first trace with an ingestion key