> ## 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.

# Credentials

> Store passwords, cards and secrets, and send 2FA codes.

Credentials are stored securely and referenced by ID (`cred_…`); their secret values are never returned.

Every method here also accepts `request_options` (Python) or a final `requestOptions` argument (TypeScript) to override the timeout, retries or headers for one call; see [request options](/docs/sdk-reference/overview.md#request-options).

***

## create\_credential

Creates a new credential for the current organization

```python Python theme={null}
await skyvern.create_credential(
    *,
    name: str,
    credential_type: "password" | "credit_card" | "secret",
    credential: CreateCredentialRequestCredential,
    vault_type: CredentialVaultType | None = ...,
    proxy_location: CreateCredentialRequestProxyLocation | None = ...,
    proxy_session_id: str | None = ...,
    rotate_proxy_session_id: bool | None = ...,
    tested_url: str | None = ...,
) -> CredentialResponse
```

```typescript TypeScript theme={null}
skyvern.createCredential(request: CreateCredentialRequest): Promise<CredentialResponse>
```

**Parameters**

**name** `str` *required*

Name of the credential

**credential\_type** `"password" | "credit_card" | "secret"` *required*

Type of credential to create

**credential** `CreateCredentialRequestCredential` *required*

The credential data to store

**vault\_type** `CredentialVaultType | None`

Which vault to store this credential in. If omitted, uses the instance default. Use this to mix Skyvern-hosted and custom credentials within the same organization.

Sent only when you pass it

**proxy\_location** `CreateCredentialRequestProxyLocation | None`

Optional proxy location for this credential's pinned proxy identity.

Sent only when you pass it

**proxy\_session\_id** `str | None`

Optional advanced reuse key for this credential's pinned proxy identity.

Sent only when you pass it

**rotate\_proxy\_session\_id** `bool | None`

Rotate the Skyvern-managed proxy sticky-session id when updating this credential.

Sent only when you pass it

**tested\_url** `str | None`

Login page URL used during the credential test

Sent only when you pass it

**Returns** `CredentialResponse` · TypeScript `Promise<CredentialResponse>`

> **CredentialResponse fields**
>
> | Field | Type | Description |
> | - | - | - |
> | `credential_id` | `str` | Unique identifier for the credential |
> | `credential` | `PasswordCredentialResponse \| CreditCardCredentialResponse \| SecretCredentialResponse` | The credential data |
> | `credential_type` | `"password" \| "credit_card" \| "secret"` | Type of the credential |
> | `name` | `str` | Name of the credential |
> | `vault_type` | `"skyvern" \| "bitwarden" \| "azure_vault" \| "gcp" \| "custom" \| None` | Which vault stores this credential (e.g., 'skyvern', 'bitwarden', 'azure\_vault', 'custom') |
> | `browser_profile_id` | `str \| None` | Browser profile ID linked to this credential |
> | `tested_url` | `str \| None` | Login page URL used during the credential test |
> | `user_context` | `str \| None` | User-provided context describing the login sequence (e.g., 'click SSO button first') |
> | `save_browser_session_intent` | `bool \| None` | Whether the user intends to save a browser session, regardless of test outcome |
> | `folder_id` | `str \| None` | ID of the credential folder this credential belongs to, if any |
> | `proxy_location` | `"RESIDENTIAL" \| "US-CA" \| "US-NY" \| "US-TX" \| "US-FL" \| "US-WA" \| "RESIDENTIAL_ES" \| "RESIDENTIAL_IE" \| "RESIDENTIAL_GB" \| "RESIDENTIAL_IN" \| "RESIDENTIAL_JP" \| "RESIDENTIAL_FR" \| "RESIDENTIAL_DE" \| "RESIDENTIAL_NZ" \| "RESIDENTIAL_ZA" \| "RESIDENTIAL_AR" \| "RESIDENTIAL_AU" \| "RESIDENTIAL_BR" \| "RESIDENTIAL_TR" \| "RESIDENTIAL_CA" \| "RESIDENTIAL_MX" \| "RESIDENTIAL_IT" \| "RESIDENTIAL_NL" \| "RESIDENTIAL_PH" \| "RESIDENTIAL_KR" \| "RESIDENTIAL_SA" \| "RESIDENTIAL_ISP" \| "NONE" \| Any \| GeoTarget \| dict[str, Any \| None] \| None` | Optional proxy location used for the credential's pinned proxy identity. |
> | `proxy_session_id` | `str \| None` | Opaque Skyvern-managed proxy sticky-session id. |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    result = await skyvern.create_credential(
        name="Example login",
        credential_type="password",
        credential={"username": "jane@example.com", "password": "correct-horse-battery-staple"},
    )
    print(result)


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const result = await skyvern.createCredential({
    name: "Example login",
    credential_type: "password",
    credential: { username: "jane@example.com", password: "correct-horse-battery-staple" },
});
console.log(result);
```

***

## get\_credential

Retrieves a specific credential by its ID

```python Python theme={null}
await skyvern.get_credential(credential_id: str) -> CredentialResponse
```

```typescript TypeScript theme={null}
skyvern.getCredential(credentialId: string): Promise<CredentialResponse>
```

**Parameters**

**credential\_id** `str` *required*

The unique identifier of the credential

TypeScript: `credentialId`

**Returns** `CredentialResponse` · TypeScript `Promise<CredentialResponse>`

> **CredentialResponse fields**
>
> | Field | Type | Description |
> | - | - | - |
> | `credential_id` | `str` | Unique identifier for the credential |
> | `credential` | `PasswordCredentialResponse \| CreditCardCredentialResponse \| SecretCredentialResponse` | The credential data |
> | `credential_type` | `"password" \| "credit_card" \| "secret"` | Type of the credential |
> | `name` | `str` | Name of the credential |
> | `vault_type` | `"skyvern" \| "bitwarden" \| "azure_vault" \| "gcp" \| "custom" \| None` | Which vault stores this credential (e.g., 'skyvern', 'bitwarden', 'azure\_vault', 'custom') |
> | `browser_profile_id` | `str \| None` | Browser profile ID linked to this credential |
> | `tested_url` | `str \| None` | Login page URL used during the credential test |
> | `user_context` | `str \| None` | User-provided context describing the login sequence (e.g., 'click SSO button first') |
> | `save_browser_session_intent` | `bool \| None` | Whether the user intends to save a browser session, regardless of test outcome |
> | `folder_id` | `str \| None` | ID of the credential folder this credential belongs to, if any |
> | `proxy_location` | `"RESIDENTIAL" \| "US-CA" \| "US-NY" \| "US-TX" \| "US-FL" \| "US-WA" \| "RESIDENTIAL_ES" \| "RESIDENTIAL_IE" \| "RESIDENTIAL_GB" \| "RESIDENTIAL_IN" \| "RESIDENTIAL_JP" \| "RESIDENTIAL_FR" \| "RESIDENTIAL_DE" \| "RESIDENTIAL_NZ" \| "RESIDENTIAL_ZA" \| "RESIDENTIAL_AR" \| "RESIDENTIAL_AU" \| "RESIDENTIAL_BR" \| "RESIDENTIAL_TR" \| "RESIDENTIAL_CA" \| "RESIDENTIAL_MX" \| "RESIDENTIAL_IT" \| "RESIDENTIAL_NL" \| "RESIDENTIAL_PH" \| "RESIDENTIAL_KR" \| "RESIDENTIAL_SA" \| "RESIDENTIAL_ISP" \| "NONE" \| Any \| GeoTarget \| dict[str, Any \| None] \| None` | Optional proxy location used for the credential's pinned proxy identity. |
> | `proxy_session_id` | `str \| None` | Opaque Skyvern-managed proxy sticky-session id. |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    result = await skyvern.get_credential(credential_id="cred_123")
    print(result)


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const result = await skyvern.getCredential("cred_123");
console.log(result);
```

***

## get\_credentials

Retrieves a paginated list of credentials for the current organization

```python Python theme={null}
await skyvern.get_credentials(
    *,
    page: int | None = None,
    page_size: int | None = None,
    vault_type: CredentialVaultType | None = None,
    credential_type: "password" | "credit_card" | "secret" | None = None,
    search: str | None = None,
) -> list[CredentialResponse]
```

```typescript TypeScript theme={null}
skyvern.getCredentials(request?: GetCredentialsRequest): Promise<CredentialResponse[]>
```

**Parameters**

**page** `int | None`

Page number for pagination

Default: `None`

**page\_size** `int | None`

Number of items per page

Default: `None`

**vault\_type** `CredentialVaultType | None`

Filter credentials by vault type (e.g. 'skyvern', 'custom', 'bitwarden', 'azure\_vault')

Default: `None`

**credential\_type** `"password" | "credit_card" | "secret" | None`

Filter credentials by type (e.g. 'password', 'credit\_card', 'secret')

Default: `None`

**search** `str | None`

Case-insensitive search across credential name, username, secret label, and card details

Default: `None`

**Returns** `list[CredentialResponse]` · TypeScript `Promise<CredentialResponse[]>`

> **CredentialResponse fields**
>
> | Field | Type | Description |
> | - | - | - |
> | `credential_id` | `str` | Unique identifier for the credential |
> | `credential` | `PasswordCredentialResponse \| CreditCardCredentialResponse \| SecretCredentialResponse` | The credential data |
> | `credential_type` | `"password" \| "credit_card" \| "secret"` | Type of the credential |
> | `name` | `str` | Name of the credential |
> | `vault_type` | `"skyvern" \| "bitwarden" \| "azure_vault" \| "gcp" \| "custom" \| None` | Which vault stores this credential (e.g., 'skyvern', 'bitwarden', 'azure\_vault', 'custom') |
> | `browser_profile_id` | `str \| None` | Browser profile ID linked to this credential |
> | `tested_url` | `str \| None` | Login page URL used during the credential test |
> | `user_context` | `str \| None` | User-provided context describing the login sequence (e.g., 'click SSO button first') |
> | `save_browser_session_intent` | `bool \| None` | Whether the user intends to save a browser session, regardless of test outcome |
> | `folder_id` | `str \| None` | ID of the credential folder this credential belongs to, if any |
> | `proxy_location` | `"RESIDENTIAL" \| "US-CA" \| "US-NY" \| "US-TX" \| "US-FL" \| "US-WA" \| "RESIDENTIAL_ES" \| "RESIDENTIAL_IE" \| "RESIDENTIAL_GB" \| "RESIDENTIAL_IN" \| "RESIDENTIAL_JP" \| "RESIDENTIAL_FR" \| "RESIDENTIAL_DE" \| "RESIDENTIAL_NZ" \| "RESIDENTIAL_ZA" \| "RESIDENTIAL_AR" \| "RESIDENTIAL_AU" \| "RESIDENTIAL_BR" \| "RESIDENTIAL_TR" \| "RESIDENTIAL_CA" \| "RESIDENTIAL_MX" \| "RESIDENTIAL_IT" \| "RESIDENTIAL_NL" \| "RESIDENTIAL_PH" \| "RESIDENTIAL_KR" \| "RESIDENTIAL_SA" \| "RESIDENTIAL_ISP" \| "NONE" \| Any \| GeoTarget \| dict[str, Any \| None] \| None` | Optional proxy location used for the credential's pinned proxy identity. |
> | `proxy_session_id` | `str \| None` | Opaque Skyvern-managed proxy sticky-session id. |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    result = await skyvern.get_credentials()
    print(result)


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const result = await skyvern.getCredentials();
console.log(result);
```

***

## update\_credential

Overwrites the stored credential data (e.g. username/password) while keeping the same credential\_id.

```python Python theme={null}
await skyvern.update_credential(
    credential_id: str,
    *,
    name: str,
    credential_type: "password" | "credit_card" | "secret",
    credential: CreateCredentialRequestCredential,
    vault_type: CredentialVaultType | None = ...,
    proxy_location: CreateCredentialRequestProxyLocation | None = ...,
    proxy_session_id: str | None = ...,
    rotate_proxy_session_id: bool | None = ...,
    tested_url: str | None = ...,
) -> CredentialResponse
```

```typescript TypeScript theme={null}
skyvern.updateCredential(credentialId: string, request: CreateCredentialRequest): Promise<CredentialResponse>
```

**Parameters**

**credential\_id** `str` *required*

The unique identifier of the credential to update

TypeScript: `credentialId`

**name** `str` *required*

Name of the credential

**credential\_type** `"password" | "credit_card" | "secret"` *required*

Type of credential to create

**credential** `CreateCredentialRequestCredential` *required*

The credential data to store

**vault\_type** `CredentialVaultType | None`

Which vault to store this credential in. If omitted, uses the instance default. Use this to mix Skyvern-hosted and custom credentials within the same organization.

Sent only when you pass it

**proxy\_location** `CreateCredentialRequestProxyLocation | None`

Optional proxy location for this credential's pinned proxy identity.

Sent only when you pass it

**proxy\_session\_id** `str | None`

Optional advanced reuse key for this credential's pinned proxy identity.

Sent only when you pass it

**rotate\_proxy\_session\_id** `bool | None`

Rotate the Skyvern-managed proxy sticky-session id when updating this credential.

Sent only when you pass it

**tested\_url** `str | None`

Login page URL used during the credential test

Sent only when you pass it

**Returns** `CredentialResponse` · TypeScript `Promise<CredentialResponse>`

> **CredentialResponse fields**
>
> | Field | Type | Description |
> | - | - | - |
> | `credential_id` | `str` | Unique identifier for the credential |
> | `credential` | `PasswordCredentialResponse \| CreditCardCredentialResponse \| SecretCredentialResponse` | The credential data |
> | `credential_type` | `"password" \| "credit_card" \| "secret"` | Type of the credential |
> | `name` | `str` | Name of the credential |
> | `vault_type` | `"skyvern" \| "bitwarden" \| "azure_vault" \| "gcp" \| "custom" \| None` | Which vault stores this credential (e.g., 'skyvern', 'bitwarden', 'azure\_vault', 'custom') |
> | `browser_profile_id` | `str \| None` | Browser profile ID linked to this credential |
> | `tested_url` | `str \| None` | Login page URL used during the credential test |
> | `user_context` | `str \| None` | User-provided context describing the login sequence (e.g., 'click SSO button first') |
> | `save_browser_session_intent` | `bool \| None` | Whether the user intends to save a browser session, regardless of test outcome |
> | `folder_id` | `str \| None` | ID of the credential folder this credential belongs to, if any |
> | `proxy_location` | `"RESIDENTIAL" \| "US-CA" \| "US-NY" \| "US-TX" \| "US-FL" \| "US-WA" \| "RESIDENTIAL_ES" \| "RESIDENTIAL_IE" \| "RESIDENTIAL_GB" \| "RESIDENTIAL_IN" \| "RESIDENTIAL_JP" \| "RESIDENTIAL_FR" \| "RESIDENTIAL_DE" \| "RESIDENTIAL_NZ" \| "RESIDENTIAL_ZA" \| "RESIDENTIAL_AR" \| "RESIDENTIAL_AU" \| "RESIDENTIAL_BR" \| "RESIDENTIAL_TR" \| "RESIDENTIAL_CA" \| "RESIDENTIAL_MX" \| "RESIDENTIAL_IT" \| "RESIDENTIAL_NL" \| "RESIDENTIAL_PH" \| "RESIDENTIAL_KR" \| "RESIDENTIAL_SA" \| "RESIDENTIAL_ISP" \| "NONE" \| Any \| GeoTarget \| dict[str, Any \| None] \| None` | Optional proxy location used for the credential's pinned proxy identity. |
> | `proxy_session_id` | `str \| None` | Opaque Skyvern-managed proxy sticky-session id. |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    result = await skyvern.update_credential(
        credential_id="cred_123",
        name="Example login",
        credential_type="password",
        credential={"username": "jane@example.com", "password": "new-password"},
    )
    print(result)


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const result = await skyvern.updateCredential("cred_123", {
    name: "Example login",
    credential_type: "password",
    credential: { username: "jane@example.com", password: "new-password" },
});
console.log(result);
```

***

## delete\_credential

Deletes a specific credential by its ID

```python Python theme={null}
await skyvern.delete_credential(credential_id: str) -> None
```

```typescript TypeScript theme={null}
skyvern.deleteCredential(credentialId: string): Promise<void>
```

**Parameters**

**credential\_id** `str` *required*

The unique identifier of the credential to delete

TypeScript: `credentialId`

**Returns** `None` · TypeScript `Promise<void>`

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    await skyvern.delete_credential(credential_id="cred_123")


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
await skyvern.deleteCredential("cred_123");
```

***

## send\_totp\_code

Forward a TOTP (2FA, MFA) email or sms message containing the code to Skyvern. This endpoint stores the code in database so that Skyvern can use it while running tasks/workflows.

```python Python theme={null}
await skyvern.send_totp_code(
    *,
    totp_identifier: str,
    content: str,
    task_id: str | None = ...,
    workflow_id: str | None = ...,
    workflow_run_id: str | None = ...,
    source: str | None = ...,
    expired_at: datetime | None = ...,
    type: OtpType | None = ...,
) -> TotpCode
```

```typescript TypeScript theme={null}
skyvern.sendTotpCode(request: TotpCodeCreate): Promise<TotpCode>
```

**Parameters**

**totp\_identifier** `str` *required*

The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user.

**content** `str` *required*

The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content.

**task\_id** `str | None`

The task\_id the totp code is for. It can be the task\_id of the task that the TOTP code is for.

Sent only when you pass it

**workflow\_id** `str | None`

The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for.

Sent only when you pass it

**workflow\_run\_id** `str | None`

The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for.

Sent only when you pass it

**source** `str | None`

An optional field. The source of the TOTP code. e.g. email, sms, etc.

Sent only when you pass it

**expired\_at** `datetime | None`

The timestamp when the TOTP code expires

Sent only when you pass it

**type** `OtpType | None`

Deprecated compatibility field. Skyvern auto-detects the OTP type from content, so this value does not constrain extraction.

Sent only when you pass it

**Returns** `TotpCode` · TypeScript `Promise<TotpCode>`

> **TotpCode fields**
>
> | Field | Type | Description |
> | - | - | - |
> | `totp_identifier` | `str` | The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user. |
> | `task_id` | `str \| None` | The task\_id the totp code is for. It can be the task\_id of the task that the TOTP code is for. |
> | `workflow_id` | `str \| None` | The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for. |
> | `workflow_run_id` | `str \| None` | The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for. |
> | `source` | `str \| None` | An optional field. The source of the TOTP code. e.g. email, sms, etc. |
> | `content` | `str` | The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content. |
> | `expired_at` | `datetime \| None` | The timestamp when the TOTP code expires |
> | `type` | `"totp" \| "magic_link" \| None` | Deprecated compatibility field. Skyvern auto-detects the OTP type from content, so this value does not constrain extraction. |
> | `totp_code_id` | `str` | The skyvern ID of the TOTP code. |
> | `code` | `str` | The TOTP code extracted from the content. |
> | `organization_id` | `str` | The ID of the organization that the TOTP code is for. |
> | `created_at` | `datetime` | The timestamp when the TOTP code was created. |
> | `modified_at` | `datetime` | The timestamp when the TOTP code was modified. |
> | `otp_type` | `"totp" \| "magic_link" \| None` | The type of the OTP code. |

**Example**

```python Python theme={null}
import asyncio

from skyvern import Skyvern


async def main() -> None:
    skyvern = Skyvern(api_key="YOUR_API_KEY")
    result = await skyvern.send_totp_code(totp_identifier="user@example.com", content="123456")
    print(result)


asyncio.run(main())
```

```typescript TypeScript theme={null}
import { Skyvern } from "@skyvern/client";

const skyvern = new Skyvern({ apiKey: "YOUR_API_KEY" });
const result = await skyvern.sendTotpCode({ totp_identifier: "user@example.com", content: "123456" });
console.log(result);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.