---
title: "Generate context docs folder structure in Google Drive"
method: POST
path: "/context-documents/drive-export"
tags: ["Context Documents"]
---

# Generate context docs folder structure in Google Drive

`POST /context-documents/drive-export`

Generate context documents and write them to Google Drive.

Creates the full folder structure (context-docs/, company/, workstreams/)
with CLAUDE.md files and synthesized documents. Requires a Google Drive
connection with write access.

This is a synchronous endpoint — it runs all prompts in parallel and
creates the Drive structure before returning. Expect 1-3 minutes.

## Request body

- DriveExportRequest — Request body for POST /context-documents/drive-export.
  - `workstream_name` string, nullable — Generate docs for this workstream only (skip auto-detection). Used for the demo.

## Response `200`

Successful Response

- DriveExportResponse
  - `status` string, required
  - `folder_count` integer, required
  - `doc_count` integer, required
  - `workstreams` object[], required
  - `resource_count` integer, required

## Other responses

- `422` — Validation Error

---

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