Create Feature Assignment
curl --request POST \
--url https://api.telegent.com/v1.0/subscriptions/features/assignments/add \
--header 'Content-Type: application/json' \
--data '
{
"FeatureId": "FEID-00000001-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
'import requests
url = "https://api.telegent.com/v1.0/subscriptions/features/assignments/add"
payload = {
"FeatureId": "FEID-00000001-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
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({
FeatureId: 'FEID-00000001-0000-0000-0000-000000000001',
SubscriptionId: 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
})
};
fetch('https://api.telegent.com/v1.0/subscriptions/features/assignments/add', 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/subscriptions/features/assignments/add",
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([
'FeatureId' => 'FEID-00000001-0000-0000-0000-000000000001',
'SubscriptionId' => 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
]),
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/subscriptions/features/assignments/add"
payload := strings.NewReader("{\n \"FeatureId\": \"FEID-00000001-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\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/subscriptions/features/assignments/add")
.header("Content-Type", "application/json")
.body("{\n \"FeatureId\": \"FEID-00000001-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/subscriptions/features/assignments/add")
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 \"FeatureId\": \"FEID-00000001-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}"
response = http.request(request)
puts response.read_body{
"FeatureAssignmentId": "FAID-00000001-0000-0000-0000-000000000001",
"FeatureId": "FEID-00000001-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c",
"Active": true
}{
"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>"
}Subscriptions
Create Feature Assignment
Assign an existing feature to a subscription, enabling that subscription to use the feature’s capability.
What this does: Returns the new FeatureAssignmentId and assignment record. A feature can be assigned to multiple subscriptions; each assignment is tracked independently.
Next steps:
- View all assignments for this feature —
GET /v1.0/subscriptions/features/assignments - Remove the assignment —
POST /v1.0/subscriptions/features/assignments/delete
POST
/
v1.0
/
subscriptions
/
features
/
assignments
/
add
Create Feature Assignment
curl --request POST \
--url https://api.telegent.com/v1.0/subscriptions/features/assignments/add \
--header 'Content-Type: application/json' \
--data '
{
"FeatureId": "FEID-00000001-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
'import requests
url = "https://api.telegent.com/v1.0/subscriptions/features/assignments/add"
payload = {
"FeatureId": "FEID-00000001-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c"
}
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({
FeatureId: 'FEID-00000001-0000-0000-0000-000000000001',
SubscriptionId: 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
})
};
fetch('https://api.telegent.com/v1.0/subscriptions/features/assignments/add', 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/subscriptions/features/assignments/add",
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([
'FeatureId' => 'FEID-00000001-0000-0000-0000-000000000001',
'SubscriptionId' => 'SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c'
]),
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/subscriptions/features/assignments/add"
payload := strings.NewReader("{\n \"FeatureId\": \"FEID-00000001-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\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/subscriptions/features/assignments/add")
.header("Content-Type", "application/json")
.body("{\n \"FeatureId\": \"FEID-00000001-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/subscriptions/features/assignments/add")
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 \"FeatureId\": \"FEID-00000001-0000-0000-0000-000000000001\",\n \"SubscriptionId\": \"SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c\"\n}"
response = http.request(request)
puts response.read_body{
"FeatureAssignmentId": "FAID-00000001-0000-0000-0000-000000000001",
"FeatureId": "FEID-00000001-0000-0000-0000-000000000001",
"SubscriptionId": "SUB-ef84c0b5-d750-4a5a-99b1-4705089cd20c",
"Active": true
}{
"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/jsontext/jsonapplication/*+json
Feature_Assignment object
Response
Success — returns the new feature assignment ID and record
The response is of type object.
⌘I