---
title: "Update application secret"
method: PATCH
path: "/api/applications/{id}/secrets/{name}"
tags: ["Applications"]
---

# Update application secret

`PATCH /api/applications/{id}/secrets/{name}`

Update a secret for the application by name.

## Path parameters

- `id` string, required
- `name` string, required

## Request body

- object
  - `name` string, required — The secret name to update. Must be unique within the application.

## Response `200`

OK

- object
  - `tenantId` string, required
  - `applicationId` string, required
  - `name` string, required
  - `value` string, required
  - `createdAt` number, required
  - `expiresAt` number, nullable, required

## Other responses

- `204` — The secret was updated successfully.
- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/versions/a163dc77d842/schema)
