Skip to main content

API Documentation

Request

Path Parameters

  • organizationId: <uuid> (required)
    • ID of the organization

Body

  • Content Type: application/json
FieldTypeDescriptionRequired
namestringName of the presetrequired
descriptionstringDescription of the presetoptional
presetobjectObject containing preset settingsrequired
rolestringAssociated role of the participantrequired
uiConfigobjectUI configuration options under the presetrequired

Responses

200 - Success response

  • Content Type: application/json
FieldTypeDescriptionRequired
successbooleanStatus of the requestrequired
messagestringError message (if any)optional
dataobjectData produced as responserequired
presetobjectDetails of the created presetrequired
overridebooleanAuthorization statusrequired

400 - Error response

  • Content Type: application/json
FieldTypeDescriptionRequired
successbooleanStatus of the requestrequired
messagestringError messagerequired
dataobjectData produced as responserequired

Send API Request

<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dyte.io/v1/organizations/organizationId/preset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{
\"name\": \"string\",
\"description\": \"string\",
\"preset\": {
\"role\": \"string\",
\"uiConfig\": {
\"waitingRoom\": {
\"showSelf\": true
},
\"controlBar\": true,
\"controlBarElements\": {
\"fullscreen\": true,
\"share\": true,
\"screenShare\": true,
\"layout\": true,
\"chat\": true,
\"polls\": true,
\"participants\": true,
\"plugins\": true
},
\"header\": true,
\"headerElements\": {
\"logo\": true,
\"title\": true,
\"participantCount\": true,
\"clock\": true
},
\"aloneHereElement\": true,
\"logo\": \"http://example.com\",
\"colors\": {
\"primary\": \"#2160FD\",
\"secondary\": \"#262626\",
\"textPrimary\": \"#EEEEEE\",
\"videoBackground\": \"#1A1A1A\"
},
\"dimensions\": {
\"width\": 0,
\"height\": 0,
\"mode\": \"fillParent\"
},
\"grid\": {
\"defaultView\": \"multi\",
\"multi\": {
\"maxVideoCount\": 6,
\"videoFit\": \"contain\"
},
\"single\": {
\"videoFit\": \"contain\"
}
}
}
}
}",
CURLOPT_HTTPHEADER => [
"Authorization: ",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>