Update Vault Integration
curl --request PUT \
--url https://api.example.com/vault-integrations/{id} \
--header 'Content-Type: application/json' \
--data '
{
"secretId": "<string>"
}
'import requests
url = "https://api.example.com/vault-integrations/{id}"
payload = { "secretId": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({secretId: '<string>'})
};
fetch('https://api.example.com/vault-integrations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/vault-integrations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'secretId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/vault-integrations/{id}"
payload := strings.NewReader("{\n \"secretId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/vault-integrations/{id}")
.header("Content-Type", "application/json")
.body("{\n \"secretId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/vault-integrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"secretId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"address": "<string>",
"namespace": "<string>",
"authMethod": "<string>",
"roleId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}Credentials & Vault
Update Vault Integration
Rotate the AppRole secret_id on a registered vault integration. The vault address is immutable.
PUT
/
vault-integrations
/
{id}
Update Vault Integration
curl --request PUT \
--url https://api.example.com/vault-integrations/{id} \
--header 'Content-Type: application/json' \
--data '
{
"secretId": "<string>"
}
'import requests
url = "https://api.example.com/vault-integrations/{id}"
payload = { "secretId": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({secretId: '<string>'})
};
fetch('https://api.example.com/vault-integrations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/vault-integrations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'secretId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/vault-integrations/{id}"
payload := strings.NewReader("{\n \"secretId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/vault-integrations/{id}")
.header("Content-Type", "application/json")
.body("{\n \"secretId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/vault-integrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"secretId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"address": "<string>",
"namespace": "<string>",
"authMethod": "<string>",
"roleId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}Overview
Rotates the stored AppRolesecret_id for an integration. Use this after rotating the AppRole in Vault itself. The vault address, namespace, and role ID cannot be changed — delete and recreate the integration to change them. Rotations take effect immediately; in-flight authenticate actions that have already acquired a token are unaffected.
Path Parameters
string
required
Integration ID (UUID).
Body
string
New AppRole
secret_id. Stored encrypted at rest.Example Request
curl -X PUT "https://api.scrapengine.io/api/v1/vault-integrations/5f8c6a74-5f2e-4f5a-9e58-5b9c3c7d2a11" \
-H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"secretId": "s.yyyyyyyyyyyyyyyyyyyyyyyy"
}'
const response = await fetch(
"https://api.scrapengine.io/api/v1/vault-integrations/5f8c6a74-5f2e-4f5a-9e58-5b9c3c7d2a11",
{
method: "PUT",
headers: {
"Authorization": `Bearer ${process.env.SCRAPENGINE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ secretId: process.env.VAULT_SECRET_ID }),
},
);
const data = await response.json();
Response
Success Response (200)
string
Integration ID (UUID).
string
Human-readable name.
string
Backend type. Always
hashicorp in v1.string
Vault address.
string
Vault Enterprise namespace, or
null if unset.string
Auth method. Always
approle in v1.string
AppRole role_id.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp. Bumped on a successful rotation.
{
"id": "5f8c6a74-5f2e-4f5a-9e58-5b9c3c7d2a11",
"name": "prod-vault",
"type": "hashicorp",
"address": "https://vault.prod.example.com:8200",
"namespace": null,
"authMethod": "approle",
"roleId": "8f2e1c0c-0e4a-4b58-8b2e-4a9e1c8a4a11",
"createdAt": "2026-04-20T11:05:02Z",
"updatedAt": "2026-04-24T09:18:11Z"
}
Error Responses
| Status | Description |
|---|---|
400 | Invalid body — for example empty secretId. |
401 | Unauthorized — invalid or missing API key. |
404 | Integration not found or not owned by the caller. |
Was this page helpful?