---
title: "Save changes to an existing document"
method: POST
path: "/documents/save"
tags: ["documents"]
---

# Save changes to an existing document

`POST /documents/save`

## Request body

- DocumentSaveRequest
  - `path` string, required
  - `content` string, required
  - `frontmatter` GenericObject

## Response `200`

Updated document

- DocumentDetail
  - `id` string
  - `type` string
  - `lang` string
  - `title` string
  - `slug` string
  - `url` string
  - `layout` string
  - `summary` string
  - `date` string, date-time
  - `author` string
  - `last_editor` string
  - `taxonomies` GenericObject
  - `html_body` string
  - `raw_body` string
  - `fields` GenericObject
  - `params` GenericObject
  - `created_at` string, date-time
  - `updated_at` string, date-time

---

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