API Documentation
Request
Path Parameters
- organizationId:
<uuid>
(required)- ID of the organization
Body
- Content Type:
application/json
Field | Type | Description | Required |
---|---|---|---|
name | string | Name of the preset | required |
description | string | Description of the preset | optional |
preset | object | Object containing preset settings | required |
role | string | Associated role of the participant | required |
uiConfig | object | UI configuration options under the preset | required |
Responses
200 - Success response
- Content Type:
application/json
Field | Type | Description | Required |
---|---|---|---|
success | boolean | Status of the request | required |
message | string | Error message (if any) | optional |
data | object | Data produced as response | required |
preset | object | Details of the created preset | required |
override | boolean | Authorization status | required |
400 - Error response
- Content Type:
application/json
Field | Type | Description | Required |
---|---|---|---|
success | boolean | Status of the request | required |
message | string | Error message | required |
data | object | Data produced as response | required |
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;
}
?>