Publish a Cloud Function draft
Make the draft of a Cloud Function the published code and record a new version. Requires the draft_hash you reviewed and returns 409 if the draft changed.
POST
Publish a Cloud Function draft
Make the draft of a Cloud 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
- Test the draft and review what would have been sent.
- Read the
draft_hashof the draft you tested, from the draft response or from Get. - 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.
- No test is required by the API, but the dashboard warns when the draft was not tested or its last test failed.
Authorizations
Body
application/json
Last modified on October 6, 2026
Publish a Cloud Function draft