Skip to main content
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
WorkgroupId
string
required

Parent workgroup ID to add this activity to

Example:

"WID-12345-abc-12345"

Type
enum<string>
required

Member type - User or nested Workgroup

Available options:
User,
Workgroup
Example:

"Workgroup"

DigitOrder
integer

IVR digit or ring order position for this member

Example:

1

PhoneNumber
string

Phone number for this activity member (E.164 format)

Example:

"+1234567890"

ReferenceWorkgroupId
string

Referenced workgroup ID (when Type is Workgroup)

Example:

"WID-12345-abc-12345"

ReferenceUserId
string

Referenced user ID (when Type is User)

SmsNotification
boolean

Enable SMS notification for this member

Example:

true

EmailNotification
boolean

Enable email notification for this member

Example:

false

Response

Workgroup Activity Created

The response is of type object.