---
title: "Creates a new direktiv secret"
method: POST
path: "/api/v2/namespaces/{namespace}/secrets"
tags: ["secrets"]
---

# Creates a new direktiv secret

`POST /api/v2/namespaces/{namespace}/secrets`

## Path parameters

- `namespace` string, required

## Request body

- object
  - `name` string — a unique name string of the secret
  - `data` string — base64 encoded string of the secret's data

## Response `200`

data of the created direktiv secret

- object
  - `data` object
    - `name` string — a unique name string of the secret
    - `createdAt` string — timestamp of creation date
    - `updatedAt` string — timestamp of last updating date

---

[API](https://skmtc.net/direktiv/apis/direktiv-apiv2-reference.md) · [All operations](https://skmtc.net/direktiv/apis/direktiv-apiv2-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/direktiv/direktiv-apiv2-reference/revisions/ad935afb0f54/schema)
