Reset the password of a guest

POST https://api.zenoti.com/v1/guests/password

This API helps you to reset a guest's password.

When you invoke this API, a temporary code is generated that does not actually replace a guest's existing password. The temporary code acts as a one-time password (OTP), by using which guests can validate their update password request.

This API also takes care of scenarios where there might be multiple accounts found with the same username. In that case, the guest's first_name is provided so that the appropriate account can be identified and the reset password email can then be sent to that user.

This API returns either a success parameter that specifies that the password-reset process was successful or an error object if there is any error.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

POST /v1/guests/password

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Request body

Field Type Required Description
email_or_phone string Yes Mandatory Guest's email or phone details.
first_name string Yes Optional First name of the guest.

Response

Success (201 Created)

{}

Example

curl --request POST \
  --url 'https://api.zenoti.com/v1/guests/password' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "email_or_phone": "string",
  "first_name": "string"
}'
const response = await fetch('https://api.zenoti.com/v1/guests/password', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ email_or_phone: 'string', first_name: 'string' })
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/v1/guests/password',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'email_or_phone': 'string', 'first_name': 'string'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new { email_or_phone = "string", first_name = "string" }),
    Encoding.UTF8, "application/json");
var response = await client.PostAsync(
    "https://api.zenoti.com/v1/guests/password", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests/password')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { email_or_phone: 'string', first_name: 'string' }.to_json
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded