Clone a workspace
POST/projects/:project_id/clone
Creates a new workspace from a template workspace in one call. Use it to onboard a tenant: the clone gets its own name, data filter and branding, and indexing can start right away.
The clone copies the template's connection, event, dimension and metric tables, entities,
indexing and insight settings, custom events, filter groups, the event catalog, dashboards,
saved insights, cohorts and annotations, and points the copied insights at the clone's own
custom events, filter groups, cohorts, saved insights and metric tables. It doesn't copy anything
computed from the template's data: cached insight results, chart images, thumbnails, indexed
property values, event volumes, cohort sizes and members, or the workspace's AI memory. Mitzu
computes them again with the clone's filter. Imported cohorts are left out, because their members
come from the template: skipped_cohorts lists them, and insights that filter on them report the
cohort as missing. Pinned items, tags, label colors and experiments aren't copied either. The
clone gets the data filter in the request, or none: it never inherits the template's filter.
Send the request as JSON, or as multipart/form-data when you also upload branding images:
put the JSON request in a request form field and attach the images as logo and cover
file fields (PNG, JPEG, GIF or WebP, at most 5 MB each). Without images, the clone keeps the
template's branding.
Set index to true to start indexing every enabled event, dimension and metric table of the
clone. The response lists the task IDs; follow them with
GET /projects/{project_id}/tasks.
The API key acts as an Org Admin for this request. A request for a workspace of another organization returns 404.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 429
OK
The request is invalid.
The API key header is missing, or the API key is invalid, disabled or expired.
The API key is not allowed to do this, for example a key that isn't allowed to manage members.
The workspace or resource was not found.
The requested HTTP method is not allowed.
The request conflicts with the current state, for example a join request that was already decided.
Too many requests sent with the same API key. Up to 10 requests can be sent within 1 second.