Skip to main content
POST
Publish a Scheduled Function draft
Make the draft of a Scheduled Function the published code. Production runs it from its next execution, and it is recorded as a new version that you can restore later.

Before you publish

  1. Test the draft and review what would have been sent.
  2. Read the draft_hash of the draft you tested, from the draft response or from Get.
  3. Send it as expected_draft_hash.

What can happen

Good to know

  • Executions already in progress finish on the previous version.
  • Publishing does not turn on a paused function. A paused function is deployed when it is turned on or run.
  • No test is required by the API, but the dashboard warns when the draft was not tested or its last test failed.

Authorizations

X-API-Key
string
header
required

API key for authentication. Keys are prefixed with nxr_live_.

Path Parameters

id
string<uuid>
required

Scheduled Function id.

Body

application/json
expected_draft_hash
string
required

The draft_hash of the draft you reviewed, from the draft response or GET of the function.

Response

The draft is now the published code.

success
enum<boolean>
required
Available options:
true
function
object
required
version
object
required
Last modified on October 6, 2026