Secrets

Create a project secret (owner/admin, or an API key of this project)

The value is encrypted (KMS envelope) and never returned. allowed_tools defaults to [exec, pty]. 409 when the name exists in this project. Supports Idempotency-Key.

post/v1/projects/{project_id}/secrets

Request

  • Base URL: https://api.shardflux.dev
  • URL: https://api.shardflux.dev/v1/projects/{project_id}/secrets
  • Auth: HTTP bearer

Path parameters

project_idstring uuid required

UUIDv7, lowercase canonical form.

Request body

namestring required

Environment-variable-safe name, unique per scope (SHARDFLUX_ prefix reserved).

descriptionstring
valuestring required

UTF-8 text, at most 65536 bytes, no NUL characters. Write-only: never returned by any management API.

allowed_workspace_idsstring[] nullable

Default null (any workspace of the project).

allowed_toolsstring[]

Response

Secret metadata. Values are write-only: no API returns them except the cell resolution endpoint.

idstring uuid required

UUIDv7, lowercase canonical form.

organization_idstring uuid required

UUIDv7, lowercase canonical form.

project_idstring uuid nullable required

UUIDv7, lowercase canonical form.

namestring required

Environment variable name the value is injected as.

descriptionstring required
current_versioninteger required
created_atstring date-time required

RFC 3339 UTC timestamp with Z.

updated_atstring date-time required

RFC 3339 UTC timestamp with Z.

rotated_atstring date-time nullable required

RFC 3339 UTC timestamp with Z.

deleted_atstring date-time nullable required

RFC 3339 UTC timestamp with Z.

Changes

No recorded changes to this operation across all 1 revision of this API.