Change password
curl --request PUT \
--url https://calibri.io/api/v2/persona/resource/users/password \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"new_password": "a new passphrase",
"old_password": "correct horse battery staple"
}
'import requests
url = "https://calibri.io/api/v2/persona/resource/users/password"
payload = {
"new_password": "a new passphrase",
"old_password": "correct horse battery staple"
}
headers = {
"X-Auth-Apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Apikey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({new_password: 'a new passphrase', old_password: 'correct horse battery staple'})
};
fetch('https://calibri.io/api/v2/persona/resource/users/password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://calibri.io/api/v2/persona/resource/users/password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'new_password' => 'a new passphrase',
'old_password' => 'correct horse battery staple'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://calibri.io/api/v2/persona/resource/users/password"
payload := strings.NewReader("{\n \"new_password\": \"a new passphrase\",\n \"old_password\": \"correct horse battery staple\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://calibri.io/api/v2/persona/resource/users/password")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"new_password\": \"a new passphrase\",\n \"old_password\": \"correct horse battery staple\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/persona/resource/users/password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"new_password\": \"a new passphrase\",\n \"old_password\": \"correct horse battery staple\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Password was reset"
}Account
Change password
Requires the current password. Only meaningful when can_change_password is true — wallet-native and social accounts carry a random password the holder never set.
PUT
/
api
/
v2
/
persona
/
resource
/
users
/
password
Change password
curl --request PUT \
--url https://calibri.io/api/v2/persona/resource/users/password \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"new_password": "a new passphrase",
"old_password": "correct horse battery staple"
}
'import requests
url = "https://calibri.io/api/v2/persona/resource/users/password"
payload = {
"new_password": "a new passphrase",
"old_password": "correct horse battery staple"
}
headers = {
"X-Auth-Apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Apikey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({new_password: 'a new passphrase', old_password: 'correct horse battery staple'})
};
fetch('https://calibri.io/api/v2/persona/resource/users/password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://calibri.io/api/v2/persona/resource/users/password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'new_password' => 'a new passphrase',
'old_password' => 'correct horse battery staple'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://calibri.io/api/v2/persona/resource/users/password"
payload := strings.NewReader("{\n \"new_password\": \"a new passphrase\",\n \"old_password\": \"correct horse battery staple\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://calibri.io/api/v2/persona/resource/users/password")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"new_password\": \"a new passphrase\",\n \"old_password\": \"correct horse battery staple\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/persona/resource/users/password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"new_password\": \"a new passphrase\",\n \"old_password\": \"correct horse battery staple\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Password was reset"
}Authorizations
HMAC-signed API key. Send X-Auth-Apikey, X-Auth-Nonce and X-Auth-Signature.
Body
application/json
Response
200 - application/json
Human-readable confirmation. The operation succeeded if the status is 2xx.
Example:
"Password was reset"