# CreateSecretRequest


[API catalog](/reference/api/) · [Docker Sandboxes overview](/reference/api/sandboxes/latest/) · [Product manual](https://docs.docker.com/ai/sandboxes-api/) · [OpenAPI specification](/reference/api/sandboxes/api.yaml)

API version: v1


> This API is experimental. Features, interfaces,
> and behavior may change.




Schema constraints and annotations:

```json
{
  "allOf": [
    {
      "properties": {
        "displayName": {
          "description": "display_name is a scoped label; the backend assigns the immutable resource ID.",
          "minLength": 1,
          "not": {
            "enum": [
              ".",
              ".."
            ],
            "type": "string"
          },
          "pattern": "^[^/]+$",
          "type": "string"
        },
        "serviceType": {
          "description": "service_type identifies the consuming service.",
          "type": "string"
        }
      }
    },
    {
      "oneOf": [
        {
          "properties": {
            "custom": {
              "$ref": "#/components/schemas/CustomSecretMaterial",
              "description": "custom stores an opaque value with caller-authored injection metadata.\nCreateSecretRequest.service_type is server-assigned for custom\nmaterial; leave it empty."
            }
          },
          "required": [
            "custom"
          ],
          "title": "custom",
          "type": "object"
        },
        {
          "properties": {
            "oauth": {
              "$ref": "#/components/schemas/OAuthRefreshMaterial",
              "description": "oauth stores OAuth refresh material."
            }
          },
          "required": [
            "oauth"
          ],
          "title": "oauth",
          "type": "object"
        },
        {
          "properties": {
            "token": {
              "$ref": "#/components/schemas/TokenSecretMaterial",
              "description": "token stores opaque token material."
            }
          },
          "required": [
            "token"
          ],
          "title": "token",
          "type": "object"
        }
      ]
    }
  ],
  "description": "CreateSecretRequest stores new secret material.\nservice_type must be empty for custom material (server-assigned)",
  "required": [
    "displayName"
  ],
  "title": "CreateSecretRequest",
  "type": "object",
  "unevaluatedProperties": false
}
```



