{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Add a secret to a Worker script by creating a new version with that secret.\n\nWhen changing more than one secret at a time, prefer the \"Patch multiple\nscript secrets\" API instead of changing many secrets individually.\n","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/workers_identifier"},"script_name":{"$ref":"#/definitions/workers_script_name"}},"required":["account_id","script_name"],"additionalProperties":false},"body":{"$ref":"#/definitions/workers_secret"}},"required":["path","body"],"additionalProperties":false,"definitions":{"workers_identifier":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"workers_script_name":{"description":"Name of the script.","type":"string","pattern":"^[a-z0-9_][a-z0-9-_]*$","examples":["this-is_my_script-01"]},"workers_secret":{"description":"A secret value accessible through a binding.","type":"object","oneOf":[{"$ref":"#/definitions/workers_binding_kind_secret_text"},{"$ref":"#/definitions/workers_binding_kind_secret_key"}]},"workers_binding_kind_secret_text":{"type":"object","properties":{"name":{"$ref":"#/definitions/workers_binding_name"},"text":{"description":"The secret value to use.","type":"string","examples":["My secret."]},"type":{"description":"The kind of resource that the binding provides.","type":"string","enum":["secret_text"]}},"required":["name","type","text"]},"workers_binding_kind_secret_key":{"type":"object","properties":{"algorithm":{"description":"Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm).","type":"object"},"format":{"description":"Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).","type":"string","enum":["raw","pkcs8","spki","jwk"],"examples":["raw"]},"key_base64":{"description":"Base64-encoded key data. Required if `format` is \"raw\", \"pkcs8\", or \"spki\".","type":"string"},"key_jwk":{"description":"Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is \"jwk\".","type":"object"},"name":{"$ref":"#/definitions/workers_binding_name"},"type":{"description":"The kind of resource that the binding provides.","type":"string","enum":["secret_key"]},"usages":{"description":"Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).","type":"array","items":{"enum":["encrypt","decrypt","sign","verify","deriveKey","deriveBits","wrapKey","unwrapKey"],"type":"string"},"examples":[["encrypt","decrypt"]]}},"required":["name","type","format","algorithm","usages"]},"workers_binding_name":{"description":"A JavaScript variable name for the binding.","type":"string","examples":["myBinding"]}}},"name":"Add a secret to a Worker script","id":"cloudflare.worker-put-script-secret","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353","script_name":"this-is_my_script-01"},"body":{"name":"myBinding","type":"secret_text","text":"My secret."}},"maxRequests":1,"summary":false}}