curl -X PUT "https://app.runtm.com/api/cloud/organizations/org_abc123/provider-keys/anthropic" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-ant-api03-org-key-here",
"policy": "enforced"
}'
import requests
org_id = "org_abc123"
provider = "anthropic"
resp = requests.put(
f"https://app.runtm.com/api/cloud/organizations/{org_id}/provider-keys/{provider}",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": org_id,
"Content-Type": "application/json",
},
json={
"api_key": "sk-ant-api03-org-key-here",
"policy": "enforced",
},
)
print(resp.json())
const orgId = "org_abc123";
const provider = "anthropic";
const resp = await fetch(
`https://app.runtm.com/api/cloud/organizations/${orgId}/provider-keys/${provider}`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": orgId,
"Content-Type": "application/json",
},
body: JSON.stringify({
api_key: "sk-ant-api03-org-key-here",
policy: "enforced",
}),
}
);
const data = await resp.json();
{
"provider": "anthropic",
"connected": true,
"key_preview": "sk-ant-...here",
"updated_at": "2026-05-09T18:00:00Z"
}
Org Keys
Set Org Provider Key
Store or replace a provider API key for an organization.
PUT
/
api
/
organizations
/
{org_id}
/
provider-keys
/
{provider}
curl -X PUT "https://app.runtm.com/api/cloud/organizations/org_abc123/provider-keys/anthropic" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-ant-api03-org-key-here",
"policy": "enforced"
}'
import requests
org_id = "org_abc123"
provider = "anthropic"
resp = requests.put(
f"https://app.runtm.com/api/cloud/organizations/{org_id}/provider-keys/{provider}",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": org_id,
"Content-Type": "application/json",
},
json={
"api_key": "sk-ant-api03-org-key-here",
"policy": "enforced",
},
)
print(resp.json())
const orgId = "org_abc123";
const provider = "anthropic";
const resp = await fetch(
`https://app.runtm.com/api/cloud/organizations/${orgId}/provider-keys/${provider}`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": orgId,
"Content-Type": "application/json",
},
body: JSON.stringify({
api_key: "sk-ant-api03-org-key-here",
policy: "enforced",
}),
}
);
const data = await resp.json();
{
"provider": "anthropic",
"connected": true,
"key_preview": "sk-ant-...here",
"updated_at": "2026-05-09T18:00:00Z"
}
Stores a provider API key at the organization level. If a key already exists for this provider, it is replaced. The
policy field controls whether this key is enforced for all members or offered as an optional fallback.
Required scope: integrations:write
The
X-Organization-Id header must match the org_id path parameter.string
required
The organization ID.
string
required
The provider name. One of:
anthropic, openai, cursor, devin, gemini, copilot.string
required
Bearer token.
Authorization: Bearer runtm_xxxstring
required
Must match the
org_id path parameter.string
required
The provider API key. Minimum 8 characters.
string
required
Key policy.
enforced overrides user keys; optional serves as a fallback.string
The provider name.
boolean
Always
true after a successful set.string
Masked key preview.
string
ISO 8601 timestamp of the update.
curl -X PUT "https://app.runtm.com/api/cloud/organizations/org_abc123/provider-keys/anthropic" \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-ant-api03-org-key-here",
"policy": "enforced"
}'
import requests
org_id = "org_abc123"
provider = "anthropic"
resp = requests.put(
f"https://app.runtm.com/api/cloud/organizations/{org_id}/provider-keys/{provider}",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": org_id,
"Content-Type": "application/json",
},
json={
"api_key": "sk-ant-api03-org-key-here",
"policy": "enforced",
},
)
print(resp.json())
const orgId = "org_abc123";
const provider = "anthropic";
const resp = await fetch(
`https://app.runtm.com/api/cloud/organizations/${orgId}/provider-keys/${provider}`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": orgId,
"Content-Type": "application/json",
},
body: JSON.stringify({
api_key: "sk-ant-api03-org-key-here",
policy: "enforced",
}),
}
);
const data = await resp.json();
{
"provider": "anthropic",
"connected": true,
"key_preview": "sk-ant-...here",
"updated_at": "2026-05-09T18:00:00Z"
}