workspace

First save — create a file (charges 1 credit)

Writes content to GCS (saga) then atomically charges 1 credit (file_save) and inserts the file at version 1. Accepts an Idempotency-Key header — replays return the original result with no second charge.

post/api/v1/files

Request

  • Base URL: https://mdtidy.com
  • URL: https://mdtidy.com/api/v1/files
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Request body

project_idstring uuid required
folder_idstring uuid nullable
namestring required
contentstring required

Response

File created.

idstring uuid required
type'file' required
project_idstring uuid required
folder_idstring uuid nullable required
namestring required
archivedboolean required
versioninteger required
etagstring required

Quoted version; mirrors the ETag header.

last_opened_atstring nullable required
created_atstring required
updated_atstring required
credits_remaininginteger
contentstring

Markdown body; returned by GET /v1/files/{id}.

after_md_gcsstring nullable
rendered_html_gcsstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.