# Write a secret file `PUT /v1/environments/{environment}/secret-files` **In this build:** Real. **Scope:** `environment.write` **CLI:** `harebox env file set` ## Request: `SecretFile` | Field | Type | Notes | |---|---|---| | `path` (required) | `string` | | | `content` (required) | `string` | | | `mode` | `string` | | ## Response: 204 No content. Errors follow [one format](../errors.html).