Appointments API v2 (Reference) v1.0.0
Appointments API v2 reference.
You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which itself is generated from annotations in the source code of the project. It is possible that this documentation includes bugs and that code samples are incomplete or wrong.
Authentication
- JWT Bearer token
- Header: Authorization: Bearer <JWT>. Authentication and authorization using a valid JWT token
Schedule & Manage Appointments
Retrieve All Appointments with Optional Filtering
GET /api/v2/appointments/ HTTP/1.1
Accept: application/json
Base paths: /api/v2/appointments
Retrieves a paginated list of all available appointments, with the ability to apply filters based on organizer IDs, agent IDs, appointment durations, and date ranges. The use of certain filters, specifically organizerId (deprecated) and agentId, is dependent on the user's role and application settings.
NOTE:
- When Settings -> Call Scheduling -> Appointments -> "Agents can only view appointments assigned to them" is enabled (default), non-supervisors are restricted to their own user ID. Any
agentIdororganizerIdvalues are ignored, and results include appointments where the caller is the organizer OR the assigned agent. In this mode, filters are replaced by the caller's authenticated user ID from the access token (JWT). - ROLE_SUPERVISOR: Can filter by
agentIdor (deprecated)organizerId. IfagentIdis provided,organizerIdis ignored.
Required authorization: ROLE_AGENT, ROLE_SUPERVISOR, or ROLE_CLIENT_SERVICE
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| applicationId | query | string | false | Unique application identifier |
| organizerId | query | array[string] | false | Deprecated: use AgentIDs. |
| agentId | query | array[string] | false | AgentIDs filters appointments by the assigned agent. |
| duration | query | array[string] | false | Slots filters appointments by their duration. |
| range | query | array[string] | false | Range filters appointments within a specified start and end date range. |
| pageSize | query | integer(int64) | false | Page size - number of items per page. |
| pageNumber | query | integer(int64) | false | Page number - 1-based page index. |
| sortOrder | query | string | false | Sort order - ascending or descending. |
| sortField | query | string | false | Field to use for sorting. |
Detailed descriptions
organizerId: Deprecated: use AgentIDs. OrganizerIDs filters appointments by organizer. It accepts a list of organizer ID values (comma-separated). This filter is applicable only when authorized with ROLE_SUPERVISOR; otherwise, it is ignored. If agentId is provided, organizerId is ignored.
agentId: AgentIDs filters appointments by the assigned agent. Accepts a comma-separated list of agent IDs. For non-supervisors, when the "Agents can only view appointments assigned to them" option is enabled, the provided agentId is ignored and replaced by the caller's authenticated user ID from the access token (JWT).
duration: Slots filters appointments by their duration. It accepts a list of duration values (comma-separated). Duration values use an ISO-8601 day/time subset: PnD, PTnH, PTnM, PTnS (fractional values supported). Week/month/year designators (W, M in date part, Y) are not supported.
range: Range filters appointments within a specified start and end date range. It accepts a range (comma-separated) specified as start and end dates in UTC, in ISO 8601 format.
Enumerated Values
| Parameter | Value |
|---|---|
| sortOrder | asc |
| sortOrder | desc |
Responses
Overview
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | FindAppointmentsResponsePaged |
| 400 | Bad Request | BadRequest. The request was malformed or missing required query parameters. | None |
| 401 | Unauthorized | Unauthorized. Authorization information is missing or invalid. | None |
| 403 | Forbidden | Forbidden. Access to the requested resource or operation is forbidden. | None |
| 404 | Not Found | StatusNotFound. No appointments found matching the criteria. | None |
| 500 | Internal Server Error | Internal Server Error. An unexpected error occurred, preventing the successful processing of the request. | None |
Examples
200 Response
{
"content": [
{
"applicationId": "bf8215e5-a39e-490a-a0e2-07df6a3d8c1f",
"duration": "PT5M0s (5 minutes)",
"end": "2022-01-31T19:05:00.0Z",
"id": "f46f165d-383a-4432-9a3e-9c805a152e0c",
"interaction": {
"acceptedBy": [
{
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
}
],
"customFields": {
"property1": "string",
"property2": "string"
},
"errorData": {
"systemMessage": "string",
"userMessage": "string"
},
"initiatedBy": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
},
"properties": {
"property1": "string",
"property2": "string"
},
"routing": {
"properties": {
"chatMode": "genesys-cloud",
"deploymentId": "c461a74-af3a-4b55-a461-bafbf077a34e"
},
"type": "GENESYS_CLOUD_FLOW"
},
"state": "PENDING"
},
"locale": "en_US",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": "{\"x-channel\": widget\"}",
"notificationsActive": true,
"organizer": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"type": "CUSTOMER"
},
"participants": [
{
"id": "2460b086-8d27-4cd3-a7ef-cdc8b4c17f0c",
"type": "CUSTOMER"
},
{
"id": "36c1r718-9ab5-48c9-aeab-fas5f37b0ec4",
"type": "AGENT"
}
],
"start": "2022-01-31T19:00:00.0Z",
"targetAssignment": {
"id": "string",
"type": "string"
},
"timezone": "Europe/Berlin",
"title": "Product installation review"
}
],
"pageCount": 4,
"pageNumber": 1,
"pageSize": 25,
"sortField": "name",
"sortOrder": "asc",
"total": 100
}
To perform this operation, you must be authenticated by means of one of the following methods: jwtBearerToken
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X GET /api/v2/appointments/ \
-H 'Accept: application/json' \ -H 'Authorization: Bearer <JWT>'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer <JWT>"},
}
var body []byte
// body = ...
req, err := http.NewRequest("GET", "/api/v2/appointments/", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const headers = {
'Accept': 'application/json', 'Authorization': "Bearer <JWT>"
}
fetch('/api/v2/appointments/', {
method: 'GET',
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("/api/v2/appointments/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Accept': 'application/json',
'Authorization': "Bearer <JWT>"
}
r = requests.get(
'/api/v2/appointments/',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => "Bearer <JWT>"
}
result = RestClient.get '/api/v2/appointments/',
params: {}, headers: headers
p JSON.parse(result)
Schedule a New Appointment
POST /api/v2/appointments/ HTTP/1.1
Content-Type: application/json
Accept: application/json
Base paths: /api/v2/appointments
Creates a new appointment and returns appointment details. Access details for joining are returned only after activation.
This operation also supports specifying interaction routing information, which enables the explicit setting of a Genesys Widget deployment of choice and accommodates different routing types for customer interactions. Interaction routing is crucial for directing the scheduled appointment through the desired channels and ensuring the optimal engagement experience.
For detailed information on interaction routing and how to configure it in your schedule appointment requests, refer to our comprehensive guide: Interaction routing for Appointments.
NOTE:
- If
interaction.routing.properties.chatModeis omitted, defaults aregenesys-web-messagingfor Genesys andtalkdesk-digital-connectfor Talkdesk. - Explicit
chatModevalues are preserved. - If application-specific notifications are active and properly configured, relevant notifications are dispatched to inform customers accordingly.
Required authorization: ROLE_AGENT or ROLE_CLIENT_SERVICE
Request body
{
"applicationId": "bf8215e5-a39e-490a-a0e2-07df6a3d8c1f",
"customers": [
{
"contact": {
"primaryEmail": "user@provider.net",
"primaryPhone": "2102234988"
},
"metadata": {
"refNo": "CS-9838"
},
"name": {
"firstName": "Bobby",
"lastName": "Ewing"
},
"username": "ewingb@myorg.com"
}
],
"duration": "\"PT5M\"",
"interaction": {
"customFields": {
"property1": "string",
"property2": "string"
},
"routing": {
"properties": "{\"deploymentId\": \"c461a74-af3a-4b55-a461-bafbf077a34e\", \"chatMode\": \"genesys-cloud\"} or {\"deploymentId\": \"c461a74-af3a-4b55-a461-bafbf077a34e\", \"chatMode\": \"genesys-web-messaging\"} or {\"touchpointId\": \"c461a74-af3a-4b55-a461-bafbf077a34e\", \"chatMode\": \"talkdesk-digital-connect\"}",
"type": "GENESYS_CLOUD_FLOW or TALKDESK_DIGITAL_CONNECT"
}
},
"locale": "\"en-GB\"",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": "{\"x-channel\": widget\"}",
"start": "\"2022-01-31T19:00:00.0Z\"",
"targetAssignment": {
"id": "string",
"type": "string"
},
"timezone": "\"Europe/Berlin\"",
"title": "Product installation review"
}
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | ScheduleAppointmentRequest | false | none |
Responses
Overview
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | AppointmentResponse |
| 400 | Bad Request | Bad request. The request was malformed or missing required fields. | None |
| 401 | Unauthorized | Unauthorized. Authorization information is missing or invalid. | None |
| 403 | Forbidden | Forbidden. Access to the requested resource or operation is forbidden. | None |
| 500 | Internal Server Error | Internal Server Error. An unexpected error occurred, preventing the successful processing of the request. | None |
Examples
200 Response
{
"applicationId": "bf8215e5-a39e-490a-a0e2-07df6a3d8c1f",
"duration": "PT5M0s (5 minutes)",
"end": "2022-01-31T19:05:00.0Z",
"id": "f46f165d-383a-4432-9a3e-9c805a152e0c",
"interaction": {
"acceptedBy": [
{
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
}
],
"customFields": {
"property1": "string",
"property2": "string"
},
"errorData": {
"systemMessage": "string",
"userMessage": "string"
},
"initiatedBy": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
},
"properties": {
"property1": "string",
"property2": "string"
},
"routing": {
"properties": {
"chatMode": "genesys-cloud",
"deploymentId": "c461a74-af3a-4b55-a461-bafbf077a34e"
},
"type": "GENESYS_CLOUD_FLOW"
},
"state": "PENDING"
},
"locale": "en_US",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": "{\"x-channel\": widget\"}",
"notificationsActive": true,
"organizer": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"type": "CUSTOMER"
},
"participants": [
{
"id": "2460b086-8d27-4cd3-a7ef-cdc8b4c17f0c",
"type": "CUSTOMER"
},
{
"id": "36c1r718-9ab5-48c9-aeab-fas5f37b0ec4",
"type": "AGENT"
}
],
"secureToken": "string",
"start": "2022-01-31T19:00:00.0Z",
"targetAssignment": {
"id": "string",
"type": "string"
},
"timezone": "Europe/Berlin",
"title": "Product installation review"
}
To perform this operation, you must be authenticated by means of one of the following methods: jwtBearerToken
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X POST /api/v2/appointments/ \
-H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <JWT>'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer <JWT>"},
}
var body []byte
// body = ...
req, err := http.NewRequest("POST", "/api/v2/appointments/", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const input = '{
"applicationId": "bf8215e5-a39e-490a-a0e2-07df6a3d8c1f",
"customers": [
{
"contact": {
"primaryEmail": "user@provider.net",
"primaryPhone": "2102234988"
},
"metadata": {
"refNo": "CS-9838"
},
"name": {
"firstName": "Bobby",
"lastName": "Ewing"
},
"username": "ewingb@myorg.com"
}
],
"duration": "\"PT5M\"",
"interaction": {
"customFields": {
"property1": "string",
"property2": "string"
},
"routing": {
"properties": "{\"deploymentId\": \"c461a74-af3a-4b55-a461-bafbf077a34e\", \"chatMode\": \"genesys-cloud\"} or {\"deploymentId\": \"c461a74-af3a-4b55-a461-bafbf077a34e\", \"chatMode\": \"genesys-web-messaging\"} or {\"touchpointId\": \"c461a74-af3a-4b55-a461-bafbf077a34e\", \"chatMode\": \"talkdesk-digital-connect\"}",
"type": "GENESYS_CLOUD_FLOW or TALKDESK_DIGITAL_CONNECT"
}
},
"locale": "\"en-GB\"",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": "{\"x-channel\": widget\"}",
"start": "\"2022-01-31T19:00:00.0Z\"",
"targetAssignment": {
"id": "string",
"type": "string"
},
"timezone": "\"Europe/Berlin\"",
"title": "Product installation review"
}';
const headers = {
'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': "Bearer <JWT>"
}
fetch('/api/v2/appointments/', {
method: 'POST',
body: input,
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("/api/v2/appointments/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': "Bearer <JWT>"
}
r = requests.post(
'/api/v2/appointments/',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => "Bearer <JWT>"
}
result = RestClient.post '/api/v2/appointments/',
params: {}, headers: headers
p JSON.parse(result)
UpdateAppointment an Existing Appointment
PUT /api/v2/appointments/ HTTP/1.1
Content-Type: application/json
Accept: application/json
Base paths: /api/v2/appointments
Updates the details of an existing appointment, such as title, notes, metadata, and optional customer profile fields. Customer updates target customer.id when customer data is provided.
NOTE: Sending empty data for any field will overwrite any previously saved information for that field. This behavior is intentional to allow for the clearing of information. Ensure that only fields intended to be updated or cleared are included in the request.
Required authorization: ROLE_AGENT, ROLE_SUPERVISOR, or ROLE_CLIENT_SERVICE
Request body
{
"customer": {
"contact": {
"primaryEmail": "user@provider.net",
"primaryPhone": "2102234988"
},
"id": "string",
"metadata": {
"refNo": "CS-9838"
},
"name": {
"firstName": "Bobby",
"lastName": "Ewing"
},
"username": "ewingb@myorg.com"
},
"id": "f46f165d-383a-4432-9a3e-9c805a152e0c",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": {
"property1": "string",
"property2": "string"
},
"title": "Product installation review"
}
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | UpdateAppointmentRequest | false | none |
Responses
Overview
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | AppointmentResponse |
| 400 | Bad Request | Bad request. The request was malformed or missing required fields. | None |
| 401 | Unauthorized | Unauthorized. Authorization information is missing or invalid. | None |
| 403 | Forbidden | Forbidden. Access to the requested resource or operation is forbidden. | None |
| 404 | Not Found | StatusNotFound. The specified appointment could not be found. | None |
| 500 | Internal Server Error | Internal Server Error. An unexpected error occurred, preventing the successful processing of the request. | None |
Examples
200 Response
{
"applicationId": "bf8215e5-a39e-490a-a0e2-07df6a3d8c1f",
"duration": "PT5M0s (5 minutes)",
"end": "2022-01-31T19:05:00.0Z",
"id": "f46f165d-383a-4432-9a3e-9c805a152e0c",
"interaction": {
"acceptedBy": [
{
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
}
],
"customFields": {
"property1": "string",
"property2": "string"
},
"errorData": {
"systemMessage": "string",
"userMessage": "string"
},
"initiatedBy": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
},
"properties": {
"property1": "string",
"property2": "string"
},
"routing": {
"properties": {
"chatMode": "genesys-cloud",
"deploymentId": "c461a74-af3a-4b55-a461-bafbf077a34e"
},
"type": "GENESYS_CLOUD_FLOW"
},
"state": "PENDING"
},
"locale": "en_US",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": "{\"x-channel\": widget\"}",
"notificationsActive": true,
"organizer": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"type": "CUSTOMER"
},
"participants": [
{
"id": "2460b086-8d27-4cd3-a7ef-cdc8b4c17f0c",
"type": "CUSTOMER"
},
{
"id": "36c1r718-9ab5-48c9-aeab-fas5f37b0ec4",
"type": "AGENT"
}
],
"secureToken": "string",
"start": "2022-01-31T19:00:00.0Z",
"targetAssignment": {
"id": "string",
"type": "string"
},
"timezone": "Europe/Berlin",
"title": "Product installation review"
}
To perform this operation, you must be authenticated by means of one of the following methods: jwtBearerToken
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X PUT /api/v2/appointments/ \
-H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <JWT>'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer <JWT>"},
}
var body []byte
// body = ...
req, err := http.NewRequest("PUT", "/api/v2/appointments/", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const input = '{
"customer": {
"contact": {
"primaryEmail": "user@provider.net",
"primaryPhone": "2102234988"
},
"id": "string",
"metadata": {
"refNo": "CS-9838"
},
"name": {
"firstName": "Bobby",
"lastName": "Ewing"
},
"username": "ewingb@myorg.com"
},
"id": "f46f165d-383a-4432-9a3e-9c805a152e0c",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": {
"property1": "string",
"property2": "string"
},
"title": "Product installation review"
}';
const headers = {
'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': "Bearer <JWT>"
}
fetch('/api/v2/appointments/', {
method: 'PUT',
body: input,
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("/api/v2/appointments/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': "Bearer <JWT>"
}
r = requests.put(
'/api/v2/appointments/',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => "Bearer <JWT>"
}
result = RestClient.put '/api/v2/appointments/',
params: {}, headers: headers
p JSON.parse(result)
Activate an Appointment
POST /api/v2/appointments/activate/{id} HTTP/1.1
Accept: application/json
Base paths: /api/v2/appointments
Explicitly activates a previously scheduled appointment, making it ready for use. If the appointment is already active, this operation returns the existing room details without creating new resources.
NOTE: Auto-activation is enabled by default for most applications, so explicit activation is usually unnecessary. Use this endpoint only when auto-activation is disabled or when you need to force activation earlier. When activation happens here and invite notifications are configured, ROOM/invite notifications are triggered.
Required authorization: ROLE_AGENT, ROLE_SUPERVISOR, or ROLE_CLIENT_SERVICE
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | true | Id is the unique identifier of the appointment to be activated. |
Responses
Overview
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | AppointmentResponse |
| 400 | Bad Request | Bad request. The request was malformed or missing required fields. | None |
| 401 | Unauthorized | Unauthorized. Authorization information is missing or invalid. | None |
| 403 | Forbidden | Forbidden. Access to the requested resource or operation is forbidden. | None |
| 404 | Not Found | StatusNotFound. The specified appointment could not be found. | None |
| 500 | Internal Server Error | Internal Server Error. An unexpected error occurred, preventing the successful processing of the request. | None |
Examples
200 Response
{
"applicationId": "bf8215e5-a39e-490a-a0e2-07df6a3d8c1f",
"duration": "PT5M0s (5 minutes)",
"end": "2022-01-31T19:05:00.0Z",
"id": "f46f165d-383a-4432-9a3e-9c805a152e0c",
"interaction": {
"acceptedBy": [
{
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
}
],
"customFields": {
"property1": "string",
"property2": "string"
},
"errorData": {
"systemMessage": "string",
"userMessage": "string"
},
"initiatedBy": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"timestamp": "2019-08-24T14:15:22Z",
"type": "CUSTOMER"
},
"properties": {
"property1": "string",
"property2": "string"
},
"routing": {
"properties": {
"chatMode": "genesys-cloud",
"deploymentId": "c461a74-af3a-4b55-a461-bafbf077a34e"
},
"type": "GENESYS_CLOUD_FLOW"
},
"state": "PENDING"
},
"locale": "en_US",
"metadata": {
"prop1": {}
},
"notes": "CRM ref: 3nv-1gt-4rt",
"notificationHeaders": "{\"x-channel\": widget\"}",
"notificationsActive": true,
"organizer": {
"id": "c59a1ee2-e71d-4370-9ac8-26de220104db",
"type": "CUSTOMER"
},
"participants": [
{
"id": "2460b086-8d27-4cd3-a7ef-cdc8b4c17f0c",
"type": "CUSTOMER"
},
{
"id": "36c1r718-9ab5-48c9-aeab-fas5f37b0ec4",
"type": "AGENT"
}
],
"secureToken": "string",
"start": "2022-01-31T19:00:00.0Z",
"targetAssignment": {
"id": "string",
"type": "string"
},
"timezone": "Europe/Berlin",
"title": "Product installation review"
}
To perform this operation, you must be authenticated by means of one of the following methods: jwtBearerToken
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X POST /api/v2/appointments/activate/{id} \
-H 'Accept: application/json' \ -H 'Authorization: Bearer <JWT>'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer <JWT>"},
}
var body []byte
// body = ...
req, err := http.NewRequest("POST", "/api/v2/appointments/activate/{id}", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const headers = {
'Accept': 'application/json', 'Authorization': "Bearer <JWT>"
}
fetch('/api/v2/appointments/activate/{id}', {
method: 'POST',
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("/api/v2/appointments/activate/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Accept': 'application/json',
'Authorization': "Bearer <JWT>"
}
r = requests.post(
'/api/v2/appointments/activate/{id}',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => "Bearer <JWT>"
}
result = RestClient.post '/api/v2/appointments/activate/{id}',
params: {}, headers: headers
p JSON.parse(result)
Schedule a New Appointment as Customer
POST /api/v2/appointments/basic HTTP/1.1
Content-Type: application/json
Accept: application/json
Base paths: /api/v2/appointments
Schedule a new appointment as a customer with OTP verification.
For detailed routing rules, see: Interaction routing for Appointments.
NOTE:
- If
interaction.routing.properties.chatModeis omitted, defaults aregenesys-web-messagingfor Genesys andtalkdesk-digital-connectfor Talkdesk. - Explicit
chatModevalues are preserved. - If application-specific notifications are active and properly configured, relevant notifications are dispatched to inform customers accordingly.
Required authorization: Basic authentication with OTP Verification