Sub Account Enable or Disable
Deprication Warning
This document is archived and will be maintained only until September 15. Please refer to the latest documentation here for updated information.
1. Sub Account Management API
This API allows the Management of a sub account within the system. The request body must include all necessary attributes, including null values, as these are required to verify the request signature. The timestamp included must be no older than 30 minutes.
Generate the body with this structure:
Note
The timestamp should not be older than 30 minutes.
All request attributes must be present, including those with null values, as they are always used to verify the request signature.
{
"externalId": "172",
"name": "DEMO",
"isEnabled": true,
"zipCode": "49546-6911",
"address": "7429 35TH AVE NW LANSING, MI",
"city": null,
"state": null,
"country": "USA",
"settings": [
{
"externalId": null,
"key": "cameraModule",
"value": "true",
"valueType": "BOOLEAN"
},
{
"externalId": null,
"key": "noiseCancelling",
"value": "true",
"valueType": "BOOLEAN"
},
{
"externalId": null,
"key": "transcription",
"value": "true",
"valueType": "BOOLEAN"
},
{
"externalId": null,
"key": "playerAutoPlay",
"value": "true",
"valueType": "BOOLEAN"
},
{
"externalId": null,
"key": "audioMuted",
"value": "false",
"valueType": "BOOLEAN"
},
{
"externalId": null,
"key": "fullscreen",
"value": "true",
"valueType": "BOOLEAN"
},
{
"externalId": null,
"key": "downloadable",
"value": "false",
"valueType": "BOOLEAN"
}
],
"extraFields": [
{
"key": "OEM",
"value": "OEM PROVIDER"
}
],
"timestamp": 1721163712000
}To build the body for conversion to a signature, remove all spaces (whitespaces, tabs, etc.) while maintaining the original structure of the data.
To generate the signature hash, the body must respect the order of the attributes as shown in the example (externalId, name, isEnabled, settings and finally the timestamp).
{"externalId":"172","name":"DEMO","isEnabled":true,"zipCode":"49546-6911","address":"7429 35TH AVE NW LANSING, MI","city":null,"state":null,"country":"USA","settings":[{"externalId":null,"key":"cameraModule","value":"true","valueType":"BOOLEAN"},{"externalId":null,"key":"noiseCancelling","value":"true","valueType":"BOOLEAN"},{"externalId":null,"key":"transcription","value":"true","valueType":"BOOLEAN"},{"externalId":null,"key":"playerAutoPlay","value":"true","valueType":"BOOLEAN"},{"externalId":null,"key":"audioMuted","value":"false","valueType":"BOOLEAN"},{"externalId":null,"key":"fullscreen","value":"true","valueType":"BOOLEAN"},{"externalId":null,"key":"downloadable","value":"false","valueType":"BOOLEAN"}],"extraFields":[{"key":"OEM","value":"OEM PROVIDER"}],"timestamp":1721163712000}HTTP Request
End point - '/api/v2/subaccount'
Method - POST
Header -
'x-authentication-api-key: {apikey}'
'x-authentication-signature: {signature}'
'Content-Type: application/json'
Body -
{
"externalId": {EXTERNAL-ID},
"name": {NAME},
"isEnabled": {IS-ENABLED},
"zipCode": {ZIP-CODE},
"address": {SHIPPING-ADDRESS},
"city": {city},
"state": {state},
"country": {COUNTRY},
"extraFields": [
{
"key": {EXTRA-KEY},
"value": {EXTRA-VALUE}
}
],
"settings": [
{
"externalId": null,
"key": {KEY},
"value": {VALUE},
"valueType": {VALUE-TYPE}
},
...
],
"timestamp": {TIMESTAMP}
}Example -
curl --location 'https://sdk-mobile-api-rc.truvideo.com/api/subaccount' \
--header 'x-authentication-api-key: {APIKEY}' \
--header 'x-authentication-signature: {SIGNATURE}' \
--header 'Content-Type: application/json' \
--data '{
"externalId": {EXTERNAL-ID},
"name": {NAME},
"isEnabled": {IS-ENABLED},
"zipCode": {ZIP-CODE},
"address": {SHIPPING-ADDRESS},
"city": {city},
"state": {state},
"country": {COUNTRY},
"extraFields": [
{
"key": {EXTRA-KEY},
"value": {EXTRA-VALUE}
}
],
"settings": [
{
"externalId": null,
"key": {KEY},
"value": {VALUE},
"valueType": {VALUE-TYPE}
},
...
],
"timestamp": {TIMESTAMP}
}'2. Sub Account Switch Enable
Description
This endpoint allows you to update the status of a subaccount by enabling or disabling it.
Request
Method
PATCH
URL
Staging:
https://sdk-mobile-api-rc.truvideo.com/api/subaccountProduction:
https://sdk-mobile-api.truvideo.com/api/subaccount
Headers
Content-Type: application/jsonAuthorization: Bearer {{YOUR-ACCESS-TOKEN}}
Body
{
"isEnabled": {{BOOLEAN}}
}Parameters:
isEnabled: (boolean, required) Indicates whether the subaccount should be enabled or disabled. Possible values:true: Enable the subaccount.false: Disable the subaccount.
Example Request
curl --location --globoff --request PATCH 'https://sdk-mobile-api.truvideo.com/api/subaccount' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{YOUR-ACCESS-TOKEN}}' \
--data '{
"isEnabled": true
}'Response
Successful Response
Status Code: 200 OK
Body:
{
"id": "1087d127-fa57-4f1b-8309-a87c23908655",
"externalId": "172",
"name": "New Name",
"isEnabled": true,
"environmentUuid": "6514ef77-c0ab-40a8-aca4-90916207f13e",
"internalStatus": "DEMO"
}3. Update Sub Account Name
This endpoint allows you to update the name of a subaccount.
Request
Method
PATCH
URL
Staging:
https://sdk-mobile-api-rc.truvideo.com/api/subaccount/updateProduction:
https://sdk-mobile-api.truvideo.com/api/subaccount/update
Headers
Content-Type: application/jsonAuthorization: Bearer {{YOUR-ACCESS-TOKEN}}
Body
{
"name": "{NAME}"
}Parameters:
name: (string, required) The new name you want to set for the subaccount.
Example Request
curl --location --request PATCH 'https://sdk-mobile-api.truvideo.com/api/subaccount/update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{YOUR-ACCESS-TOKEN}}' \
--data '{
"name": "New Subaccount Name"
}'Response
Status Code: 200 OK
Body:
{
"id": "1087d127-fa57-4f1b-8309-a87c23908655",
"externalId": "172",
"name": "New Name",
"isEnabled": true,
"environmentUuid": "6514ef77-c0ab-40a8-aca4-90916207f13e",
"internalStatus": "DEMO"
}Last updated
Was this helpful?