Appointments
Update an appointment reminder rule
Requires appointments:settings and an account administrator. Replaces the complete rule. Enabling a rule or changing delivery-defining fields starts a new activation boundary so past reminder times are not sent as catch-up messages.
PUT
/
api
/
v2
/
accounts
/
{accountId}
/
appointments
/
reminders
/
{reminderId}
Update an appointment reminder rule
curl --request PUT \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId} \
--header 'Content-Type: application/json' \
--data '
{
"bindings": [
{
"field": "customer.first_name",
"literal": "<string>"
}
],
"inbox_id": 12,
"is_active": false,
"minutes_before": 1440,
"name": "24-hour appointment reminder",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"send_minute": 540,
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timing_type": "before_start"
}
'import requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}"
payload = {
"bindings": [
{
"field": "customer.first_name",
"literal": "<string>"
}
],
"inbox_id": 12,
"is_active": False,
"minutes_before": 1440,
"name": "24-hour appointment reminder",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"send_minute": 540,
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timing_type": "before_start"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
bindings: [{field: 'customer.first_name', literal: '<string>'}],
inbox_id: 12,
is_active: false,
minutes_before: 1440,
name: '24-hour appointment reminder',
resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
send_minute: 540,
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
timing_type: 'before_start'
})
};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}', 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://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}",
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([
'bindings' => [
[
'field' => 'customer.first_name',
'literal' => '<string>'
]
],
'inbox_id' => 12,
'is_active' => false,
'minutes_before' => 1440,
'name' => '24-hour appointment reminder',
'resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'send_minute' => 540,
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'timing_type' => 'before_start'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}"
payload := strings.NewReader("{\n \"bindings\": [\n {\n \"field\": \"customer.first_name\",\n \"literal\": \"<string>\"\n }\n ],\n \"inbox_id\": 12,\n \"is_active\": false,\n \"minutes_before\": 1440,\n \"name\": \"24-hour appointment reminder\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"send_minute\": 540,\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timing_type\": \"before_start\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}")
.header("Content-Type", "application/json")
.body("{\n \"bindings\": [\n {\n \"field\": \"customer.first_name\",\n \"literal\": \"<string>\"\n }\n ],\n \"inbox_id\": 12,\n \"is_active\": false,\n \"minutes_before\": 1440,\n \"name\": \"24-hour appointment reminder\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"send_minute\": 540,\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timing_type\": \"before_start\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"bindings\": [\n {\n \"field\": \"customer.first_name\",\n \"literal\": \"<string>\"\n }\n ],\n \"inbox_id\": 12,\n \"is_active\": false,\n \"minutes_before\": 1440,\n \"name\": \"24-hour appointment reminder\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"send_minute\": 540,\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timing_type\": \"before_start\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": 123,
"activated_at": "2023-11-07T05:31:56Z",
"bindings": [
{
"field": "customer.first_name",
"literal": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inbox_id": 123,
"is_active": true,
"minutes_before": 123,
"name": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"send_minute": 123,
"template_category": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_language": "<string>",
"template_name": "<string>",
"template_status": "<string>",
"timing_type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}Path Parameters
HueChat account ID
Reminder rule UUID
Body
application/json
Reminder rule
Show child attributes
Show child attributes
Required range:
x >= 1Example:
12
Example:
false
Required range:
5 <= x <= 10080Example:
1440
Required string length:
1 - 120Example:
"24-hour appointment reminder"
Required range:
0 <= x <= 1439Example:
540
Available options:
before_start, previous_day Example:
"before_start"
Response
OK
Show child attributes
Show child attributes
⌘I
Update an appointment reminder rule
curl --request PUT \
--url https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId} \
--header 'Content-Type: application/json' \
--data '
{
"bindings": [
{
"field": "customer.first_name",
"literal": "<string>"
}
],
"inbox_id": 12,
"is_active": false,
"minutes_before": 1440,
"name": "24-hour appointment reminder",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"send_minute": 540,
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timing_type": "before_start"
}
'import requests
url = "https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}"
payload = {
"bindings": [
{
"field": "customer.first_name",
"literal": "<string>"
}
],
"inbox_id": 12,
"is_active": False,
"minutes_before": 1440,
"name": "24-hour appointment reminder",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"send_minute": 540,
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timing_type": "before_start"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
bindings: [{field: 'customer.first_name', literal: '<string>'}],
inbox_id: 12,
is_active: false,
minutes_before: 1440,
name: '24-hour appointment reminder',
resource_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
send_minute: 540,
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
timing_type: 'before_start'
})
};
fetch('https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}', 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://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}",
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([
'bindings' => [
[
'field' => 'customer.first_name',
'literal' => '<string>'
]
],
'inbox_id' => 12,
'is_active' => false,
'minutes_before' => 1440,
'name' => '24-hour appointment reminder',
'resource_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'send_minute' => 540,
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'timing_type' => 'before_start'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}"
payload := strings.NewReader("{\n \"bindings\": [\n {\n \"field\": \"customer.first_name\",\n \"literal\": \"<string>\"\n }\n ],\n \"inbox_id\": 12,\n \"is_active\": false,\n \"minutes_before\": 1440,\n \"name\": \"24-hour appointment reminder\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"send_minute\": 540,\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timing_type\": \"before_start\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}")
.header("Content-Type", "application/json")
.body("{\n \"bindings\": [\n {\n \"field\": \"customer.first_name\",\n \"literal\": \"<string>\"\n }\n ],\n \"inbox_id\": 12,\n \"is_active\": false,\n \"minutes_before\": 1440,\n \"name\": \"24-hour appointment reminder\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"send_minute\": 540,\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timing_type\": \"before_start\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.huechat.ai/api/v2/accounts/{accountId}/appointments/reminders/{reminderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"bindings\": [\n {\n \"field\": \"customer.first_name\",\n \"literal\": \"<string>\"\n }\n ],\n \"inbox_id\": 12,\n \"is_active\": false,\n \"minutes_before\": 1440,\n \"name\": \"24-hour appointment reminder\",\n \"resource_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"send_minute\": 540,\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"timing_type\": \"before_start\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": 123,
"activated_at": "2023-11-07T05:31:56Z",
"bindings": [
{
"field": "customer.first_name",
"literal": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inbox_id": 123,
"is_active": true,
"minutes_before": 123,
"name": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_name": "<string>",
"send_minute": 123,
"template_category": "<string>",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_language": "<string>",
"template_name": "<string>",
"template_status": "<string>",
"timing_type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}{
"error": "<string>",
"limit": "<string>"
}
