Create Preset
This endpoint allows you to create a new preset configuration in the system. The preset can include various settings, multimedia assets, and can be associated with products.
🔹 Endpoint Details
POST /api/v1/presets
🔒 Authentication
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
📝 Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | The title of the preset |
| description | string | No | A detailed description of the preset |
| logo | string | No | URL or path to the preset logo |
| image | string | No | URL or path to the preset cover image |
| assetIds | array of strings | No | Array of existing multimedia asset IDs to associate with this preset |
| assets | array of objects | No | Array of new multimedia assets to create along with this preset |
| products | array of strings | No | Array of product identifiers to associate with this preset |
| effectId | string | No | ID of the effect to be applied to this preset |
📤 Request Example
curl -X POST "https://openapi.onlive.site/api/v1/presets" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"title": "My Custom Preset",
"description": "This preset contains settings for video streaming",
"logo": "https://example.com/logo.png",
"image": "https://example.com/cover.png",
"assetIds": [
"123e4567-e89b-12d3-a456-426614174000"
],
"assets": [
{
"name": "string",
"app": {
"source": {
"url": "string",
"security": "string"
},
"resource": "string",
"args": "string"
},
"url": "string",
"format": "string",
"description": "string",
"size": 0,
"duration": 0,
"status": "string",
"environment": {},
"coverVideo": {
"id": "string",
"url": "string",
"size": 0,
"format": "string",
"duration": 0
},
"options": {
"usePixelStreaming": true,
"timeout": 0,
"showBooking": true,
"showRegister": true
}
}
],
"products": [
"product1",
"product2"
],
"effectId": "effect123"
}'
📥 Response
Success Response (201 Created)
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the newly created preset |
| organizationId | string | Organization ID that owns this preset |
| title | string | The title of the preset |
| description | string | A detailed description of the preset |
| logo | string | URL to the preset logo |
| image | string | URL to the preset cover image |
| assets | array of strings | IDs of multimedia assets associated with this preset |
| products | array of strings | Product identifiers associated with this preset |
| effectId | string | ID of the effect applied to this preset |
| createdAt | string (ISO 8601) | Creation timestamp |
| updatedAt | string (ISO 8601) | Last update timestamp |
Response Example
{
"id": "123e4567-e89b-12d3-a456-426614174001",
"organizationId": "123e4567-e89b-12d3-a456-426614174002",
"title": "My Custom Preset",
"description": "This preset contains settings for video streaming",
"logo": "https://example.com/logo.png",
"image": "https://example.com/cover.png",
"assets": [
"123e4567-e89b-12d3-a456-426614174003",
"123e4567-e89b-12d3-a456-426614174004"
],
"products": ["product1", "product2"],
"effectId": "effect123",
"createdAt": "2025-05-28T10:15:30Z",
"updatedAt": "2025-05-28T10:15:30Z"
}
❌ Error Responses
This endpoint follows the standard error format.