Creates a scene associated with the specified iTwin.
You can provide metadata only or include up to 100 objects via the sceneData.objects
array. More objects can be added incrementally using the Create scene objects endpoint.
Scene data will be validated based on user permissions and supported object types. See Scene Object Schemas Documentation for a full list of available object schemas.
Request parameters
Primary iTwin Id associated with the scene
Request headers
Activity id used for tracking request
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v1+json
is recommended.
Request body
SceneCreateDTO
Optional identifier for the scene object
User defined display name of the scene
Optional detailed description of the scene
Optional parent Id for the scene
Example
{ "id": "eda9e67f-24a3-4bd5-aeca-981d2abdb610", "displayName": "Construction Site Overview", "description": "Bridge construction site showing pier placement and equipment staging areas.", "parentId": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2", "sceneData": { "objects": [{ "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f", "displayName": "Example Object", "order": 1.0, "version": "1.0.0", "kind": "Layer", "parentId": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2", "relatedId": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f", "data": { "visible": false } }] } }
Response 201 Created
Created scene.
{ "scene": { "id": "eda9e67f-24a3-4bd5-aeca-981d2abdb610", "displayName": "Construction Site Overview", "description": "Bridge construction site showing pier placement and equipment staging areas.", "iTwinId": "1ba4c28a-e518-42d4-85e4-ff9f9ef44bb6", "sceneData": { "objects": [{ "id": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f", "displayName": "Example Object", "kind": "Layer", "version": "1.0.0", "data": { "visible": false } }] }, "createdById": "37f457a6-25fd-4d4a-8947-974b690158be", "creationTime": "2025-05-04T04:14:08Z", "lastModified": "2025-05-07T01:15:25Z" } }
Response 400 Bad Request
Unprocessable Entity
{ "error": { "code": "InvalidScenesRequest", "message": "Cannot create scene.", "target": "scene", "details": [{ "code": "InvalidRequestBody", "message": "ParentId must be a UUID.", "target": "parentId" }] } }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 403 Forbidden
Forbidden
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
Not Found
{ "error": { "code": "SceneNotFound", "message": "Requested scene is not available.", "target": "scene" } }
Response 409 Conflict
Conflict
{ "error": { "code": "SceneExists", "message": "Scene with id already exists." } }
Response 413 Request Entity Too Large
Payload Too Large
{ "error": { "code": "RequestTooLarge", "message": "Request body is greater than the max size of 4.5MiB." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
SceneObjectCreateDTO
Optional identifier for the scene object
Optional display name for the scene object
Optional number for the scene object order in lists
Maps to the version of the JSON schema this object conforms to
Kind of the scene object. Maps to the name of the JSON schema this object conforms to
Optional parent Id for the scene object
Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for resource styling objects.
Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the API documentation for the full list of available schemas and examples.
{ "required": [ "version", "kind", "data" ], "type": "object", "properties": { "id": { "type": "string", "description": "Optional identifier for the scene object", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "displayName": { "type": "string", "description": "Optional display name for the scene object", "example": "Example Object" }, "order": { "type": "number", "description": "Optional number for the scene object order in lists", "example": 1 }, "version": { "type": "string", "description": "Maps to the version of the JSON schema this object conforms to", "format": "SemVer", "example": "1.0.0" }, "kind": { "type": "string", "description": "Kind of the scene object. Maps to the name of the JSON schema this object conforms to", "example": "Layer" }, "parentId": { "type": "string", "description": "Optional parent Id for the scene object", "format": "UUID", "example": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" }, "relatedId": { "type": "string", "description": "Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for [resource styling objects](https://github.com/iTwin/scenes-client/tree/main/docs/schemas/resourceStyling).", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "data": { "oneOf": [ { "$ref": "#/components/schemas/LayerData" }, { "$ref": "#/components/schemas/View3dData" } ], "description": "Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the [API documentation](https://github.com/iTwin/scenes-client/tree/main/docs) for the full list of available schemas and examples.", "example": { "visible": false } } }, "additionalProperties": false }
SceneDataCreateDTO
{ "required": [ "objects" ], "type": "object", "properties": { "objects": { "maxItems": 100, "type": "array", "items": { "$ref": "#/components/schemas/SceneObjectCreateDTO" }, "description": "Array of scene objects to create (limit is 100)." } }, "additionalProperties": false }
SceneCreateDTO
Optional identifier for the scene object
User defined display name of the scene
Optional detailed description of the scene
Optional parent Id for the scene
{ "required": [ "displayName" ], "type": "object", "properties": { "id": { "type": "string", "description": "Optional identifier for the scene object", "format": "UUID", "example": "eda9e67f-24a3-4bd5-aeca-981d2abdb610" }, "displayName": { "type": "string", "description": "User defined display name of the scene", "example": "Construction Site Overview" }, "description": { "type": "string", "description": "Optional detailed description of the scene", "example": "Bridge construction site showing pier placement and equipment staging areas." }, "parentId": { "type": "string", "description": "Optional parent Id for the scene", "format": "UUID", "example": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" }, "sceneData": { "allOf": [ { "$ref": "#/components/schemas/SceneDataCreateDTO" } ], "description": "Scene informational objects" } }, "additionalProperties": false }
SceneObjectMinimalDTO
Unique identifier for the scene object
Optional display name for the scene object
Optional number for the scene object order in lists
Maps to the version of the JSON schema this object conforms to
Kind of the scene object. Maps to the name of the JSON schema this object conforms to
Optional parent Id for the scene object
Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for resource styling objects.
Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the API documentation for the full list of available schemas and examples.
{ "required": [ "id", "version", "kind", "data" ], "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the scene object", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "displayName": { "type": "string", "description": "Optional display name for the scene object", "example": "Example Object" }, "order": { "type": "number", "description": "Optional number for the scene object order in lists", "example": 1 }, "version": { "type": "string", "description": "Maps to the version of the JSON schema this object conforms to", "format": "SemVer", "example": "1.0.0" }, "kind": { "type": "string", "description": "Kind of the scene object. Maps to the name of the JSON schema this object conforms to", "example": "Layer" }, "parentId": { "type": "string", "description": "Optional parent Id for the scene object", "format": "UUID", "example": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" }, "relatedId": { "type": "string", "description": "Id of the related scene object referencing the repository resource this styling object applies to. Only allowed (and required) for [resource styling objects](https://github.com/iTwin/scenes-client/tree/main/docs/schemas/resourceStyling).", "format": "UUID", "example": "1f0b88f0-9d0b-4fd2-88dc-390add547c7f" }, "data": { "oneOf": [ { "$ref": "#/components/schemas/LayerData" }, { "$ref": "#/components/schemas/View3dData" } ], "description": "Data for the scene object. The structure of this object must conform to the JSON schema specified by the 'kind' and 'version' fields. Common types include Layer and View3d, but other types are supported. See the [API documentation](https://github.com/iTwin/scenes-client/tree/main/docs) for the full list of available schemas and examples.", "example": { "visible": false } } }, "additionalProperties": false }
SceneDataDTO
{ "required": [ "objects" ], "type": "object", "properties": { "objects": { "type": "array", "items": { "$ref": "#/components/schemas/SceneObjectMinimalDTO" }, "description": "Scene informational objects" } }, "additionalProperties": false }
SceneWithObjectsDTO
Unique identifier for the scene
User defined display name of the scene
Optional detailed description of the scene
Optional parent Id for the scene
Id of the user who created the scene
iTwin Id
Time the scene was created as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'
Time the scene was last modified as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'
{ "required": [ "id", "displayName", "createdById", "iTwinId", "creationTime", "lastModified", "sceneData" ], "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the scene", "format": "UUID", "example": "eda9e67f-24a3-4bd5-aeca-981d2abdb610" }, "displayName": { "type": "string", "description": "User defined display name of the scene", "example": "Construction Site Overview" }, "description": { "type": "string", "description": "Optional detailed description of the scene", "example": "Bridge construction site showing pier placement and equipment staging areas." }, "parentId": { "type": "string", "description": "Optional parent Id for the scene", "format": "UUID", "example": "d21dd09b-bb38-483a-b34f-5d3d7b3e1bd2" }, "createdById": { "type": "string", "description": "Id of the user who created the scene", "format": "UUID", "example": "37f457a6-25fd-4d4a-8947-974b690158be" }, "iTwinId": { "type": "string", "description": "iTwin Id", "format": "UUID", "example": "eda9e67f-24a3-4bd5-aeca-981d2abdb610" }, "creationTime": { "type": "string", "description": "Time the scene was created as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'", "format": "date-time", "example": "2025-05-04T04:14:08Z" }, "lastModified": { "type": "string", "description": "Time the scene was last modified as an ISO8601 string, 'YYYY-MM-DDTHH:mm:ss.sssZ'", "format": "date-time", "example": "2025-05-07T01:15:25Z" }, "sceneData": { "allOf": [ { "$ref": "#/components/schemas/SceneDataDTO" } ], "description": "Created scene data" } }, "additionalProperties": false }
SceneCreateResponse
{ "required": [ "scene" ], "type": "object", "properties": { "scene": { "$ref": "#/components/schemas/SceneWithObjectsDTO" } }, "additionalProperties": false }
LayerData
Layers organize scene content and control data visibility. They are not limited to contain specific data types.
Whether the layer is turned on or off
{ "required": [ "visible" ], "type": "object", "properties": { "visible": { "type": "boolean", "description": "Whether the layer is turned on or off", "example": true } }, "additionalProperties": false, "description": "Layers organize scene content and control data visibility. They are not limited to contain specific data types." }
Vector3d
X coordinate.
Y coordinate.
Z coordinate.
{ "required": [ "x", "y", "z" ], "type": "object", "properties": { "x": { "type": "number", "description": "X coordinate." }, "y": { "type": "number", "description": "Y coordinate." }, "z": { "type": "number", "description": "Z coordinate." } }, "additionalProperties": false }
View3dData
Representation of a 3D view
Whether the view is orthographic or perspective
Aspect ratio of the view
Near plane distance
Far plane distance
Array of 16 numbers representing a 4x4 matrix in row-major order
{ "required": [ "position", "isOrthographic", "aspectRatio", "direction", "up", "near", "far", "ecefTransform" ], "type": "object", "properties": { "position": { "allOf": [ { "$ref": "#/components/schemas/Vector3d" } ], "description": "Location of the eye of the camera." }, "isOrthographic": { "type": "boolean", "description": "Whether the view is orthographic or perspective" }, "aspectRatio": { "type": "number", "description": "Aspect ratio of the view" }, "direction": { "allOf": [ { "$ref": "#/components/schemas/Vector3d" } ], "description": "Direction the camera is pointing towards" }, "up": { "allOf": [ { "$ref": "#/components/schemas/Vector3d" } ], "description": "Defines 'up' direction relative to camera in the view" }, "near": { "type": "number", "description": "Near plane distance" }, "far": { "type": "number", "description": "Far plane distance" }, "ecefTransform": { "maxItems": 16, "minItems": 16, "type": "array", "items": { "type": "number" }, "description": "Array of 16 numbers representing a 4x4 matrix in row-major order" } }, "additionalProperties": false, "description": "Representation of a 3D view" }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?