Skip to main content

createRoomTemplate

RoomTemplateStatusWrapper createRoomTemplate(RoomTemplateDto)

POST /api/2.0/files/roomtemplate

Create a room template

Queues a background job that turns an existing room into a reusable room template, and returns the state of that job right away. The template lands in the portal's Templates section, inherits the source room's type, privacy, indexing, storage limit, lifetime, download and watermark settings, and receives copies of the room's files together with its ordinary subfolders and everything inside them; the service subfolders a room keeps for its own workflows are left out. The caller needs room-manager rights on the source room, and the room must not be archived: a room that cannot be found under Rooms is answered as missing, and every other refusal comes back as a rejection. The template is not ready when the response arrives, so poll GET api/2.0/files/roomtemplate/status until isCompleted is true, then read templateId; a non-empty error there means the job failed and the half-built template was removed. Only one template creation is tracked per caller, and starting another replaces the previous record. Setting public to true discards share and groups and shares the finished template with everyone instead, while copyLogo reuses the source room's own picture and makes logo irrelevant.

Parameters​

NameInTypeDescriptionNotes
RoomTemplateDtobodyRoomTemplateDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The state of the template creation just queued: isCompleted is still false, so the job has to be polled for its resultRoomTemplateStatusWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no roomId, title is empty or longer than 400 characters, color is longer than 6 or cover longer than 50 characters, or logo has no tmpFile or a position or size outside 0-1280--
403The source room is archived, the caller cannot edit it, or quota is set while the storage quota for rooms (for an AI agent, for agents) is turned off--
404No room with roomId exists in the Rooms section--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

RoomTemplateStatusWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json