---
title: "Upsert an application secret"
method: PUT
path: "/apps/{app-slug}/secrets/{secret-name}"
tags: ["secrets"]
deprecated: true
---

# Upsert an application secret

`PUT /apps/{app-slug}/secrets/{secret-name}`

> **Deprecated.**

Upsert an application secret. Requires administrator level privileges to the app.

## Path parameters

- `app-slug` string, required
- `secret-name` string, required

## Request body

- object
  - `expand_in_step_inputs` boolean — Replace variable in inputs? https://devcenter.bitrise.io/en/references/steps-reference/step-inputs-reference.html#step-input-properties
  - `is_exposed_for_pull_requests` boolean — Expose for Pull Requests?
  - `is_protected` boolean — Secret marked as protected?
  - `value` string — Value of the secret

## Response `201`

Created

## Other responses

- `204` — No Content
- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

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