Scrub API
POST/v1/tools/save_draftfree

Save a draft

Keeps what is set on a tool's or action's page before it runs, free, so the person opens it there as it was left, on any device: its params by name, each as text, a script as its JSON as open_draft gives it (a script that is not one is refused). Nothing runs. Give draft, the name a save or open_draft gave, to save over that draft; or from, the job it was started from, for that job's one draft; give neither to start a new draft, and its name is given back. Give the version you opened to save over only that one: if it was saved since, nothing is saved and the newer one's time is given. Empty params delete it. A person keeps up to 500 drafts.

Fields

FieldTypeDefaultWhat it is
toolstringRequiredThe tool or action
draftstringNoneIts name, draft_…, to save over it
fromstringNoneThe job it was started from, if any
paramsobjectRequired
versionintegerNone

Call it

Request

curl -X POST https://app.scrub.app/v1/tools/save_draft \
  -H "Authorization: Bearer $SCRUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tool":"…","params":{}}'

Answer

{
  "ok": true,
  "result": {
    "…": "…"
  }
}

What result holds is said above.

Every call can also answer an error: what comes back. Try it with your key from Account.