Create script

Create a script under an owner handle, together with its first version, in one call.

post/api/scripts/{handle}

Request

  • Base URL: https://reduck.ai
  • URL: https://reduck.ai/api/scripts/{handle}
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

handlestring required

The owner a resource is addressed under: "@username" for a personal scope, or a bare slug for a project.

Request body

hoststring required

The site the script automates, as a hostname.

slugstring required

The script's unique identifier within its host, unique per owner.

namestring
descriptionstring required
visibility'private' | 'public'
contentstring required
language'typescript' | 'javascript'
input_schemaobject required
output_schemaobject required
logged_inboolean
side_effects'none' | 'write' required

What running this version does to the site: none only reads, write acts on it. Declared by the author and never enforced, so treat it as a claim, not a guarantee.

human_requiredboolean
draftboolean

Leave the first version unpromoted, so the script starts with no current version.

bypass_checkboolean

Skip the authoring-rules check a version goes live under. Only when a check refused this version and you judge the refusal wrong.

Response

Created

idstring required
hoststring required
slugstring required
current_version_idstring nullable required

The version the script now runs, null when the first version was created as a draft.

created_version_idstring required

The version just created. While it stays a draft the script does not point at it.

Changes

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