---
title: "Create a new Secret"
method: POST
path: "/groups/{groupId}/apps/{appId}/secrets"
tags: ["secrets"]
---

# Create a new Secret

`POST /groups/{groupId}/apps/{appId}/secrets`

Create a new
[Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/define-and-manage-secrets).

## Request body

- object
  - `name` string, required
  - `value` string, required

## Response `201`

The Secret was successfully created.

- object
  - `_id` string
  - `name` string

---

[API](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/versions/1365ab72bc03/schema)
