PLATINUM DOCS
ApiSecrets

POST /v1/secrets/bindings

POST
/v1/secrets/bindings

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Authorize one sandbox to spend one secret. Requires the secrets:use scope. Name the secret with EITHER secret_id (its id) OR secret (its name); at least one is required. For a set you re-send on every deploy, prefer PUT /v1/sandboxes/{id}/secrets: it diffs against what is attached instead of making the caller compute the difference.

Authorize one sandbox to spend one secret. Requires the secrets:use scope. Name the secret with EITHER secret_id (its id) OR secret (its name); at least one is required. For a set you re-send on every deploy, prefer PUT /v1/sandboxes/{id}/secrets: it diffs against what is attached instead of making the caller compute the difference.

Response Body

application/json

curl -X POST "https://example.com/v1/secrets/bindings" \  -H "Content-Type: application/json" \  -d '{    "sandbox_id": "string",    "alias": "string",    "secret_id": "string"  }'
{  "id": "string",  "sandbox_id": "string",  "secret_id": "string",  "alias": "string",  "env_name": "string",  "header": "string",  "created_at": "string",  "revoked_at": "string"}
Empty