code

Save a file in a tool's draft

Save one file of your team's draft of the code of a tool your team built.

  • Business accounts only, with tools:build. Every member sees the draft with code.get.
  • One draft per tool, shared by the team. Each save changes one file, and the last save of a file wins.
  • content null deletes the file. A file saved back to its text in the draft's base version leaves the draft, and a draft with no change left is deleted.
  • Only files under src/, test/ and explore/ change, and an entrypoint can't be deleted. A public tool's draft stays your team's until it's published.
put/v1/code/{id}/draft

Request

  • Base URL: https://api.pomerado.ai
  • URL: https://api.pomerado.ai/v1/code/{id}/draft
  • Auth: HTTP bearer

Path parameters

idstring required
Example:tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190

a tool ID: tool_ and 32 lowercase hex digits

Request body

pathstring required

a path under src/, test/ or explore/ of letters, digits, '.', '_', '-' and '/', ending in .js, .mjs, .ts or .json

contentstring nullable required

The file's new text, or null to delete the file

Response

The tool's draft after the save

Changes

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