---
title: "Create a secret"
method: POST
path: "/projects/{project_id}/secrets"
tags: ["Management"]
---

# Create a secret

`POST /projects/{project_id}/secrets`

Create a new secret

## Path parameters

- `project_id` integer, required

## Request body

- Secret
  - `id` integer
  - `name` string
  - `project_id` integer
  - `project_name` string
  - `kind` string
  - `username` string
  - `key` string

## Response `201`

Successfully created run

- Secret
  - `id` integer
  - `name` string
  - `project_id` integer
  - `project_name` string
  - `kind` string
  - `username` string
  - `key` string

---

[API](https://skmtc.net/kraken-ci/apis/server-api.md) · [All operations](https://skmtc.net/kraken-ci/apis/server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kraken-ci/server-api/versions/1f2ae877f985/schema)
