---
title: "Create secret group"
method: POST
path: "/compute/v1/secrets"
tags: ["Compute"]
---

# Create secret group

`POST /compute/v1/secrets`

Creates a new secret group in a compute environment. Secret groups organize related secrets for use in serverless functions and workflows. If no environment is specified, the group is created in the default environment.

**Features:**
- Organize secrets by logical groups (e.g., database, APIs, third-party services)
- Environment-based isolation
- Validation of group names
- Conflict detection for existing groups

## Request body

- object
  - `name` string, required — Unique name for the secret group. Must contain only letters, numbers, hyphens, and underscores.
  - `description` string — Optional description of the secret group's purpose
  - `env` string — Environment name where the secret group will be created. Uses default environment if not specified.

## Response `201`

Secret group created successfully

- object
  - `id` string — Unique identifier for the secret group
  - `name` string — Name of the secret group
  - `description` string — Description of the secret group
  - `createdAt` string, date-time — Creation timestamp

## Other responses

- `400` — Bad request - invalid parameters or missing required fields
- `401` — Unauthorized - invalid API key
- `404` — Environment not found
- `409` — Conflict - secret group with this name already exists in the environment

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/versions/5b7e64e6d6f9/schema)
