Cancel the membership of a guest

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

This API helps you to cancel the membership of a guest.

You must specify appropriate details for the guest_id and membership_id parameters in the API request.

Optionally, you can specify the necessary details for the cancellation_date and termination_date parameters in the API request body.

Before you begin

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

Endpoint

PUT /v1/guests/{guest_id}/memberships/{user_membership_id}/cancel

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 Yes Mandatory Unique 32-character identifier of the guest.
membership_id string Yes Mandatory Unique 32-character identifier of the guest's membership.

Request body

Field Type Required Description
cancellation_date string (date) No Denotes the date when the membership was cancelled.
termination_date string (date) No Denotes the date when the membership was terminated.

Response

Success (200 OK)

{
  "error": {}
}

Response fields

Field Type Description
error object

Example

curl --request PUT \
  --url 'https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/cancel' \
  --header 'Authorization: bearer {{access_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "cancellation_date": "2026-01-15",
  "termination_date": "2026-01-15"
}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/cancel', {
  method: 'PUT',
  headers: {
    'Authorization': 'bearer {{access_token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ cancellation_date: '2026-01-15', termination_date: '2026-01-15' })
});
const data = await response.json();
import requests

response = requests.put(
    'https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/cancel',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
    json={'cancellation_date': '2026-01-15', 'termination_date': '2026-01-15'}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
    JsonSerializer.Serialize(new { cancellation_date = "2026-01-15", termination_date = "2026-01-15" }),
    Encoding.UTF8, "application/json");
var response = await client.PutAsync(
    "https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/cancel", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/cancel')
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 = { cancellation_date: '2026-01-15', termination_date: '2026-01-15' }.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