> ## Documentation Index
> Fetch the complete documentation index at: https://skyvern.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# update_credential

Overwrite the stored credential data (e.g. username/password) while keeping the same credential ID.

<CodeGroup>
  ```python Python theme={null}
  updated = await client.update_credential(
      "cred_abc123",
      name="Updated Login",
      credential_type="password",
      credential={
          "username": "new_user@example.com",
          "password": "new_password",
      },
  )
  ```

  ```typescript TypeScript theme={null}
  const updated = await skyvern.updateCredential("cred_abc123", {
    name: "Updated Login",
    credential_type: "password",
    credential: {
      username: "new_user@example.com",
      password: "new_password",
    },
  });
  ```
</CodeGroup>

### Parameters

| Parameter         | Type                  | Required | Description                                                     |
| ----------------- | --------------------- | -------- | --------------------------------------------------------------- |
| `credential_id`   | `str`                 | Yes      | The credential ID to update.                                    |
| `name`            | `str`                 | Yes      | Name of the credential.                                         |
| `credential_type` | `str`                 | Yes      | Type of credential (`"password"`, `"credit_card"`, `"secret"`). |
| `credential`      | `dict`                | Yes      | The new credential data.                                        |
| `vault_type`      | `CredentialVaultType` | No       | Vault provider.                                                 |
| `request_options` | `RequestOptions`      | No       | Per-request configuration (see below).                          |

### Returns `CredentialResponse`

***

### Request options

Override timeout, retries, or headers for this call by passing `request_options` (Python) or a second options argument (TypeScript).

<CodeGroup>
  ```python Python theme={null}
  from skyvern.client.core import RequestOptions

  request_options=RequestOptions(
      timeout_in_seconds=120,
      max_retries=3,
      additional_headers={"x-custom-header": "value"},
  )
  ```

  ```typescript TypeScript theme={null}
  // Pass as second argument to any method
  {
    timeoutInSeconds: 120,
    maxRetries: 3,
    headers: { "x-custom-header": "value" },
  }
  ```
</CodeGroup>

| Option (Python)               | Option (TypeScript) | Type                              | Description                   |
| ----------------------------- | ------------------- | --------------------------------- | ----------------------------- |
| `timeout_in_seconds`          | `timeoutInSeconds`  | `int` / `number`                  | HTTP timeout in seconds.      |
| `max_retries`                 | `maxRetries`        | `int` / `number`                  | Retry count.                  |
| `additional_headers`          | `headers`           | `dict` / `Record<string, string>` | Extra headers.                |
| `additional_query_parameters` | -                   | `dict`                            | Extra query parameters.       |
| `additional_body_parameters`  | -                   | `dict`                            | Extra body parameters.        |
| -                             | `abortSignal`       | `AbortSignal`                     | Signal to cancel the request. |
| -                             | `apiKey`            | `string`                          | Override API key.             |

***
