> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "Set secret"
description: "Set secret"
api: "POST /api/v0/projects/{projectId}/environments/{environmentId}/secrets"
gridGap: 30
---

<Aside full>

<RequestExample>

```bash lines=false
curl -X POST "https://api.example.com/api/v0/projects/<projectId>/environments/<environmentId>/secrets" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "value": "string"
}'
```

</RequestExample>

</Aside>

<OpenAPIEndpoint {...{"method":"post","path":"/api/v0/projects/{projectId}/environments/{environmentId}/secrets","summary":"Set secret","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environmentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"contentType":"application/json","schema":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1},"value":{"type":"string"}}}},"responses":[{"status":"200","description":"","schema":{"type":"object","required":["ok","environmentId","id","name"],"properties":{"ok":{"type":"boolean"},"environmentId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}}},{"status":"default","description":""}],"security":[],"servers":[]}} />

---

*Powered by [holocron.so](https://holocron.so)*
