---
title: "Update secret files"
method: PUT
path: "/build-sources/{buildSourceId}/secret-files"
tags: ["Build Sources"]
---

# Update secret files

`PUT /build-sources/{buildSourceId}/secret-files`

## Request

- Base URL: `https://api.render.com/v1`
- URL: `https://api.render.com/v1/build-sources/{buildSourceId}/secret-files`
- Auth: HTTP bearer

Replace all secret files for a build source with the provided list of secret files.

**Any of the build source's existing secret files not included in this request will be deleted.**

This only applies to secret files set directly on the build source, not to secret files in a linked environment group.

## Request body

- Items[] (unresolved $ref)

## Response `200`

OK

- SecretFileWithCursor[]
  - `secretFile` SecretFile, required
    - `name` string, required
    - `content` string, required
  - `cursor` string, required

## Other responses

- `400`: The request could not be understood by the server.
- `401`: Authorization information is missing or invalid.
- `403`: You do not have permissions for the requested resource. If a scoped API token does not satisfy the endpoint's minimum scope requirements, the response has code insufficient_token_scope and its message lists all minimum required scopes. Broader scopes that include their permissions also satisfy the requirements. Passing this check does not guarantee access to the requested resource or to conditional operations.
- `404`: Unable to find the requested resource.
- `406`: Unable to generate preferred media types as specified by Accept request header.
- `410`: The requested resource is no longer available.
- `429`: Rate limit has been surpassed. Rate-limited endpoints also return `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` on successful responses so clients can track their remaining quota.
- `500`: An unexpected server error has occurred.
- `503`: Server currently unavailable.

## Changes

- **2026-11-03** `6ac5d3d47362`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/render/apis/render-public-api/changes/build-sources/:buildSourceId/secret-files/put.md)

---

[API](https://skmtc.dev/render/apis/render-public-api.md) - [All operations](https://skmtc.dev/render/apis/render-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/render/apis/render-public-api/revisions/6ac5d3d47362?raw)
