Copying/Linking a Password ​
POST /api/passwords/copy
An existing Password object can be copied to a Shared Password List and optionally linked by making a POST request with appropriate fields forming the HTTP message body.
Note 1: You must provide the Copy/Move Password Record API Key.
Note 2: You cannot use Private Password Lists with this method.
This method returns the appropriate HTTP response code plus an error message if applicable.
Powershell
# PowerShell Request
#JSON data for the object
$Body = @{
PasswordID = $PasswordID
DestinationPasswordListID = "20205"
Link = "False"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/api/passwords/copy'
Invoke-Restmethod -Method Post -Uri $PasswordstateURL -ContentType "application/json" -Body $jsonData -Header @{ "APIKey" = "<apikey>" }Json
# Response
HTTP/1.1 200 No ContentBelow is a description of each of the parameters for this API Method:
| Heading | Data Type | Description |
|---|---|---|
| PasswordID | Integer | The PasswordID value of the source password record to copy/link in Passwordstate. |
| DestinationPasswordListID | Integer | The PasswordListID value of the destination password list. |
| Link | Boolean | The boolean value of whether to link the copied password to the source password. |