Skip to content
Docs
Download Markdown
In this article

Create and use an API Key

Scope a credential to a Campaign or subscription and keep its secret safe.

Download Markdown

After verified web sign-in, you do not need an API Key for your own actions. Create one when automation or an agent needs programmatic access. If you already have a full Key and a Subscription ID, go to retrieve data. They are different values: the Key authenticates your organizationThe Developer-side unit that holds Campaigns, data access, and funds within its allowed scope; the Subscription ID selects the data to read. A CampaignA developer's data-production project and its settings ID is not a substitute for a Subscription ID.

Check the organization and credential manager

Open API Keys from the Developer portal's account-and-organization menu. Confirm the active organization. Any member of that organization can create a Key; a creator can revoke their own Key, and an Owner or Admin can revoke any of the organization's Keys. The person who builds the integration does not need a changed role.

Create a data-read Key

Interactive walkthroughA simplified replica of Developer portal → API Keys with sample data. Nothing you type leaves this page.
Step 1Open the Create tab to start a new key.
  1. Choose Create API Key and enter a recognizable Name. An active Key in the same organization cannot share that name.
  2. Choose an expiry: 7d, 30d, 90d, 1y, or Never; the default is 90 days.
  3. Under Permissions → Data, enable data access. With no source selected, this covers every subscription the organization has now or creates later. To narrow the Key, expand Limit this key to specific subscriptions or campaigns, then actually select an eligible owned Campaign under Campaign access or an existing subscription under Subscription access. Opening the picker without selecting anything leaves the broad grant in place.
  4. Review the organization, access scope, and expiry. If a data-use agreement is required, read it and complete that separate step before selecting Create key.
  5. Copy the complete value from Your new API key into the organization's approved secret store. The portal displays the full value only once.
  6. Back in the list, inspect Scope, Status, and Expires. Under Pull from, find the source and copy its subscription_id.

In the narrowed Data picker, Campaign access can include this organization's live, paused, or finished Campaigns, up to 25 per Key; drafts and archived Campaigns are not offered as data sources. Creating the Key creates or reuses the corresponding subscription. A Campaign marked partial reuses an existing narrower subscription and does not widen its taskA specific item a contributor claims or enters or filter scope. External data requires an existing subscription under the applicable terms.

Create a Campaign configuration Key

The same form has a separate Permissions → Campaigns area. Choose Read (campaign:read) to inspect Campaign definitions. Choose Write (campaign:author) to validate, plan, or apply a candidate; the form also selects Read so the caller can inspect the result. For Write or Launch, choose the Campaigns you can edit now plus those the Key creates (the default), or only Campaigns the Key creates. The Key gains access to each Campaign it creates automatically, even when you have no editable Campaigns yet; Campaigns created elsewhere are not added later. The Data area's Campaign access picker narrows delivered records and does not grant Campaign editing.

Select Launch (campaign:launch) only for an integration that must propose a launch. It also selects Read and Write and requires a positive Spend cap with a daily or monthly window. A person must still confirm the specific launch proposal. After creation, call GET /api/v1/auth/whoami with the Key and check its organization, scopes, and managed_campaign_ids before using the Campaign API. Ask the Owner or Admin for a replacement Key if the grant or Campaign scope is wrong; changing Data access will not repair an authoring permission.

When the updated form is deployed, Select all permissions checks the grants available to you and focuses the Campaign Spend cap. Enter a positive amount, choose a daily or monthly window, and review the selected grants. Select Create key at the top of the form.

Under Submission review, Read submissions (submission:read) lists and inspects submissionsThe record created when work is submitted. Decide submissions (submission:decide) also selects read access and allows the Key to approve, reject, or change verdicts on its granted Campaigns. Protected evidence on guarded and sealed Campaigns stays hidden from Keys.

File reads (files:read) lets a Key read supported-category uploads made by its creator, not teammates' files or uploads. Academy authoring (academy:author) lets an admitted key creator who remains an organization member read and manage Academy courses, edit, reorder and delete draft lessons and questions, submit versions for review, read and grade open answers, and archive courses in that Key's organization. Humanbased review still controls publishing. The new Academy, submission-read, and file-read Key routes are not enabled in production yet.

A Key holding any capability that acts rather than reads — Write, Launch, Training's Run (training:run), or Academy authoring — lasts at most 90 days, so the form locks 1y and Never. Arrange a replacement before it expires, or the programs that depend on it are refused afterwards; read-only and data Keys keep every expiry option.

Use, rotate, or revoke

Use the credential from a controlled integration, or paste it into the Developer portal's Read data in this browser panel when that panel is available in your environment. The browser read steps explain its memory-only handling and current-page download. Programmatic requests send the Key in the request header:

Authorization: Bearer <API_KEY>

A Key starts with hb_live_sk_. Add that prefix to your secret scanner so a Key committed by mistake is caught.

The creator need not remain signed in for programmatic requests. Check both Status and Expires; Active does not override an expiry. If the full Key is lost, an authorized credential manager must create a replacement, update consumers, and revoke the old Key. Revoke affects every program still using it. Do not put a complete Key in a browser URL, public client, screenshot, or documentation.

ProblemFirst check
No creation controlActive organization and sign-in; confirm both, then contact support if the control is still missing
Create key disabledName, at least one Permissions grant, a positive spend cap if Launch is selected, and whether the list loaded
Campaign missingOrganization, ownership, and Campaign state
Only a masked Key remainsThe full value cannot be shown again. Create a replacement Key, update the programs that use it, then revoke the old one
Agreement or service errorKeep the message and contact support before repeatedly creating Keys

Once the complete Key and matching Subscription ID are ready, make a small read.