Check the Organization's credential for a Provider with the vendor
POST /v1/provider-credentials/{provider}/verify
| Property | Value |
|---|---|
| Operation | verify_provider_credential |
| Group | Providers and credentials |
| Scope | credentials:write |
| Route class | control |
| Idempotency | Idempotency-Key accepted: a retry with the same key replays the first answer |
| Audit | Audited provider_credential.verify (mutation) |
| Released in | 1.41.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Asks the vendor whether it accepts the Organization's active key for the Provider and, where the vendor offers an account request, what the account behind it can serve, as the check at entry does (1.41.0, boards #121 and #135). A key the vendor refuses answers 200 with ok false and account null, and the check changes nothing else; a vendor that does not answer is dependency_unavailable. When the check reads the account, the api stores the reading as the credential's account in the transaction of the Audit event; a refused key or a failed account request leaves the stored account as it was. The secret is never returned, logged or written to the Audit event, which names the Provider, the version and the outcome. not_found when the Organization has no active credential for the Provider. The check never revokes the credential. Session only: the api refuses the route to every API key, whatever its scopes, and accepts a Member ID token with credentials:write.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the credentials:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X POST "$VOCAL_API/v1/provider-credentials/mock/verify" \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"const response = await fetch(`${process.env.VOCAL_API}/v1/provider-credentials/mock/verify`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
},
});
console.log(response.status, await response.text());import os
import uuid
import requests
response = requests.post(
f"{os.environ['VOCAL_API']}/v1/provider-credentials/mock/verify",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
)
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. |
idempotency-key | header | string | no | A client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | CredentialVerifyResult | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden, org_suspended |
404 | application/json | ErrorEnvelope | not_found |
409 | application/json | ErrorEnvelope | idempotency_in_progress, idempotency_key_reused |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
503 | application/json | ErrorEnvelope | dependency_unavailable |
Fields of the 200 answer
The shape is CredentialVerifyResult.
| Field | Type | Required | Description |
|---|---|---|---|
account | VendorAccountUsage or null | yes | The account reading the check took; null when the key was refused, when the vendor has no account request or when the account request failed. |
checked_at | Timestamp | yes | When the api asked the vendor. |
ok | boolean | yes | True when the vendor accepted the key. It says nothing about quota: read account.status for that. |