---
title: "Update Developer Secret"
method: PUT
path: "/secrets/{secret_id}"
tags: ["secrets"]
---

# Update Developer Secret

`PUT /secrets/{secret_id}`

Update a developer secret.

Args:
    developer_id: ID of the developer who owns the secret
    secret_id: ID of the secret to update
    data: New secret data

Returns:
    The updated secret

Raises:
    HTTPException: If the secret doesn't exist or doesn't belong to the developer

## Path parameters

- `secret_id` string, uuid, required

## Request body

- UpdateSecretRequest
  - `metadata` object, nullable
  - `name` string, required
  - `description` string, nullable
  - `value` string, required

## Response `200`

Successful Response

- Secret — A secret that can be used in tasks and sessions
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `metadata` object, nullable
  - `name` string, required
  - `description` string, nullable
  - `value` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2025-05-12** `3b58badc86fa` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/julep-ai/apis/julep-agents-api/changes/secrets/:secret_id/put.md)

---

[API](https://skmtc.dev/julep-ai/apis/julep-agents-api.md) · [All operations](https://skmtc.dev/julep-ai/apis/julep-agents-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/julep-ai/julep-agents-api/revisions/21c8182519ef/schema)
