curl -X POST https://app.runtm.com/api/knowledge/integrations/ki_01J...:rotate \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"auth_method": "service_account",
"credentials": {
"service_account_json": "{...new key...}"
}
}'
import requests
integration_id = "ki_01J..."
resp = requests.post(
f"https://app.runtm.com/api/knowledge/integrations/{integration_id}:rotate",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"auth_method": "service_account",
"credentials": {"service_account_json": "{...new key...}"},
},
)
print(resp.json())
const integrationId = "ki_01J...";
const resp = await fetch(
`https://app.runtm.com/api/knowledge/integrations/${integrationId}:rotate`,
{
method: "POST",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
auth_method: "service_account",
credentials: { service_account_json: "{...new key...}" },
}),
}
);
const data = await resp.json();
{
"integration": {
"id": "ki_01J...",
"organization_id": "org_abc123",
"user_id": null,
"provider": "bigquery",
"auth_method": "service_account",
"display_name": "Production warehouse",
"status": "active",
"has_credentials": true,
"has_oauth_refresh": false,
"oauth_access_expires_at": null,
"provider_metadata": { "project_id": "my-gcp-project" },
"default_mode": "ask",
"tool_permissions": {},
"connected_by_user_id": "usr_xyz",
"last_used_at": null,
"created_at": "2026-04-20T09:30:00Z",
"updated_at": "2026-05-09T19:00:00Z"
}
}
Knowledge
Rotate Credentials
Replace the credentials on a knowledge integration.
POST
/
api
/
knowledge
/
integrations
/
{integration_id}
:rotate
curl -X POST https://app.runtm.com/api/knowledge/integrations/ki_01J...:rotate \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"auth_method": "service_account",
"credentials": {
"service_account_json": "{...new key...}"
}
}'
import requests
integration_id = "ki_01J..."
resp = requests.post(
f"https://app.runtm.com/api/knowledge/integrations/{integration_id}:rotate",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"auth_method": "service_account",
"credentials": {"service_account_json": "{...new key...}"},
},
)
print(resp.json())
const integrationId = "ki_01J...";
const resp = await fetch(
`https://app.runtm.com/api/knowledge/integrations/${integrationId}:rotate`,
{
method: "POST",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
auth_method: "service_account",
credentials: { service_account_json: "{...new key...}" },
}),
}
);
const data = await resp.json();
{
"integration": {
"id": "ki_01J...",
"organization_id": "org_abc123",
"user_id": null,
"provider": "bigquery",
"auth_method": "service_account",
"display_name": "Production warehouse",
"status": "active",
"has_credentials": true,
"has_oauth_refresh": false,
"oauth_access_expires_at": null,
"provider_metadata": { "project_id": "my-gcp-project" },
"default_mode": "ask",
"tool_permissions": {},
"connected_by_user_id": "usr_xyz",
"last_used_at": null,
"created_at": "2026-04-20T09:30:00Z",
"updated_at": "2026-05-09T19:00:00Z"
}
}
Replaces the stored credentials for a static-auth knowledge integration.
You can optionally switch to a different auth method on the same provider in the same call.
For OAuth-connected integrations, re-run the OAuth Install flow instead.
Required scope:
integrations:write
Requires organization context via the
X-Organization-Id header.string
required
The integration whose credentials to rotate.
string
required
The organization the integration belongs to.
string
required
Auth method identifier. Must be a valid static method for this provider.
object
required
New credential payload matching the auth method’s
credential_schema. Never returned in responses.object
Optional replacement provider-specific configuration.
KnowledgeIntegrationResource
required
The updated integration resource. See List for the full resource shape.
curl -X POST https://app.runtm.com/api/knowledge/integrations/ki_01J...:rotate \
-H "Authorization: Bearer runtm_xxx" \
-H "X-Organization-Id: org_abc123" \
-H "Content-Type: application/json" \
-d '{
"auth_method": "service_account",
"credentials": {
"service_account_json": "{...new key...}"
}
}'
import requests
integration_id = "ki_01J..."
resp = requests.post(
f"https://app.runtm.com/api/knowledge/integrations/{integration_id}:rotate",
headers={
"Authorization": "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
json={
"auth_method": "service_account",
"credentials": {"service_account_json": "{...new key...}"},
},
)
print(resp.json())
const integrationId = "ki_01J...";
const resp = await fetch(
`https://app.runtm.com/api/knowledge/integrations/${integrationId}:rotate`,
{
method: "POST",
headers: {
Authorization: "Bearer runtm_xxx",
"X-Organization-Id": "org_abc123",
"Content-Type": "application/json",
},
body: JSON.stringify({
auth_method: "service_account",
credentials: { service_account_json: "{...new key...}" },
}),
}
);
const data = await resp.json();
{
"integration": {
"id": "ki_01J...",
"organization_id": "org_abc123",
"user_id": null,
"provider": "bigquery",
"auth_method": "service_account",
"display_name": "Production warehouse",
"status": "active",
"has_credentials": true,
"has_oauth_refresh": false,
"oauth_access_expires_at": null,
"provider_metadata": { "project_id": "my-gcp-project" },
"default_mode": "ask",
"tool_permissions": {},
"connected_by_user_id": "usr_xyz",
"last_used_at": null,
"created_at": "2026-04-20T09:30:00Z",
"updated_at": "2026-05-09T19:00:00Z"
}
}