Upsert Group And Usecases
curl --request POST \
--url https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_id": "68a8652f82513625d1c21a85",
"name": "Appointment Reminders",
"sheet_link": "https://1drv.ms/x/...",
"start_time": "08:00:00",
"timezone": "America/Chicago",
"use_cases": [
{
"actions": [
{
"action_type": "SMS",
"context": "reminder_7d",
"day": 7,
"template_name": "First SMS"
},
{
"action_type": "CALL",
"context": "reminder_1d",
"day": 1,
"template_name": "Day 1 Call"
}
],
"enabled": true,
"use_case": "NEW_PATIENT_APPOINTMENT_REMINDER"
},
{
"actions": [
{
"action_type": "SMS",
"context": "lab_result_sms",
"day": 0,
"template_name": "Lab Result SMS"
}
],
"enabled": true,
"use_case": "LAB_REMINDER"
}
]
}
'import requests
url = "https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups"
payload = {
"assistant_id": "68a8652f82513625d1c21a85",
"name": "Appointment Reminders",
"sheet_link": "https://1drv.ms/x/...",
"start_time": "08:00:00",
"timezone": "America/Chicago",
"use_cases": [
{
"actions": [
{
"action_type": "SMS",
"context": "reminder_7d",
"day": 7,
"template_name": "First SMS"
},
{
"action_type": "CALL",
"context": "reminder_1d",
"day": 1,
"template_name": "Day 1 Call"
}
],
"enabled": True,
"use_case": "NEW_PATIENT_APPOINTMENT_REMINDER"
},
{
"actions": [
{
"action_type": "SMS",
"context": "lab_result_sms",
"day": 0,
"template_name": "Lab Result SMS"
}
],
"enabled": True,
"use_case": "LAB_REMINDER"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assistant_id: '68a8652f82513625d1c21a85',
name: 'Appointment Reminders',
sheet_link: 'https://1drv.ms/x/...',
start_time: '08:00:00',
timezone: 'America/Chicago',
use_cases: [
{
actions: [
{action_type: 'SMS', context: 'reminder_7d', day: 7, template_name: 'First SMS'},
{
action_type: 'CALL',
context: 'reminder_1d',
day: 1,
template_name: 'Day 1 Call'
}
],
enabled: true,
use_case: 'NEW_PATIENT_APPOINTMENT_REMINDER'
},
{
actions: [
{
action_type: 'SMS',
context: 'lab_result_sms',
day: 0,
template_name: 'Lab Result SMS'
}
],
enabled: true,
use_case: 'LAB_REMINDER'
}
]
})
};
fetch('https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups', 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://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assistant_id' => '68a8652f82513625d1c21a85',
'name' => 'Appointment Reminders',
'sheet_link' => 'https://1drv.ms/x/...',
'start_time' => '08:00:00',
'timezone' => 'America/Chicago',
'use_cases' => [
[
'actions' => [
[
'action_type' => 'SMS',
'context' => 'reminder_7d',
'day' => 7,
'template_name' => 'First SMS'
],
[
'action_type' => 'CALL',
'context' => 'reminder_1d',
'day' => 1,
'template_name' => 'Day 1 Call'
]
],
'enabled' => true,
'use_case' => 'NEW_PATIENT_APPOINTMENT_REMINDER'
],
[
'actions' => [
[
'action_type' => 'SMS',
'context' => 'lab_result_sms',
'day' => 0,
'template_name' => 'Lab Result SMS'
]
],
'enabled' => true,
'use_case' => 'LAB_REMINDER'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups"
payload := strings.NewReader("{\n \"assistant_id\": \"68a8652f82513625d1c21a85\",\n \"name\": \"Appointment Reminders\",\n \"sheet_link\": \"https://1drv.ms/x/...\",\n \"start_time\": \"08:00:00\",\n \"timezone\": \"America/Chicago\",\n \"use_cases\": [\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"reminder_7d\",\n \"day\": 7,\n \"template_name\": \"First SMS\"\n },\n {\n \"action_type\": \"CALL\",\n \"context\": \"reminder_1d\",\n \"day\": 1,\n \"template_name\": \"Day 1 Call\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"NEW_PATIENT_APPOINTMENT_REMINDER\"\n },\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"lab_result_sms\",\n \"day\": 0,\n \"template_name\": \"Lab Result SMS\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"LAB_REMINDER\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assistant_id\": \"68a8652f82513625d1c21a85\",\n \"name\": \"Appointment Reminders\",\n \"sheet_link\": \"https://1drv.ms/x/...\",\n \"start_time\": \"08:00:00\",\n \"timezone\": \"America/Chicago\",\n \"use_cases\": [\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"reminder_7d\",\n \"day\": 7,\n \"template_name\": \"First SMS\"\n },\n {\n \"action_type\": \"CALL\",\n \"context\": \"reminder_1d\",\n \"day\": 1,\n \"template_name\": \"Day 1 Call\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"NEW_PATIENT_APPOINTMENT_REMINDER\"\n },\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"lab_result_sms\",\n \"day\": 0,\n \"template_name\": \"Lab Result SMS\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"LAB_REMINDER\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assistant_id\": \"68a8652f82513625d1c21a85\",\n \"name\": \"Appointment Reminders\",\n \"sheet_link\": \"https://1drv.ms/x/...\",\n \"start_time\": \"08:00:00\",\n \"timezone\": \"America/Chicago\",\n \"use_cases\": [\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"reminder_7d\",\n \"day\": 7,\n \"template_name\": \"First SMS\"\n },\n {\n \"action_type\": \"CALL\",\n \"context\": \"reminder_1d\",\n \"day\": 1,\n \"template_name\": \"Day 1 Call\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"NEW_PATIENT_APPOINTMENT_REMINDER\"\n },\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"lab_result_sms\",\n \"day\": 0,\n \"template_name\": \"Lab Result SMS\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"LAB_REMINDER\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Use Cases
Upsert Group And Usecases
Create or update a UseCaseGroup and REPLACE its use-case configs with the provided list in one call.
- If payload.group_id is provided, update the existing group; otherwise create a new one.
- The set of configs under the group will be made to exactly match payload.use_cases. • If payload.use_cases is empty, all existing configs for the group are deleted.
POST
/
integrations
/
v1
/
integrations
/
{integration}
/
use-case-groups
Upsert Group And Usecases
curl --request POST \
--url https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_id": "68a8652f82513625d1c21a85",
"name": "Appointment Reminders",
"sheet_link": "https://1drv.ms/x/...",
"start_time": "08:00:00",
"timezone": "America/Chicago",
"use_cases": [
{
"actions": [
{
"action_type": "SMS",
"context": "reminder_7d",
"day": 7,
"template_name": "First SMS"
},
{
"action_type": "CALL",
"context": "reminder_1d",
"day": 1,
"template_name": "Day 1 Call"
}
],
"enabled": true,
"use_case": "NEW_PATIENT_APPOINTMENT_REMINDER"
},
{
"actions": [
{
"action_type": "SMS",
"context": "lab_result_sms",
"day": 0,
"template_name": "Lab Result SMS"
}
],
"enabled": true,
"use_case": "LAB_REMINDER"
}
]
}
'import requests
url = "https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups"
payload = {
"assistant_id": "68a8652f82513625d1c21a85",
"name": "Appointment Reminders",
"sheet_link": "https://1drv.ms/x/...",
"start_time": "08:00:00",
"timezone": "America/Chicago",
"use_cases": [
{
"actions": [
{
"action_type": "SMS",
"context": "reminder_7d",
"day": 7,
"template_name": "First SMS"
},
{
"action_type": "CALL",
"context": "reminder_1d",
"day": 1,
"template_name": "Day 1 Call"
}
],
"enabled": True,
"use_case": "NEW_PATIENT_APPOINTMENT_REMINDER"
},
{
"actions": [
{
"action_type": "SMS",
"context": "lab_result_sms",
"day": 0,
"template_name": "Lab Result SMS"
}
],
"enabled": True,
"use_case": "LAB_REMINDER"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assistant_id: '68a8652f82513625d1c21a85',
name: 'Appointment Reminders',
sheet_link: 'https://1drv.ms/x/...',
start_time: '08:00:00',
timezone: 'America/Chicago',
use_cases: [
{
actions: [
{action_type: 'SMS', context: 'reminder_7d', day: 7, template_name: 'First SMS'},
{
action_type: 'CALL',
context: 'reminder_1d',
day: 1,
template_name: 'Day 1 Call'
}
],
enabled: true,
use_case: 'NEW_PATIENT_APPOINTMENT_REMINDER'
},
{
actions: [
{
action_type: 'SMS',
context: 'lab_result_sms',
day: 0,
template_name: 'Lab Result SMS'
}
],
enabled: true,
use_case: 'LAB_REMINDER'
}
]
})
};
fetch('https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups', 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://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assistant_id' => '68a8652f82513625d1c21a85',
'name' => 'Appointment Reminders',
'sheet_link' => 'https://1drv.ms/x/...',
'start_time' => '08:00:00',
'timezone' => 'America/Chicago',
'use_cases' => [
[
'actions' => [
[
'action_type' => 'SMS',
'context' => 'reminder_7d',
'day' => 7,
'template_name' => 'First SMS'
],
[
'action_type' => 'CALL',
'context' => 'reminder_1d',
'day' => 1,
'template_name' => 'Day 1 Call'
]
],
'enabled' => true,
'use_case' => 'NEW_PATIENT_APPOINTMENT_REMINDER'
],
[
'actions' => [
[
'action_type' => 'SMS',
'context' => 'lab_result_sms',
'day' => 0,
'template_name' => 'Lab Result SMS'
]
],
'enabled' => true,
'use_case' => 'LAB_REMINDER'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups"
payload := strings.NewReader("{\n \"assistant_id\": \"68a8652f82513625d1c21a85\",\n \"name\": \"Appointment Reminders\",\n \"sheet_link\": \"https://1drv.ms/x/...\",\n \"start_time\": \"08:00:00\",\n \"timezone\": \"America/Chicago\",\n \"use_cases\": [\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"reminder_7d\",\n \"day\": 7,\n \"template_name\": \"First SMS\"\n },\n {\n \"action_type\": \"CALL\",\n \"context\": \"reminder_1d\",\n \"day\": 1,\n \"template_name\": \"Day 1 Call\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"NEW_PATIENT_APPOINTMENT_REMINDER\"\n },\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"lab_result_sms\",\n \"day\": 0,\n \"template_name\": \"Lab Result SMS\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"LAB_REMINDER\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assistant_id\": \"68a8652f82513625d1c21a85\",\n \"name\": \"Appointment Reminders\",\n \"sheet_link\": \"https://1drv.ms/x/...\",\n \"start_time\": \"08:00:00\",\n \"timezone\": \"America/Chicago\",\n \"use_cases\": [\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"reminder_7d\",\n \"day\": 7,\n \"template_name\": \"First SMS\"\n },\n {\n \"action_type\": \"CALL\",\n \"context\": \"reminder_1d\",\n \"day\": 1,\n \"template_name\": \"Day 1 Call\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"NEW_PATIENT_APPOINTMENT_REMINDER\"\n },\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"lab_result_sms\",\n \"day\": 0,\n \"template_name\": \"Lab Result SMS\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"LAB_REMINDER\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-qa.interactly.ai/integrations/v1/integrations/{integration}/use-case-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assistant_id\": \"68a8652f82513625d1c21a85\",\n \"name\": \"Appointment Reminders\",\n \"sheet_link\": \"https://1drv.ms/x/...\",\n \"start_time\": \"08:00:00\",\n \"timezone\": \"America/Chicago\",\n \"use_cases\": [\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"reminder_7d\",\n \"day\": 7,\n \"template_name\": \"First SMS\"\n },\n {\n \"action_type\": \"CALL\",\n \"context\": \"reminder_1d\",\n \"day\": 1,\n \"template_name\": \"Day 1 Call\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"NEW_PATIENT_APPOINTMENT_REMINDER\"\n },\n {\n \"actions\": [\n {\n \"action_type\": \"SMS\",\n \"context\": \"lab_result_sms\",\n \"day\": 0,\n \"template_name\": \"Lab Result SMS\"\n }\n ],\n \"enabled\": true,\n \"use_case\": \"LAB_REMINDER\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Path Parameters
Available options:
microsoft, google Body
application/json
Human friendly group name
Optional explicit slug; if omitted will be generated
Associated sheet link for this group
Assistant identifier bound to this group
Timezone identifier e.g. America/Chicago
Time of day to run the use-case group (HH:MM:SS)
If provided, updates the existing group; otherwise creates a new group
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
List of use-case configurations to upsert under this group
Show child attributes
Show child attributes
Response
Successful Response
⌘I