curl -X PUT "https://app.runtm.com/api/cloud/secrets/personal" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"secrets": [
{
"name": "OPENAI_API_KEY",
"value": "sk-proj-abc123...",
"description": "OpenAI API key for GPT models"
}
]
}'
import requests
response = requests.put(
"https://app.runtm.com/api/cloud/secrets/personal",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={
"secrets": [
{
"name": "OPENAI_API_KEY",
"value": "sk-proj-abc123...",
"description": "OpenAI API key for GPT models",
}
]
},
)
data = response.json()
print(f"Set {data['count']} secrets")
const response = await fetch(
"https://app.runtm.com/api/cloud/secrets/personal",
{
method: "PUT",
headers: {
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
secrets: [
{
name: "OPENAI_API_KEY",
value: "sk-proj-abc123...",
description: "OpenAI API key for GPT models",
},
],
}),
}
);
const data = await response.json();
console.log(`Set ${data.count} secrets`);
{
"status": "ok",
"count": 1
}
Personal
Set Personal Secret
Create or update personal secrets
PUT
/
api
/
secrets
/
personal
curl -X PUT "https://app.runtm.com/api/cloud/secrets/personal" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"secrets": [
{
"name": "OPENAI_API_KEY",
"value": "sk-proj-abc123...",
"description": "OpenAI API key for GPT models"
}
]
}'
import requests
response = requests.put(
"https://app.runtm.com/api/cloud/secrets/personal",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={
"secrets": [
{
"name": "OPENAI_API_KEY",
"value": "sk-proj-abc123...",
"description": "OpenAI API key for GPT models",
}
]
},
)
data = response.json()
print(f"Set {data['count']} secrets")
const response = await fetch(
"https://app.runtm.com/api/cloud/secrets/personal",
{
method: "PUT",
headers: {
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
secrets: [
{
name: "OPENAI_API_KEY",
value: "sk-proj-abc123...",
description: "OpenAI API key for GPT models",
},
],
}),
}
);
const data = await response.json();
console.log(`Set ${data.count} secrets`);
{
"status": "ok",
"count": 1
}
Bulk upserts personal secrets. Values are encrypted before storage and can never be read back - this is a write-only operation. Existing secrets with the same name are overwritten.
Required scope:
secrets:write
Headers
Body
Response
curl -X PUT "https://app.runtm.com/api/cloud/secrets/personal" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"secrets": [
{
"name": "OPENAI_API_KEY",
"value": "sk-proj-abc123...",
"description": "OpenAI API key for GPT models"
}
]
}'
import requests
response = requests.put(
"https://app.runtm.com/api/cloud/secrets/personal",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={
"secrets": [
{
"name": "OPENAI_API_KEY",
"value": "sk-proj-abc123...",
"description": "OpenAI API key for GPT models",
}
]
},
)
data = response.json()
print(f"Set {data['count']} secrets")
const response = await fetch(
"https://app.runtm.com/api/cloud/secrets/personal",
{
method: "PUT",
headers: {
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
secrets: [
{
name: "OPENAI_API_KEY",
value: "sk-proj-abc123...",
description: "OpenAI API key for GPT models",
},
],
}),
}
);
const data = await response.json();
console.log(`Set ${data.count} secrets`);
{
"status": "ok",
"count": 1
}