> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookpulse.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Secret Value

> Update the value of an existing system secret in the vault

Update the value of an existing system secret in the vault.

## Base URL

All API requests should be made to:

```
https://api.hookpulse.io
```

## Example request

```bash cURL theme={null}
curl -X POST https://api.hookpulse.io/v1/api/update_secret_value/ \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "secret_uuid": "{{secret_uuid}}",
    "secret_updated_value": "{{secret_updated_value}}"
  }'
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.hookpulse.io/v1/api/update_secret_value/', {
  method: 'POST',
  headers: {
    'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
    'x-brand-uuid': '{{x-brand-uuid}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    secret_uuid: '{{secret_uuid}}',
    secret_updated_value: '{{secret_updated_value}}'
  })
});

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

url = 'https://api.hookpulse.io/v1/api/update_secret_value/'
headers = {
    'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
    'x-brand-uuid': '{{x-brand-uuid}}',
    'Content-Type': 'application/json'
}
payload = {
    'secret_uuid': '{{secret_uuid}}',
    'secret_updated_value': '{{secret_updated_value}}'
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

```ruby Ruby theme={null}
require 'net/http'
require 'json'
require 'uri'

uri = URI('https://api.hookpulse.io/v1/api/update_secret_value/')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri.path)
request['x-hookpulse-api-key'] = '{{x-hookpulse-api-key}}'
request['x-brand-uuid'] = '{{x-brand-uuid}}'
request['Content-Type'] = 'application/json'
request.body = {
  secret_uuid: '{{secret_uuid}}',
  secret_updated_value: '{{secret_updated_value}}'
}.to_json

response = http.request(request)
puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$url = 'https://api.hookpulse.io/v1/api/update_secret_value/';
$data = [
    'secret_uuid' => '{{secret_uuid}}',
    'secret_updated_value' => '{{secret_updated_value}}'
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-hookpulse-api-key: {{x-hookpulse-api-key}}',
    'x-brand-uuid: {{x-brand-uuid}}',
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
```

## Request body

| Field | Type | Required | Description |
| - | - | - | - |
| `secret_uuid` | string | Yes | UUID of the secret to update |
| `secret_updated_value` | string | Yes | New value for the secret |

## Example response

```json theme={null}
{
  "success": true,
  "details": "Value updated"
}
```

## Response fields

| Field | Type | Description |
| - | - | - |
| `success` | boolean | Indicates if the request was successful |
| `details` | string | Success message |


## OpenAPI

````yaml POST /v1/api/update_secret_value/
openapi: 3.0.3
info:
  title: Hookpulse API
  description: >-
    Complete API documentation for Hookpulse. Build powerful integrations with
    our RESTful API.
  version: 1.0.0
  contact:
    name: Hookpulse Support
    email: care@hookpulse.io
    url: https://hookpulse.io
servers:
  - url: https://api.hookpulse.io
    description: Production server
security:
  - apiKeyAuth: []
    brandUuidAuth: []
paths:
  /v1/api/update_secret_value/:
    post:
      description: Update the value of an existing system secret in the vault
      requestBody:
        description: Secret update configuration
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSecretValueRequest'
      responses:
        '200':
          description: Secret value updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSecretValueResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateSecretValueRequest:
      required:
        - secret_uuid
        - secret_updated_value
      type: object
      properties:
        secret_uuid:
          type: string
          description: UUID of the secret to update
        secret_updated_value:
          type: string
          description: New value for the secret
    UpdateSecretValueResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        details:
          type: string
          description: Success message
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-hookpulse-api-key
      description: >-
        API key for authentication. Get this from your dashboard by selecting a
        brand and going to API Keys section.
    brandUuidAuth:
      type: apiKey
      in: header
      name: x-brand-uuid
      description: >-
        Brand UUID for authentication. Get this from your dashboard after adding
        a brand - it will be displayed in the UI.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.