Access
post/keys

Request

  • Base URL
    https://api.hedra.com/v3
  • Auth
    • API key in header Authorization
    • or HTTP bearer

Request body

namestring nullable

Human-readable label for the key.

scopesApiKeyScope[] nullable

Scopes granted to the key; omitted means the creating credential's own scopes, never the opt-in sandboxes:read, sandboxes:write and sandboxes:exec, which a key holds only by listing them, and only a workspace owner or admin can list.

kind'personal' | 'service'

Personal keys die with the member; service keys belong to the workspace.

workspace_idstring nullable

Target workspace; omitted means the authenticating key's workspace.

expires_atstring date-time nullable

ISO-8601 instant the key stops authenticating; omitted means it never expires.

Response

Successful Response

key_idstring required

The key's public identifier.

credentialstring required

The full <key_id>:<secret> pair — a valid Bearer credential. Returned exactly once, at creation; store it now.

kind'personal' | 'service' required

Personal keys die with the member; service keys belong to the workspace.

namestring nullable

Human-readable label for the key.

scopesstring[] nullable

Scopes granted to the key; null means every scope except the opt-in sandboxes:read, sandboxes:write and sandboxes:exec (a legacy key predating scopes).

workspace_idstring nullable

The workspace the key bills and acts in.

expires_atstring date-time nullable

ISO-8601 instant the key stops authenticating; null means it never expires.

created_atstring date-time nullable

ISO-8601 instant the key was created.

Changes

    • info

      added the new sandboxes:exec enum value to the request property //

    • info

      added the new sandboxes:read enum value to the request property //

    • info

      added the new sandboxes:write enum value to the request property //

    • info

      endpoint added