# Rename a vendor credential (/docs/api/access/credentials_update)

Set or clear the label of a stored key. The secret is not touched.

`PUT /v1/credentials/{provider}/label`

```json
{
  "operationId": "credentials_update",
  "summary": "Rename a vendor credential",
  "description": "Set or clear the label of a stored key. The secret is not touched.",
  "tags": [
    "credentials"
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
      },
      "required": true,
      "name": "provider",
      "in": "path"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "slot": {
              "type": "string",
              "enum": [
                "primary",
                "fallback"
              ],
              "default": "primary"
            },
            "label": {
              "type": [
                "string",
                "null"
              ],
              "minLength": 1,
              "maxLength": 40,
              "pattern": "^[\\p{L}\\p{N} ._:/()@&+-]+$/u"
            }
          },
          "required": [
            "label"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "credential"
                ]
              },
              "id": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "slot": {
                "type": "string",
                "enum": [
                  "primary",
                  "fallback"
                ]
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "hint": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "status": {
                "type": "string",
                "enum": [
                  "healthy",
                  "failing",
                  "unverified"
                ],
                "default": "unverified"
              },
              "tested_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "default": null
              },
              "test_message": {
                "type": [
                  "string",
                  "null"
                ],
                "default": null
              },
              "last_used_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "default": null
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "object",
              "id",
              "provider",
              "slot",
              "fields",
              "updated_at"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "retry_after_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
