Enter or rotate the platform credential of a Provider
PUT /v1/platform/credentials/{provider}
| Property | Value |
|---|---|
| Operation | put_platform_credential |
| Group | Platform |
| Scope | platform:write |
| Route class | control |
| Idempotency | No Idempotency-Key |
| Audit | Audited platform.credential.put (mutation) |
| Released in | 1.10.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Seals the secret as the Provider's next credential version and revokes every active one, so the Provider's key pool holds this member alone (1.28.0; before it, the one active version). The request body is never logged, never stored in clear and never returned; the response and the Audit event name the Provider and the version only. A Provider whose descriptors declare no credential mode is refused with validation_failed. Running Sessions keep the secret they were issued.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the platform:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X PUT "$VOCAL_API/v1/platform/credentials/mock" \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "secret": "<secret>" }'const response = await fetch(`${process.env.VOCAL_API}/v1/platform/credentials/mock`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"secret": "<secret>"
}),
});
console.log(response.status, await response.text());import os
import requests
response = requests.put(
f"{os.environ['VOCAL_API']}/v1/platform/credentials/mock",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
json={
"secret": "<secret>",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | ProviderId | yes | A Provider: a vendor or in-process model behind a stage. The provider catalog says which stages each serves and whether it is available. From 1.38.0 openai is deprecated (workspace ADR 0085): its descriptors read deprecated, a deprecated Provider still resolves, and the id is kept until a major release; deepseek is new. From 1.53.0 amazon_titan serves embeddings, reserved until its adapter is built. |
Request body
Content type application/json, required: PlatformCredentialPutRequest.
| Field | Type | Required | Description |
|---|---|---|---|
label | string | no | An operator note. |
max_concurrent_sessions | MaxConcurrentSessions | no | The member's cap on concurrent Sessions (1.28.0); absent for no cap. |
secret | string (password) | yes | The vendor key, sent once. The api seals it, never logs it and never returns it. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | PlatformCredential | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
422 | application/json | ErrorEnvelope | validation_failed |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is PlatformCredential.
| Field | Type | Required | Description |
|---|---|---|---|
account | VendorAccountUsage | no | The last reading the api took of the vendor account behind the member (1.40.0): its status, the units used and allowed and the plan's tier. Absent when the api has taken none, when the vendor has no account request, or from an api older than 1.40.0. A member whose key authenticates can still read exhausted. |
active_sessions | integer | no | The Sessions whose unreleased reservations name the member as the first entry of a stage, across Organizations, when the api answered (1.28.0); a count only. The api from 1.28.0 always sends it. |
created_at | Timestamp | yes | |
created_by | ActorRef | yes | |
enabled | boolean | no | Whether admission may choose the member (1.28.0); a disabled member keeps its secret, serves no new Session and leaves running Sessions on it. The api from 1.28.0 always sends it, and a reader treats its absence as true. |
hint | string | yes | The last four characters of the secret, to tell keys apart; never more. |
id | PlatformCredentialId | no | The member's id (1.28.0), the key id the Session configuration and the trace name. The api from 1.28.0 always sends it. |
label | string or null | yes | An operator note, or null. |
max_concurrent_sessions | MaxConcurrentSessions or null | no | The member's cap on concurrent Sessions (1.28.0), or null for no cap. The api from 1.28.0 always sends it, and a reader treats its absence as null. |
object | "platform_credential" | yes | |
provider | ProviderId | yes | |
revision | integer | no | Counts the member's changes from 1 (1.28.0); PATCH takes it in If-Match. The api from 1.28.0 always sends it. |
revoked_at | Timestamp or null | yes | Null while the version is active. |
status | PlatformCredentialStatus | yes | |
version | integer | yes | Counts the Provider's credential entries from 1. |