---
title: "Create a new Secret"
method: POST
path: "/secrets"
tags: ["config"]
---

# Create a new Secret

`POST /secrets`

## Request body

- Secret — A Secret allows grouping informations on how to access a restricted resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
  - `id` string — Unique identifier of Secret
  - `name` string, required — Unique distinct name of Secret
  - `username` string
  - `password` string
  - `token` string
  - `tokenHeader` string
  - `caCertPem` string
  - `description` string, required — Description of this Secret

## Response `201`

Created Secret

- Secret — A Secret allows grouping informations on how to access a restricted resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
  - `id` string — Unique identifier of Secret
  - `name` string, required — Unique distinct name of Secret
  - `username` string
  - `password` string
  - `token` string
  - `tokenHeader` string
  - `caCertPem` string
  - `description` string, required — Description of this Secret

---

[API](https://skmtc.dev/microcks/apis/microcks-api-v1-7.md) · [All operations](https://skmtc.dev/microcks/apis/microcks-api-v1-7/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/microcks/microcks-api-v1-7/revisions/cc062ec25192/schema)
