---
title: "Shared Credential"
method: PUT
path: "/api/3/shared_credentials/{id}"
tags: ["Credential"]
---

# Shared Credential

`PUT /api/3/shared_credentials/{id}`

Updates the specified shared credential.

## Path parameters

- `id` integer, required — The identifier of the credential.

## Request body

- SharedCredential — The specification of a shared credential.
  - `account` SharedCredentialAccount, required — Specify the type of service to authenticate as well as all of the information required by that service.
    - `service` 'as400' | 'cifs' | 'cifshash' | 'cvs' | 'db2' | 'ftp' | 'http' | 'ms-sql' | 'mysql' | 'notes' | 'oracle' | 'oracle-service-name' | 'pop' | 'postgresql' | 'remote-exec' | 'snmp' | 'snmpv3' | 'ssh' | 'ssh-key' | 'sybase' | 'telnet' | 'kerberos' | 'hana' | 'scan-assistant' | 'vmware' — The type of service to authenticate with. The following are the names of the valid values for service: | Value | Service | | ------------- | ----------------------------------------------- | | `as400` | IBM AS/400 | | `cifs` | Microsoft Windows/Samba (SMB/CIFS) | | `cifshash` | Microsoft Windows/Samba LM/NTLM Hash (SMB/CIFS) | | `cvs` | Concurrent Versioning System (CVS) | | `db2` | DB2 | | `ftp` | File Transfer Protocol (FTP) | | `http` | Web Site HTTP Authentication | | `ms-sql` | Microsoft SQL Server | | `mysql` | MySQL Server | | `notes` | Lotus Notes/Domino | | `oracle` | Oracle | | `oracle-service-name` | Oracle Service Name | | `pop` | Post Office Protocol (POP) | | `postgresql` | PostgreSQL | | `remote-exec` | Remote Execution | | `snmp` | Simple Network Management Protocol v1/v2c | | `snmpv3` | Simple Network Management Protocol v3 | | `ssh` | Secure Shell (SSH) | | `ssh-key` | Secure Shell (SSH) Public Key | | `sybase` | Sybase SQL Server | | `telnet` | Telnet | | `kerberos` | Kerberos | | `hana` | SAP HANA | | `scanassistant` | Scan Assistant | | `vmware` | VMware |
  - `description` string — The description of the credential.
  - `hostRestriction` string — The host name or IP address that you want to restrict the credentials to.
  - `id` integer — The identifier of the credential.
  - `name` string, required — The name of the credential.
  - `portRestriction` integer — Further restricts the credential to attempt to authenticate on a specific port.
  - `siteAssignment` string, required — Assigns the shared scan credential either to be available to all sites or to a specific list of sites. The following table describes each supported value: | Value | Description | | ---------- | ---------------- | | `"all-sites"` | The shared scan credential is assigned to all current and future sites. | | `"specific-sites"` | The shared scan credential is assigned to zero sites by default. Administrators must explicitly assign sites to the shared credential. | Shared scan credentials assigned to a site can disabled within the site configuration, if needed.
  - `sites` integer[] — List of site identifiers. These sites are explicitly assigned access to the shared scan credential, allowing the site to use the credential for authentication during a scan. This property can only be set if the value of property `siteAssignment` is set to `"specific-sites"`. When the property `siteAssignment` is set to `"all-sites"`, this property will be `null`.

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/rapid7/apis/rapid7-vm-api.md) · [All operations](https://skmtc.net/rapid7/apis/rapid7-vm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapid7/rapid7-vm-api/versions/3a8197c22d71/schema)
