# Secret Keys

## Get Secret Keys

> Gets all secret keys for the project

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/secret-keys":{"get":{"description":"Gets all secret keys for the project","tags":["secret-keys"],"summary":"Get Secret Keys","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.GetSecretKeysResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.GetSecretKeysResponse":{"type":"object","properties":{"alternateSecretKeys":{"description":"AlternateSecretKeys are additional secret keys that can be used for an account.","type":"array","items":{"type":"string"}},"defaultSecretKey":{"description":"DefaultSecretKey is the default secret key for the account.","type":"string"},"names":{"description":"Names are the names of the secret keys that can be used for an account.\nindex 0 is the default secret key, index 1+ are alternate secret key names","type":"array","items":{"type":"string"}}}},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## Add Secret Key

> Adds a new secret key to the project

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/secret-keys":{"post":{"description":"Adds a new secret key to the project","tags":["secret-keys"],"summary":"Add Secret Key","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.AddSecretKeyResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.AddSecretKeyResponse":{"type":"object","properties":{"secretKey":{"description":"SecretKey is the secret key that was added.","type":"string"}}},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## Delete Secret Key

> Deletes a secret key from the project

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/secret-keys/{key}":{"delete":{"description":"Deletes a secret key from the project","tags":["secret-keys"],"summary":"Delete Secret Key","parameters":[{"schema":{"type":"string"},"description":"the key to delete","name":"key","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.GetSecretKeysResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.GetSecretKeysResponse":{"type":"object","properties":{"alternateSecretKeys":{"description":"AlternateSecretKeys are additional secret keys that can be used for an account.","type":"array","items":{"type":"string"}},"defaultSecretKey":{"description":"DefaultSecretKey is the default secret key for the account.","type":"string"},"names":{"description":"Names are the names of the secret keys that can be used for an account.\nindex 0 is the default secret key, index 1+ are alternate secret key names","type":"array","items":{"type":"string"}}}},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## POST /secret-keys/{key}/default

> Set Default Secret Key

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/secret-keys/{key}/default":{"post":{"tags":["secret-keys"],"summary":"Set Default Secret Key","parameters":[{"schema":{"type":"string"},"description":"the secret key to set as default","name":"key","in":"path","required":true}],"responses":{"204":{"description":"Set default request processed, no content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/cli-and-api/api/secret-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
