API Keys

Create an API key

Changed on

Create a project-scoped API key using a global (organization-scoped) API key. Supply projectId for an active project in the authenticated organization; scopeType must be project or omitted. Project-scoped API keys cannot create keys, and global keys cannot create other global keys. Dashboard users may also create project keys, or global keys with organization admin access. Returns the full secret once with Cache-Control: no-store; save it securely. The new key is independent: revoking the creating global key does not revoke keys it created. Missing projectId returns 400; insufficient scope returns 403; an unavailable or foreign project returns 404.

post/v1/api-keys

Request

  • Base URL
    https://api.steel.dev
  • URL
    https://api.steel.dev/v1/api-keys
  • Auth
    API key in header steel-api-key

Request body

namestring

A human-readable label for the new key. Defaults to Default.

projectIdstring uuid

The active project to bind the new key to, belonging to the authenticated organization. Required when authenticating with a global API key. Dashboard users may omit it to use their default project.

scopeType'project' | 'global'

Defaults to project. Global API keys may only create project-scoped keys. Only organization admins using dashboard authentication may create a global key; projectId is ignored for those keys.

Response

Default Response

createdAtstring date-time required
idstring uuid required
keystring required

The full secret on creation or rotation only. Metadata reads return a masked preview. Store a newly created secret securely; it cannot be retrieved later.

namestring
projectIdstring uuid nullable required

The pinned project, or null for a global key, which binds to no project.

scopeType'project' | 'global' required

project pins the key to one project. global authorizes access across the organization and has no project binding.

updatedAtstring date-time required

Changes