Home Docs Schema Formats Errors
Conduit

TOML

TOML input and output

Conduit provides full TOML support for both input and output. TOML is ideal for configuration‑style data and structured key/value documents.

TOML Input

To send TOML to Conduit, set the Content-Type header to application/toml or text/toml.

title = "Example"
created_at = "2024-01-01T00:00:00Z"

Conduit maps TOML keys directly into schema‑aware rows. Strings, integers, floats, booleans, arrays, and nested tables are supported.

TOML Output

TOML output is selected when:

  • ?format=toml is used
  • Accept: application/toml is sent
  • The input format is TOML
GET /v1/books?format=toml

Example response:

Collections are encoded using TOML array‑of‑tables syntax ([[table]]).

TOML Schema Responses

Schema endpoints return TOML describing the table’s columns, types, and metadata.

GET /v1/schema/books?format=toml

Example:

TOML Error Responses

Conduit returns a consistent TOML error envelope for all error conditions. This structure matches JSON, XML, YAML, NDJSON, CSV, and CBOR.

Example TOML error:

The fields in the error envelope come directly from the ErrorSpec used by Conduit’s internal error system.

Format Negotiation

TOML is selected when:

  • ?format=toml is used
  • Accept: application/toml is sent
  • The input format is TOML
GET /v1/books?format=toml