# SecretSpec


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





Schema constraints and annotations:

```json
{
  "properties": {
    "Data": {
      "description": "Data is the data to store as a secret, formatted as a standard base64-encoded\n([RFC 4648](https://tools.ietf.org/html/rfc4648#section-4)) string.\nIt must be empty if the Driver field is set, in which case the data is\nloaded from an external secret store. The maximum allowed size is 500KB,\nas defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0/api/validation#MaxSecretSize).\n\nThis field is only used to _create_ a secret, and is not returned by\nother endpoints.\n",
      "example": "",
      "type": "string"
    },
    "Driver": {
      "$ref": "#/components/schemas/Driver",
      "description": "Name of the secrets driver used to fetch the secret's value from an\nexternal secret store.\n"
    },
    "Labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "User-defined key/value metadata.",
      "example": {
        "com.example.some-label": "some-value",
        "com.example.some-other-label": "some-other-value"
      },
      "type": "object"
    },
    "Name": {
      "description": "User-defined name of the secret.",
      "type": "string"
    },
    "Templating": {
      "$ref": "#/components/schemas/Driver",
      "description": "Templating driver, if applicable\n\nTemplating controls whether and how to evaluate the config payload as\na template. If no driver is set, no templating is used.\n"
    }
  },
  "type": "object"
}
```



