---
updatedAt: 2026-07-02T14:39:48.000Z
---

# Modify a site credential

This operation enables you to modify an existing site credential.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "Site API (Legacy)",
    "license": {
      "name": "(c) Copyright 2021 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/site/{site_id}/site_credentials/{site_credential_id}": {
      "put": {
        "tags": [
          "Site API v1.0"
        ],
        "summary": "Modify a site credential",
        "description": "This operation enables you to modify an existing site credential.",
        "operationId": "modifySiteCredential",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "description": "Site ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "site_credential_id",
            "in": "path",
            "description": "Site Credential ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The response representation format for results.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "xml",
              "example": "json",
              "enum": [
                "json",
                "xml"
              ]
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information to update a single, existing site credential.",
          "content": {
            "application/json": {
              "encoding": {},
              "schema": {
                "$ref": "#/components/schemas/SiteCredentialUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provides the information for a single site credential.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteCredential"
                }
              },
              "application/xml": {
                "example": "XML preview is currently not supported."
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "409": {
            "description": "Conflict indicates that the request could not be processed because of conflict in the request, such as an edit conflict.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "SiteCredential": {
        "nullable": true,
        "properties": {
          "expire_notify_before": {
            "type": "string",
            "nullable": true
          },
          "cred_group_name": {
            "type": "string",
            "nullable": true
          },
          "wh_managed": {
            "type": "boolean"
          },
          "expire_type": {
            "type": "string",
            "nullable": true
          },
          "selenium_script": {
            "type": "string",
            "nullable": true
          },
          "updated_t": {
            "type": "number",
            "nullable": true
          },
          "account_email": {
            "type": "string",
            "nullable": true
          },
          "match_expression": {
            "type": "string",
            "nullable": true
          },
          "secret_key": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "number",
            "nullable": true
          },
          "expire_begin": {
            "type": "string",
            "nullable": true
          },
          "expire_freeform": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "creator": {
            "type": "string",
            "nullable": true
          },
          "href": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "number"
          },
          "login_valid_url": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "login_url": {
            "type": "string",
            "nullable": true
          },
          "scanning_cred": {
            "type": "boolean"
          },
          "pam_target": {
            "type": "string",
            "nullable": true,
            "description": "Target or Secret Path (for Vault app_role) identifier for PAM credential retrieval"
          },
          "pam_integration_id": {
            "type": "number",
            "nullable": true,
            "description": "ID of the PAM integration to use for credential retrieval"
          },
          "options": {
            "type": "string",
            "nullable": true,
            "description": "Additional options/configuration for the credential"
          }
        }
      },
      "SiteCredentialUpdateRequest": {
        "required": [
          "login_url",
          "login_valid_url",
          "cred_group_name"
        ],
        "properties": {
          "username": {
            "type": "string",
            "description": "A valid username for logging into the site. Optional if pam_integration_id is provided."
          },
          "password": {
            "type": "string",
            "description": "A valid password to go with the username to be used for this credential. Optional if pam_integration_id is provided."
          },
          "cred_group_name": {
            "type": "string",
            "description": "Credentials are associated with a 'cred_group', which must have a name that is less than 64 characters in length. This parameter is required in the POST request content for Business Logic credentials, and in the PUT request content for all credentials."
          },
          "priority": {
            "type": "number",
            "description": "Priority/sorting order for site credentials (1=primary, 2=secondary, 3=tertiary. etc). If a credential of the specified priority already exists, the request will not succeed."
          },
          "scanning_cred": {
            "type": "number",
            "description": "Specify whether this credential will be used for scanning or not. If this is set to '0' for a PE site, the credential will be used for business logic testing. For sites of other service levels, only scanning credentials are allowed.",
            "enum": [
              0,
              1
            ]
          },
          "login_url": {
            "type": "string",
            "description": "The URL (entry portal) where login will be attempted with these credentials."
          },
          "login_valid_url": {
            "type": "string",
            "description": "The URL where the logged-in user is expected to land."
          },
          "notes": {
            "type": "string",
            "description": "Any additional login instructions or other information for this credential."
          },
          "pam_target": {
            "type": "string",
            "description": "Target or Secret Path (for Vault app_role) identifier for PAM credential retrieval. Required if pam_integration_id is provided."
          },
          "pam_integration_id": {
            "type": "number",
            "description": "ID of the PAM integration to use. If provided, username and password become optional."
          },
          "options": {
            "type": "string",
            "description": "Additional options/configuration for the credential"
          }
        }
      }
    }
  }
}
```