# Create a secret Creates a new secret Endpoint: POST /v1/secrets Version: 1.0 Security: x-api-key ## Query parameters: - `private_secret` (boolean) This would be used to define secret as private. ## Header parameters: - `Harness-Account` (string) Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped. ## Request fields (application/json): - `secret` (object, required) - `secret.name` (string, required) Secret name - `secret.identifier` (string, required) Secret identifier - `secret.org` (string) Organization identifier for secret - `secret.project` (string) Project identifier for secret - `secret.tags` (object) Secret tags - `secret.description` (string) Secret description - `secret.spec` (object, required) Details of the secret defined in Harness - `secret.spec.type` (string, required) This specifies the type of secret Enum: "SSHKeyPath", "SSHKeyReference", "SSHPassword", "SSHKerberosTGTKeyTabFile", "SSHKerberosTGTPassword", "SecretFile", "SecretText", "WinRmTGTKeyTabFile", "WinRmTGTPassword", "WinRmNTLM" ## Response 201 fields (application/json): - `secret` (object) - `secret.name` (string, required) Secret name - `secret.identifier` (string, required) Secret identifier - `secret.org` (string) Organization identifier for secret - `secret.project` (string) Project identifier for secret - `secret.tags` (object) Secret tags - `secret.description` (string) Secret description - `secret.spec` (object, required) Details of the secret defined in Harness - `secret.spec.type` (string, required) This specifies the type of secret Enum: "SSHKeyPath", "SSHKeyReference", "SSHPassword", "SSHKerberosTGTKeyTabFile", "SSHKerberosTGTPassword", "SecretFile", "SecretText", "WinRmTGTKeyTabFile", "WinRmTGTPassword", "WinRmNTLM" - `created` (integer) Creation timestamp for the secret - `updated` (integer) Updated timestamp for the secret - `draft` (boolean) - `governance_metadata` (object) Governance metadata information