curl --request POST \
--url https://v1.api.altostrat.io/workflows/vault \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "My App's API Token",
"secret": "sec_abc123def456",
"expires_at": "2026-10-31T10:00:00Z"
}
EOFimport requests
url = "https://v1.api.altostrat.io/workflows/vault"
payload = {
"name": "My App's API Token",
"secret": "sec_abc123def456",
"expires_at": "2026-10-31T10:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My App\'s API Token',
secret: 'sec_abc123def456',
expires_at: '2026-10-31T10:00:00Z'
})
};
fetch('https://v1.api.altostrat.io/workflows/vault', 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://v1.api.altostrat.io/workflows/vault",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My App\'s API Token',
'secret' => 'sec_abc123def456',
'expires_at' => '2026-10-31T10:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://v1.api.altostrat.io/workflows/vault"
payload := strings.NewReader("{\n \"name\": \"My App's API Token\",\n \"secret\": \"sec_abc123def456\",\n \"expires_at\": \"2026-10-31T10:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://v1.api.altostrat.io/workflows/vault")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My App's API Token\",\n \"secret\": \"sec_abc123def456\",\n \"expires_at\": \"2026-10-31T10:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/workflows/vault")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My App's API Token\",\n \"secret\": \"sec_abc123def456\",\n \"expires_at\": \"2026-10-31T10:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "vlt_01h3j4k5l6m7n8p9q0r1s2t3u4",
"name": "External Service API Key",
"created_at": "2025-10-31T10:00:00.000000Z",
"expires_at": "2026-10-31T10:00:00.000000Z"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Create a vault item
Creates a new item in the vault for storing sensitive information like API keys or passwords. The secret value is encrypted at rest and can only be used by workflows.
curl --request POST \
--url https://v1.api.altostrat.io/workflows/vault \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "My App's API Token",
"secret": "sec_abc123def456",
"expires_at": "2026-10-31T10:00:00Z"
}
EOFimport requests
url = "https://v1.api.altostrat.io/workflows/vault"
payload = {
"name": "My App's API Token",
"secret": "sec_abc123def456",
"expires_at": "2026-10-31T10:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My App\'s API Token',
secret: 'sec_abc123def456',
expires_at: '2026-10-31T10:00:00Z'
})
};
fetch('https://v1.api.altostrat.io/workflows/vault', 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://v1.api.altostrat.io/workflows/vault",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My App\'s API Token',
'secret' => 'sec_abc123def456',
'expires_at' => '2026-10-31T10:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://v1.api.altostrat.io/workflows/vault"
payload := strings.NewReader("{\n \"name\": \"My App's API Token\",\n \"secret\": \"sec_abc123def456\",\n \"expires_at\": \"2026-10-31T10:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://v1.api.altostrat.io/workflows/vault")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My App's API Token\",\n \"secret\": \"sec_abc123def456\",\n \"expires_at\": \"2026-10-31T10:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/workflows/vault")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My App's API Token\",\n \"secret\": \"sec_abc123def456\",\n \"expires_at\": \"2026-10-31T10:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "vlt_01h3j4k5l6m7n8p9q0r1s2t3u4",
"name": "External Service API Key",
"created_at": "2025-10-31T10:00:00.000000Z",
"expires_at": "2026-10-31T10:00:00.000000Z"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Authorizations
Standard JWT for user sessions obtained via Altostrat authentication.
Body
A descriptive name for the secret. To generate an API Key, prefix the name with api-key:.
"My App's API Token"
The secret value to store. This field should be omitted when creating an API key.
"sec_abc123def456"
An optional expiration date for the secret.
"2026-10-31T10:00:00Z"
Response
The vault item was created successfully.
The unique prefixed identifier for the vault item.
"vlt_01h3j4k5l6m7n8p9q0r1s2t3u4"
The name of the vault item. For API keys, use the api-key: prefix.
"External Service API Key"
The timestamp when the item was created.
"2025-10-31T10:00:00.000000Z"
The timestamp when the item expires and can no longer be used.
"2026-10-31T10:00:00.000000Z"
Was this page helpful?