---
title: "Add secret to project"
method: POST
path: "/api/cli/v1/projects/{project_slug}/secrets"
tags: ["Project/Secrets"]
---

# Add secret to project

`POST /api/cli/v1/projects/{project_slug}/secrets`

Add secret to project

## Path parameters

- `project_slug` string, required

## Request body

- object[]
  - `name` string
  - `value` string

## Response `201`

Created

## Other responses

- `401` — Not authorized
- `422` — A compose file already exists for this project

## Changes

- **2022-03-15** (v1) `a1eeb9f924b1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/uffizzicloud/apis/uffizzi-docs/changes/api/cli/v1/projects/:project_slug/secrets/post.md)

---

[API](https://skmtc.dev/uffizzicloud/apis/uffizzi-docs.md) · [All operations](https://skmtc.dev/uffizzicloud/apis/uffizzi-docs/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uffizzicloud/uffizzi-docs/revisions/a1eeb9f924b1/schema)
