Update guest details

PUT https://api.zenoti.com/v1/guests/{guest_id}

Updates the profile of an existing guest. You must include all fields from the retrieve endpoint — fields not included are set to their default values.

Before you begin

Permission: Manage API Keys (under Administrator) — Required to access Zenoti APIs.

Endpoint

PUT /v1/guests/{guest_id}

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
guest_id string (GUID) Yes Guest identifier

Request body

Field Type Required Description
personal_info.first_name string No Guest first name
personal_info.last_name string No Guest last name
personal_info.email string No Email address
personal_info.mobile_phone object No Mobile phone with country_code and number
personal_info.gender integer No -1=NotSpecified, 0=Female, 1=Male, 3=Other
address_info object No Address fields: address_1, city, country_id, state_id, zip_code
preferences object No Communication and loyalty preferences

Response

Success (200 OK)

{
  "id": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b",
  "personal_info": {
    "first_name": "Jane",
    "last_name": "Smith-Jones"
  },
  "error": null
}

Response fields

Field Type Description
id string (GUID) Guest identifier
personal_info object Updated personal details

Example

curl --request PUT \
  --url 'https://api.zenoti.com/v1/guests/e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "personal_info": { "first_name": "Jane", "last_name": "Smith-Jones" }
  }'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}', {
  method: 'PUT',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
  personal_info: { first_name: 'Jane', last_name: 'Smith-Jones' }
})
});
const data = await response.json();
import requests

response = requests.put(
    'https://api.zenoti.com/v1/guests/{guest_id}',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'personal_info': {'first_name': 'Jane', 'last_name': 'Smith-Jones'}}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new {
    personalInfo = new { firstName = "Jane", lastName = "Smith-Jones" }
}),
    Encoding.UTF8, "application/json");
var response = await client.PutAsync(
    "https://api.zenoti.com/v1/guests/{guest_id}", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests/{guest_id}')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { personal_info: { first_name: 'Jane', last_name: 'Smith-Jones' } }.to_json
response = http.request(request)
data = JSON.parse(response.body)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.zenoti.com/v1/guests/{guest_id}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: bearer {{access_token}}',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['personal_info' => ['first_name' => 'Jane', 'last_name' => 'Smith-Jones']]));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);

Error codes

Status Description
401 Unauthorized — invalid or expired access token
404 Resource not found
429 Too many requests — rate limit exceeded (60/min)