---
title: "Export workspace data as agent context files: CLAUDE.md, AGENTS.md, .cursorrules, or intent.md."
method: GET
path: "/api/v1/export"
tags: ["export"]
---

# Export workspace data as agent context files: CLAUDE.md, AGENTS.md, .cursorrules, or intent.md.

`GET /api/v1/export`

SUCCESS RESPONSE IS A FILE DOWNLOAD, NOT JSON. claude-md sets Content-Type text/markdown + filename CLAUDE.md, filters out non-substantive intents (evaluateIntentReadiness.isSubstantive) and prepends a <!-- PATHMODE:WARNINGS --> block via getContextWarnings (plus a note when stub intents were filtered). agents-md is identical to claude-md (same agent-agnostic '# Pathmode Intent Context' body) but sets filename AGENTS.md — the native instruction file for OpenAI Codex and modern Cursor. cursorrules sets text/plain + filename .cursorrules. intent-md sets text/markdown + filename intent.md. Intents fetched via INTENT_WITH_RELATIONS_SELECT, sorted updated_at DESC; createdAt/updatedAt/shippedAt/verifiedAt are converted to epoch-millis numbers before generation. 422 and 404 bodies are JSON.

## Query parameters

- `format` string
- `intent_id` string
- `product_id` string
- `workspace_id` string

## Response `200`

File generated; body is markdown/plaintext (see Content-Type), not JSON.

## Other responses

- `400` — Invalid format value; or cookie auth missing workspace_id.
- `401` — Missing/invalid API key or no valid session cookie.
- `403` — API key lacks read scope; or cookie auth not a workspace member.
- `404` — cursorrules/intent-md: requested intent_id not found, or no intents exist in the workspace.
- `422` — cursorrules/intent-md: target intent is not ready for execution (returns JSON { error, readiness, suggestion }).
- `500` — Internal error.

## Changes

- **2026-08-23** `155c812b368b` — 6 info
  - added the optional property `details` to the response with the `400` status
  - added the optional property `details` to the response with the `401` status
  - added the optional property `details` to the response with the `403` status
  - added the optional property `details` to the response with the `404` status
  - …2 more

[Change history](https://skmtc.dev/pathmode/apis/pathmode-api/changes/api/v1/export/get.md)

---

[API](https://skmtc.dev/pathmode/apis/pathmode-api.md) · [All operations](https://skmtc.dev/pathmode/apis/pathmode-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pathmode/pathmode-api/revisions/e419abb0a327/schema)
