Skip to content
LyraShield AIOpen beta

Updated

REST API & API keys

LyraShield workspace API keys authenticate requests to the REST API, the remote MCP endpoint, and the GitHub Action.

Creating an API key

  1. Sign in to the LyraShield app at https://app.lyrashieldai.com.
  2. Navigate to Settings → API keys.
  3. Click New key and choose a name and scope.
  4. Copy the key immediately — it will not be shown again after you close the dialog.
Copy immediately: The full key value is only shown once at creation time. Store it securely in a secrets manager, a CI secret, or an environment variable. Never commit an API key to source control.

Key format and scopes

PropertyDetails
Prefixlsk_
Read-only scopeInspect findings, retrieve reports, list targets
Read-and-write scopeTrigger scans, submit findings, manage targets

Authentication

Pass the key as a Bearer token in the Authorization header on every request:

Authorization: Bearer lsk_your_key_here

Example: REST API request

curl -X GET https://app.lyrashieldai.com/api/v1/targets \
  -H "Authorization: Bearer lsk_your_key_here" \
  -H "Accept: application/json"

Example: Remote MCP endpoint

# Headers to add when configuring the remote MCP endpoint:
Authorization: Bearer lsk_your_key_here

Key rotation

To rotate a key, create a new key with the same scope, update all integrations to use the new key, then revoke the old key from Settings → API keys. Keys can be revoked at any time from the settings panel.

Security recommendations

  • Use a read-only key for MCP server connections in editors — it is sufficient for most use cases.
  • Use a read-and-write key only for CI pipelines that need to trigger scans or submit findings.
  • Store keys in a secrets manager or CI secret store, not in environment files committed to source control.
  • Create separate keys per integration so you can revoke individual access without disrupting others.