Update API key
PUT /api/api-keys/{id}
Rename an active API key belonging to the authenticated user
Authentication
- Option 1:
x-api-key: YOUR_API_KEY(header). API key for authentication. Create one in your dashboard. - Option 2:
Authorization: Bearer YOUR_ACCESS_TOKEN. Dashboard JWT in Authorization: Bearer <token>, only on operations that explicitly list this scheme. Prefer x-api-key for REST integrations. OAuth for hosted MCP is a separate connection at https://mcp.zvid.io/mcp.
Create API keys at app.zvid.io/api-keys. Keep credentials on your server.
Parameters
| Parameter | Location | Type | Required | Description and constraints |
|---|---|---|---|---|
id | path | integer | Yes | API key ID |
Request
The shell examples read credentials from ZVID_API_KEY (or ZVID_ACCESS_TOKEN for Bearer authentication). Set that variable in your environment. Replace sample project, template, job, and asset identifiers with values from your own account.
A request body is required.
application/json
Required properties: name.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
body.name | string | Yes | New name for the API key Minimum length: 1. Maximum length: 100. |
Request example: Example
curl --request PUT 'https://api.zvid.io/api/api-keys/789' \
--header "x-api-key: $ZVID_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"name": "Updated automation"
}'
Responses
HTTP 200
API key updated successfully
Content type: application/json.
Unknown properties are rejected. Required properties: success, message.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
response.success | boolean | Yes | |
response.message | string | Yes |
HTTP 400
Invalid ID, validation error, duplicate name, API key not found, or operation failed
Content type: application/json.
Exactly one of the listed alternatives must match.
oneOf alternative 1
Schema: ValidationError.
oneOf alternative 2
Schema: Error.
HTTP 401
Unauthorized
Content type: application/json.
Unknown properties are rejected. Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
response.error | string | Yes | Error type |
response.message | string | No | Human-readable error message |
Schema definitions
The following definitions describe the fields referenced above. Expand a definition to inspect its complete contract.
ValidationError
Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
ValidationError.error | string | Yes | |
ValidationError.message | string | No | |
ValidationError.details | array of object | No | |
ValidationError.planLimits | object | No | Present on render validation errors; contains the authenticated user's current render limits. |
Nested field: ValidationError.details
Array item: ValidationError.details[]
Unknown properties are rejected. Required properties: field, message.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
ValidationError.details[].field | string | Yes | |
ValidationError.details[].message | string | Yes |
Error
Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
Error.error | string | Yes | Error type |
Error.message | string | No | Human-readable error message |
AuthenticationError
Unknown properties are rejected. Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
AuthenticationError.error | string | Yes | Error type |
AuthenticationError.message | string | No | Human-readable error message |