---
title: "Release a command-line secret or website login to the caller's OpenWork app or CLI"
method: POST
path: "/v1/org/my-secrets/{secretId}/use"
tags: ["Secrets"]
---

# Release a command-line secret or website login to the caller's OpenWork app or CLI

`POST /v1/org/my-secrets/{secretId}/use`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/org/my-secrets/{secretId}/use`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

For a secret usable on people's computers: checks that the caller is allowed, that the command or the page matches the secret's locked target, and the Allow, Ask or Block rule, then releases the value to the OpenWork app or CLI that runs the command or fills the page. Refuses agents and API keys. With preflight, answers the decision without releasing anything. Every refusal and every release is recorded for the organization.

## Path parameters

- `secretId` string, required

## Request body

- UseOrganizationSecretRequest
  - `use` union, required
    - object
      - `kind` 'cli_env', required
      - `command` string, required
    - object
      - `kind` 'web_login', required
      - `origin` string, required
  - `client` 'cli' | 'desktop'
  - `agentId` string, typeid: Den TypeID with 'pga_' prefix and a 26-character base32 suffix.
  - `approval` 'once' | 'always'
  - `preflight` boolean

## Response `200`

The decision, and the released value unless this was a preflight.

- UseOrganizationSecretResponse
  - `secret` UsableOrganizationSecret, required
    - `id` string, required
    - `name` string, required
    - `description` string, nullable, required
    - `secretType` 'mcp_header' | 'http_header' | 'ssh_key' | 'cli_env' | 'web_login', required
    - `executionBoundary` 'cloud_only' | 'desktop_allowed', required
    - `targetHost` string, nullable, required
    - `targetCommand` string, nullable, required
    - `headerName` string, nullable, required
    - `envName` string, nullable, required
    - `loginUsername` string, nullable, required
  - `decision` 'allow' | 'ask', required
  - `canChooseAlways` boolean, required
  - `release` union, required
    - object
      - `kind` 'cli_env', required
      - `envName` string, required
      - `value` string, required
    - object
      - `kind` 'web_login', required
      - `username` string, required
      - `password` string, required

## Other responses

- `400`: Invalid request.
- `401`: Sign-in required.
- `403`: Not allowed, approval required, wrong target, or a person's own sign-in is required.
- `404`: Organization secrets are off or the secret is not available to the caller.
- `409`: The secret is of another type or cannot be decrypted here.

## Changes

- **2026-12-03** `b433928052b7`: 1 info
  - added the required property `secret/headerName` to the response with the `200` status
- **2026-12-03** `6a95d77df4da`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/org/my-secrets/:secretId/use/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
