---
title: "Updates skill secret requirements."
method: PUT
path: "/agents/skills/{skillId}/secrets"
tags: ["agentSkills"]
---

# Updates skill secret requirements.

`PUT /agents/skills/{skillId}/secrets`

Replaces the list of secrets a skill needs and returns the resulting requirements.

<Check title="Required Permissions" icon="key">Any authenticated user.</Check>

## Path parameters

- `skillId` string, uuid, required

## Request body

- SetSkillSecretRequirementsRequestModel — Represents the request payload that replaces the secret declarations of a skill.
  - `requirements` SkillSecretRequirementRequestModel[], required — The full set of secret requirements for the skill.
    - `envVarName` string, required — The environment variable name the secret is injected as.
    - `description` string, nullable — The description shown to users when providing the secret.
    - `scope` 'workspace' | 'user', required — Who must provide the secret value.
    - `isRequired` boolean — Whether the secret is required for the skill to work.

## Response `200`

OK

- SkillSecretRequirementResponseModel[]
  - `id` string, uuid — The secret requirement identifier.
  - `envVarName` string, nullable — The environment variable name the secret is injected as.
  - `description` string, nullable — The description shown to users when providing the secret.
  - `scope` 'workspace' | 'user' — Who must provide the secret value.
  - `isRequired` boolean — Whether the secret is required for the skill to work.
  - `hasValue` boolean — Whether a value is available for the requesting user.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

## Changes

- **2026-09-20** `5332322ffca3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/awork-io/apis/api-v1-reference/changes/agents/skills/:skillId/secrets/put.md)

---

[API](https://skmtc.dev/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.dev/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/awork-io/apis/api-v1-reference/revisions/eadefd26df12?raw)
