---
title: "Create credential"
method: POST
path: "/v1/credentials"
tags: ["Credentials"]
---

# Create credential

`POST /v1/credentials`

Creates a new credential for the current organization

## Headers

- `x-api-key` string, nullable — Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

## Request body

- CreateCredentialRequest — Request model for creating a new credential.
  - `name` string, required — Name of the credential
  - `credential_type` 'password' | 'credit_card' | 'secret', required — Type of credential stored in the system.
  - `credential` union, required — The credential data to store
    - NonEmptyPasswordCredential — Password credential model that requires non-empty values.
      - `password` string, required — The password value (must not be empty)
      - `username` string, required — The username associated with the credential (must not be empty)
      - `totp` string, nullable — Optional TOTP (Time-based One-Time Password) string used to generate 2FA codes
      - `totp_type` 'authenticator' | 'email' | 'text' | 'none' — Type of 2FA/TOTP method used.
      - `totp_identifier` string, nullable — Identifier (email or phone number) used to fetch TOTP codes
    - NonEmptyCreditCardCredential — Credit card credential model that requires non-empty values.
      - `card_number` string, required — The full credit card number (must not be empty)
      - `card_cvv` string, required — The card's CVV (must not be empty)
      - `card_exp_month` string, required — The card's expiration month (must not be empty)
      - `card_exp_year` string, required — The card's expiration year (must not be empty)
      - `card_brand` string, required — The card's brand (must not be empty)
      - `card_holder_name` string, required — The name of the card holder (must not be empty)
    - SecretCredential — Generic secret credential.
      - `secret_value` string, required — The secret value
      - `secret_label` string, nullable — Optional label describing the secret
  - `vault_type` 'bitwarden' | 'azure_vault' | 'custom'

## Response `201`

Successful Response

- CredentialResponse — Response model for credential operations.
  - `credential_id` string, required — Unique identifier for the credential
  - `credential` union, required — The credential data
    - PasswordCredentialResponse — Response model for password credentials — non-sensitive fields only. SECURITY: Must NEVER include password or TOTP secret.
      - `username` string, required — The username associated with the credential
      - `totp_type` 'authenticator' | 'email' | 'text' | 'none' — Type of 2FA/TOTP method used.
      - `totp_identifier` string, nullable — Identifier (email or phone number) used to fetch TOTP codes
    - CreditCardCredentialResponse — Response model for credit card credentials — non-sensitive fields only. SECURITY: Must NEVER include full card number, CVV, expiration date, or card holder name.
      - `last_four` string, required — Last four digits of the credit card number
      - `brand` string, required — Brand of the credit card
    - SecretCredentialResponse — Response model for secret credentials — non-sensitive fields only. SECURITY: Must NEVER include the secret_value.
      - `secret_label` string, nullable — Optional label for the stored secret
  - `credential_type` 'password' | 'credit_card' | 'secret', required — Type of credential stored in the system.
  - `name` string, required — Name of the credential
  - `vault_type` 'bitwarden' | 'azure_vault' | 'custom'
  - `browser_profile_id` string, nullable — Browser profile ID linked to this credential
  - `tested_url` string, nullable — Login page URL used during the credential test
  - `user_context` string, nullable — User-provided context describing the login sequence (e.g., 'click SSO button first')
  - `save_browser_session_intent` boolean, nullable — Whether the user intends to save a browser session, regardless of test outcome

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-26** `d70a0640ef29` — 3 info
  - added the new optional request property `vault_type`
  - added the optional property `save_browser_session_intent` to the response with the `201` status
  - added the optional property `vault_type` to the response with the `201` status
- **2026-03-26** `458f1f2bbd45` — 3 warning
  - removed the request property `vault_type`
  - removed the optional property `save_browser_session_intent` from the response with the `201` status
  - removed the optional property `vault_type` from the response with the `201` status
- **2026-03-26** `d70a0640ef29` — 3 info
  - added the new optional request property `vault_type`
  - added the optional property `save_browser_session_intent` to the response with the `201` status
  - added the optional property `vault_type` to the response with the `201` status
- **2026-03-25** `458f1f2bbd45` — 1 warning
  - removed the optional property `save_browser_session_intent` from the response with the `201` status
- **2026-03-25** `ffe504d30d17` — 1 info
  - added the optional property `save_browser_session_intent` to the response with the `201` status

[Full history](https://skmtc.dev/skyvern-ai/apis/skyvern-api/changes/v1/credentials/post.md)

---

[API](https://skmtc.dev/skyvern-ai/apis/skyvern-api.md) · [All operations](https://skmtc.dev/skyvern-ai/apis/skyvern-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/skyvern-ai/skyvern-api/revisions/fdb894aa6708/schema)
