Update one Provider API-key configuration or rotate its credential
Generated from the checked-in source. Do not edit this reference by hand.
PUT /api/v1/vendors/{id}
Adapter is immutable. Changes affect new requests; already dispatched work can finish using its original configuration. Requires installation administration or an explicitly granted platform administrator. Each configuration has independent credentials and model bindings. Credentials are write-only and never returned.
Operation: updateVendor.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "bearerAuth": [] }]HTTP request
Section titled “HTTP request”Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.
curl --fail-with-body -X PUT "$NIU_ORIGIN/api/v1/vendors/{id}" \ -H "Authorization: Bearer $NIU_BEARER_TOKEN" \ -H 'Content-Type: application/json' \ --data @request.jsonParameters
Section titled “Parameters”Location: path. Required.
{ "type": "string", "format": "uuid"}Request body
Section titled “Request body”application/json
Section titled “application/json”Required.
{ "type": "object", "additionalProperties": false, "required": [ "name", "api_base", "enabled", "expected_revision" ], "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "api_base": { "type": "string", "format": "uri", "maxLength": 2048 }, "api_key": { "type": "string", "writeOnly": true, "minLength": 1, "maxLength": 8192, "description": "Omit to retain the current credential." }, "enabled": { "type": "boolean" }, "expected_revision": { "type": "integer", "minimum": 1 } }}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Updated vendor metadata wrapped in data.
Content type: application/json.
{ "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "additionalProperties": false, "required": [ "id", "name", "adapter", "api_base", "enabled", "revision", "has_credential" ], "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "adapter": { "type": "string", "enum": [ "openrouter", "openai", "anthropic", "gemini", "ark" ] }, "api_base": { "type": "string", "format": "uri" }, "enabled": { "type": "boolean" }, "revision": { "type": "integer", "minimum": 1 }, "has_credential": { "type": "boolean" }, "owner_funded": { "type": "boolean", "readOnly": true, "description": "Configuration-list metadata identifying a private credential owned by one account. Not accepted in configuration writes." }, "supplier": { "type": [ "object", "null" ], "description": "Provider ownership on configuration-list reads; credentials and commercial data are excluded.", "required": [ "id", "name" ], "additionalProperties": false, "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" } } } } } }}HTTP 400
Section titled “HTTP 400”Invalid configuration or credential.
HTTP 401
Section titled “HTTP 401”Invalid or expired administrative credential.
HTTP 403
Section titled “HTTP 403”Platform administration permission required.
HTTP 404
Section titled “HTTP 404”Vendor does not exist.
HTTP 409
Section titled “HTTP 409”Stale revision or conflicting name.
Behavior and supported scope
Section titled “Behavior and supported scope”Adapter is immutable. Changes affect new requests; already dispatched work can finish using its original configuration. Requires installation administration or an explicitly granted platform administrator. Each configuration has independent credentials and model bindings. Credentials are write-only and never returned.
Supported scope: implemented