Create a new Secret

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

Create a new Secret.

Path parameters

application/json

Body Required

The Secret to create.

  • name string Required
  • value string Required

Responses

  • 201 application/json

    The Secret was successfully created.

    Hide response attributes Show response attributes object
    • _id string
    • name string
POST /groups/{groupId}/apps/{appId}/secrets
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/secrets' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","value":"string"}'
Request examples
{
  "name": "string",
  "value": "string"
}
Response examples (201)
{
  "_id": "string",
  "name": "string"
}