json
{
"DigitOrder": 1,
"PhoneNumber": "+1234567890",
"WorkgroupId": "WID-12345-abc-12345",
"Type": "Workgroup",
"ReferenceWorkgroupId": "WID-12345-abc-12345",
"ReferenceUserId": "",
"SmsNotification": true,
"EmailNotification": false
}curl -X POST https://api.telegent.com/v1.0/workgroups/activity \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"DigitOrder": 1,
"WorkgroupId": "WID-12345-abc-12345",
"Type": "User",
"ReferenceUserId": "USER-abc-123"
}'import requests
url = "https://api.telegent.com/v1.0/workgroups/activity"
payload = {
"WorkgroupId": "WID-12345-abc-12345",
"Type": "Workgroup",
"DigitOrder": 1,
"PhoneNumber": "+1234567890",
"ReferenceWorkgroupId": "WID-12345-abc-12345",
"ReferenceUserId": "<string>",
"SmsNotification": True,
"EmailNotification": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
WorkgroupId: 'WID-12345-abc-12345',
Type: 'Workgroup',
DigitOrder: 1,
PhoneNumber: '+1234567890',
ReferenceWorkgroupId: 'WID-12345-abc-12345',
ReferenceUserId: '<string>',
SmsNotification: true,
EmailNotification: false
})
};
fetch('https://api.telegent.com/v1.0/workgroups/activity', 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.telegent.com/v1.0/workgroups/activity",
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([
'WorkgroupId' => 'WID-12345-abc-12345',
'Type' => 'Workgroup',
'DigitOrder' => 1,
'PhoneNumber' => '+1234567890',
'ReferenceWorkgroupId' => 'WID-12345-abc-12345',
'ReferenceUserId' => '<string>',
'SmsNotification' => true,
'EmailNotification' => false
]),
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://api.telegent.com/v1.0/workgroups/activity"
payload := strings.NewReader("{\n \"WorkgroupId\": \"WID-12345-abc-12345\",\n \"Type\": \"Workgroup\",\n \"DigitOrder\": 1,\n \"PhoneNumber\": \"+1234567890\",\n \"ReferenceWorkgroupId\": \"WID-12345-abc-12345\",\n \"ReferenceUserId\": \"<string>\",\n \"SmsNotification\": true,\n \"EmailNotification\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.telegent.com/v1.0/workgroups/activity")
.header("Content-Type", "application/json")
.body("{\n \"WorkgroupId\": \"WID-12345-abc-12345\",\n \"Type\": \"Workgroup\",\n \"DigitOrder\": 1,\n \"PhoneNumber\": \"+1234567890\",\n \"ReferenceWorkgroupId\": \"WID-12345-abc-12345\",\n \"ReferenceUserId\": \"<string>\",\n \"SmsNotification\": true,\n \"EmailNotification\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/workgroups/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"WorkgroupId\": \"WID-12345-abc-12345\",\n \"Type\": \"Workgroup\",\n \"DigitOrder\": 1,\n \"PhoneNumber\": \"+1234567890\",\n \"ReferenceWorkgroupId\": \"WID-12345-abc-12345\",\n \"ReferenceUserId\": \"<string>\",\n \"SmsNotification\": true,\n \"EmailNotification\": false\n}"
response = http.request(request)
puts response.read_body{
"WorkgroupActivityStatus": "Created",
"WorkgroupActivityId": "WAID-4dec6beb-3985-444b-8c06-8baa70dc1416"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Workgroups
Create Workgroup Activity
Add a member (user or nested workgroup) to an existing workgroup. Each activity defines how calls are distributed to that member including their position (DigitOrder) and notification preferences.
What this does: Returns the new activity record including the ActivityId and member configuration. Each activity represents one member in the workgroup ring sequence. The CallOrder field determines ring priority.
Next steps:
- Update a member —
POST /v1.0/workgroups/activity/update - Remove a member —
POST /v1.0/workgroups/activity/delete - View the workgroup —
GET /v1.0/workgroups
POST
/
v1.0
/
workgroups
/
activity
json
{
"DigitOrder": 1,
"PhoneNumber": "+1234567890",
"WorkgroupId": "WID-12345-abc-12345",
"Type": "Workgroup",
"ReferenceWorkgroupId": "WID-12345-abc-12345",
"ReferenceUserId": "",
"SmsNotification": true,
"EmailNotification": false
}curl -X POST https://api.telegent.com/v1.0/workgroups/activity \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"DigitOrder": 1,
"WorkgroupId": "WID-12345-abc-12345",
"Type": "User",
"ReferenceUserId": "USER-abc-123"
}'import requests
url = "https://api.telegent.com/v1.0/workgroups/activity"
payload = {
"WorkgroupId": "WID-12345-abc-12345",
"Type": "Workgroup",
"DigitOrder": 1,
"PhoneNumber": "+1234567890",
"ReferenceWorkgroupId": "WID-12345-abc-12345",
"ReferenceUserId": "<string>",
"SmsNotification": True,
"EmailNotification": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
WorkgroupId: 'WID-12345-abc-12345',
Type: 'Workgroup',
DigitOrder: 1,
PhoneNumber: '+1234567890',
ReferenceWorkgroupId: 'WID-12345-abc-12345',
ReferenceUserId: '<string>',
SmsNotification: true,
EmailNotification: false
})
};
fetch('https://api.telegent.com/v1.0/workgroups/activity', 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.telegent.com/v1.0/workgroups/activity",
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([
'WorkgroupId' => 'WID-12345-abc-12345',
'Type' => 'Workgroup',
'DigitOrder' => 1,
'PhoneNumber' => '+1234567890',
'ReferenceWorkgroupId' => 'WID-12345-abc-12345',
'ReferenceUserId' => '<string>',
'SmsNotification' => true,
'EmailNotification' => false
]),
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://api.telegent.com/v1.0/workgroups/activity"
payload := strings.NewReader("{\n \"WorkgroupId\": \"WID-12345-abc-12345\",\n \"Type\": \"Workgroup\",\n \"DigitOrder\": 1,\n \"PhoneNumber\": \"+1234567890\",\n \"ReferenceWorkgroupId\": \"WID-12345-abc-12345\",\n \"ReferenceUserId\": \"<string>\",\n \"SmsNotification\": true,\n \"EmailNotification\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.telegent.com/v1.0/workgroups/activity")
.header("Content-Type", "application/json")
.body("{\n \"WorkgroupId\": \"WID-12345-abc-12345\",\n \"Type\": \"Workgroup\",\n \"DigitOrder\": 1,\n \"PhoneNumber\": \"+1234567890\",\n \"ReferenceWorkgroupId\": \"WID-12345-abc-12345\",\n \"ReferenceUserId\": \"<string>\",\n \"SmsNotification\": true,\n \"EmailNotification\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/workgroups/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"WorkgroupId\": \"WID-12345-abc-12345\",\n \"Type\": \"Workgroup\",\n \"DigitOrder\": 1,\n \"PhoneNumber\": \"+1234567890\",\n \"ReferenceWorkgroupId\": \"WID-12345-abc-12345\",\n \"ReferenceUserId\": \"<string>\",\n \"SmsNotification\": true,\n \"EmailNotification\": false\n}"
response = http.request(request)
puts response.read_body{
"WorkgroupActivityStatus": "Created",
"WorkgroupActivityId": "WAID-4dec6beb-3985-444b-8c06-8baa70dc1416"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Body
application/json
Response
Workgroup Activity Created
The response is of type object.