Create Embed
POSThttps://api.rapidcompact.com/api/v1/embeds
Create an embed from a rapid model
Request
Header Parameters
Authorization string
Example: Bearer {YOUR_AUTH_KEY}
Content-Type string
Example: application/json
Accept string
Example: application/json
- application/json
Body
required
model_id integerrequired
The id of the rapid model
name stringrequired
The name of your embed
save_user_theme boolean
Saves the configurator config
config string
The viewer configuration. Must be a valid JSON string
Responses
- 201
success
- text/plain
- Schema
Schema
string
Authorization: http
name: defaulttype: httpscheme: bearerdescription:
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://api.rapidcompact.com/api/v1/embeds' \
-H 'Content-Type: application/json' \
-H 'Accept: text/plain' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"model_id": 281,
"name": "\"my embeds name\"",
"save_user_theme": false,
"config": "{\n \"renderCanvasCSS\" : \"background:;\",\n \"environmentURL\" : \"images/environment.dds\",\n \"companyLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUh...kSuQmCC\",\n \"companyLogoToggle\" : \"true\",\n \"companyLink\" : \"https://dgg3d.com\",\n \"companyLogoCSS\" : \"width:120px;height:71.3004px;background:;\",\n \"productLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUh...ASUVORK5CYII=\",\n \"productLogoToggle\" : \"true\",\n \"productLink\" : \"https://rapidcompact.com\",\n \"productLogoCSS\" : \"width:120px;height:21.4819px;background:;\",\n \"threeDLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUhEU...OAAAAAElFTkSuQmCC\",\n \"threeDLogoToggle\" : \"true\",\n \"threeDLogoCSS\" : \"width:24px;height:24px;background:;\",\n \"interactiveToolsCSS\" : \"background:;\",\n \"skyBoxEnabled\" : \"false\",\n \"skyBoxBlur\" : \"0\",\n \"shadowToggle\" : \"false\",\n \"shadowOpacity\" : \"0.5\",\n \"shadowBlur\" : \"0\",\n \"shadowLightIntensity\" : \"0.3\",\n \"cameraMinVerticalAngle\" : \"-90\",\n \"cameraMaxVerticalAngle\" : \"90\",\n \"cameraMinZoom\" : \"1\",\n \"cameraMaxZoom\" : \"6\",\n \"cameraPanning\" : \"0.5\",\n \"cameraBloom\" : \"0\",\n \"cameraContrast\" : \"1\",\n \"cameraExposure\" : \"1\",\n \"fxaaOn\" : \"true\",\n \"enableSimpleMeasurement\" : \"false\",\n \"enableCoordinateDisplay\" : \"false\",\n \"baseUnit\" : \"m\",\n \"displayUnit\" : \"m\",\n \"enableARBtn\" : \"false\",\n \"enableAnimationControl\" : \"false\",\n \"animationSpeed\" : \"1\",\n \"animationIdleTime\" : \"5\",\n \"backgroundIsGradient\" : \"false\",\n \"backgroundIsColor\" : \"false\",\n \"gradientBackgroundColor1\" : \"#ffffff\",\n \"gradientBackgroundColor2\" : \"#aaaaaa\",\n \"plainBackgroundColor\" : \"#ffffff\",\n \"environmentName\" : \"studio_small\",\n \"baseUnits\" : \"m,cm,mm,yd,ft,in\",\n \"displayUnits\" : \"m,cm,mm,yd,ft,in\"\n}"
}'
ResponseClear