Skip to main content

Outlines API

The Outlines API manages document outlines that structure document content with hierarchical sections.

Get Outline

Retrieve a complete outline with all sections ordered by index.

Path Parameters

Request Example

Response

Status Codes

  • 200 OK: Outline retrieved successfully
  • 400 Bad Request: Authentication failed or outline not found
  • 403 Forbidden: User not authorized (different organization)
  • 500 Internal Server Error: Database error

Update Outline

Full replacement (PUT) of a document outline. All existing sections are deleted and replaced with the provided structure.

Path Parameters

Request Body

Request Parameters

Section Parameters

Each section in the sections array is a dictionary and can include:

Request Example

Python Example

Response

Status Codes

  • 200 OK: Outline updated successfully
  • 400 Bad Request: Invalid outline structure or missing sections
  • 401 Unauthorized: Missing or invalid Bearer token
  • 403 Forbidden: User not authorized
  • 404 Not Found: Outline not found
  • 500 Internal Server Error: Database error

Important Notes

  • Full Replacement: This is a PUT operation, not a PATCH. All sections are replaced.
  • Section Order: order_index must be unique across all sections
  • Hierarchical Structure: Sections support multiple nesting levels via the level parameter
  • Cascading Delete: Old sections and all associated data are deleted before insert