---
title: "Export workspace messages (Preview)"
method: POST
path: "/v1beta/workspaces/{workspace_id}/message-exports"
tags: ["projects"]
---

# Export workspace messages (Preview)

`POST /v1beta/workspaces/{workspace_id}/message-exports`

**Plan:** `Enterprise`

Allows workspace admins and owners to start a one-off export of user-authored messages from projects visible to them. Project and user filters may be combined; when both are supplied, only messages matching both are exported. The warehouse-backed snapshot can lag by up to 26 hours, defaults to the preceding 90 days, and is delivered as a ZIP containing JSONL. Poll the returned export ID; completed files expire after seven days. Filter options and delivery metadata may change before graduation.

This operation is in public preview (beta) and served under `/v1beta`. Request and response shapes may change before it graduates to the stable `/v1` surface.

## Path parameters

- `workspace_id` string, required — Workspace ID

## Request body

- V1StartMessageExportInputBody
  - `end_date` string — Exclusive RFC3339 end time. Defaults to the request time.
  - `project_id` string — Export only messages from this project. The project must be visible to the caller. May be combined with user_id; both filters must match.
  - `start_date` string — Inclusive RFC3339 start time. Defaults to 90 days before end_date.
  - `user_id` string — Export only messages sent by this user. May be combined with project_id; both filters must match.

## Response `202`

Accepted

- V1StartMessageExportOutputBody
  - `export_id` string, required — Export ID used to poll status.
  - `status` 'running', required — Initial export status (running).

## Other responses

- `401` — Missing or invalid API key.
- `402` — This operation or requested configuration requires a workspace plan that includes this feature.
- `403` — The key or caller lacks the required scope or permission.
- `406` — The Accept header excludes every media type this endpoint produces.
- `429` — Too many requests. Retry after the interval in Retry-After when present.
- `default` — Error. The response body uses the standard error envelope; status matches the HTTP status code and type is a machine-readable error code.

---

[API](https://skmtc.net/lovable/apis/lovable-api.md) · [All operations](https://skmtc.net/lovable/apis/lovable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lovable/lovable-api/revisions/aa8d44585147/schema)
