> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nouvel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# document.save

> Run document.save in the authenticated outbound workspace.

Required scopes: `document:write`. Approval category: **edit**.

Send a JSON object with an `input` property and a UUID `Idempotency-Key` header. Use the same key and exact body when retrying one operation. The fields below come from the same schema as the running API and MCP tools.

Read [approvals and credits](https://docs.nouvel.ai/billing.md) before automating sensitive actions. HTTP 202 with an approval URL means nothing has executed. Inspect the saved operation rather than starting a second action.


## OpenAPI

````yaml openapi.json POST /actions/document.save
openapi: 3.1.0
info:
  title: Nouvel Outbound API
  version: 1.0.0
  description: >-
    Operate your Nouvel outbound workspace with scoped permissions and
    approvals.
servers:
  - url: https://app.nouvel.ai/api/outbound/v1
security:
  - bearerAuth: []
paths:
  /actions/document.save:
    post:
      summary: document.save
      description: >-
        {"action":"document.save","ids":"Use app record IDs returned by
        read_workspace_resource, never provider IDs.","confirmation":"The server
        returns a review card when this action needs
        approval.","input":{"id":"Optional existing ID","version":"Required
        current version for edits","kind":"document | template | clause | rule |
        compliance","title":"Required","content":"Markdown","document_type":"Optional","company":"Optional","entity":"Optional","governing_law":"Optional"}}
      operationId: document_save
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    version:
                      type: integer
                    kind:
                      enum:
                        - document
                        - template
                        - clause
                        - rule
                        - compliance
                    title:
                      type: string
                    content:
                      type: string
                    document_type:
                      type: string
                    company:
                      type: string
                    entity:
                      type: string
                    governing_law:
                      type: string
                  required:
                    - kind
                    - title
                    - content
                  additionalProperties: false
              required:
                - input
      responses:
        '200':
          description: Executed or replayed result
        '202':
          description: Approval required
        '403':
          description: Missing permission
        '409':
          description: Conflict or uncertain operation
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.