REQUIRED_FIELD_MISSING when deactivating a Flow via the Tooling API
The error names a missing required field, so you go looking for the field you forgot. There isn't one. The body is simply the wrong shape, and the platform reports it in the least helpful way available.
The fix, first
PATCH the FlowDefinition record and wrap your change in a Metadata object. Setting activeVersionNumber to 0 is what deactivates the flow:
A successful call returns HTTP 204 No Content. To reactivate, send the same request with the version number that was previously live:
Capture each flow's active version number before deactivating. Once activeVersionNumber is 0, the platform no longer tells you which version used to be live — and "just activate the latest version" is not the same thing. The latest version may be an unfinished draft nobody meant to ship.
Why the error is worded so badly
The common failing attempt looks reasonable:
The intuition is fair — FlowDefinition exposes an active version, so you point at the version record you want. But ActiveVersion is not a writable field on FlowDefinition. The only writable surface is the Metadata compound field, which is where the Tooling API keeps the mutable definition of the record.
Because your body contains nothing the platform recognises as writable, validation runs as though you sent an empty update — and the field it wanted, Metadata, is reported as missing. The error is technically accurate and practically misleading. You didn't forget a field; you sent fields that don't exist.
The DurableId trap
The second failure mode is subtler and produces NOT_FOUND rather than REQUIRED_FIELD_MISSING, usually right after you've fixed the body.
Most people list flows using FlowDefinitionView — it's a friendly read-only REST object with the label, API name, active version, and process type all in one place. It's the right thing to read from. It is not the thing you write to, and its Id is not the Id the Tooling API wants.
| Object | Use it for | Id to use |
|---|---|---|
| FlowDefinitionView | Listing and reading flow state (REST) | DurableId is the one that matters |
| FlowDefinition | Activating and deactivating (Tooling) | Id — equal to the view's DurableId |
So the mapping is FlowDefinitionView.DurableId → FlowDefinition.Id. Pass FlowDefinitionView.Id into the PATCH URL and you will get a not-found response for a flow you are looking straight at.
Process Builder is the same mechanism
Process Builder processes are flows underneath, distinguished by ProcessType = 'Workflow'. They activate and deactivate through the identical FlowDefinition PATCH with the identical body. If you are switching automations off before a data load, you can handle flows and processes in one pass — just report them separately, because admins think of them as different things and will want to see them listed that way.
Why version 44 keeps coming up
Older material on this topic describes deploying a .flowDefinition-meta.xml file with <activeVersionNumber>0</activeVersionNumber> through the Metadata API. That is still valid and is the deployment-based route. The Tooling API PATCH described here is the runtime equivalent — no package, no deploy, no test run — which is what you want when you're disabling forty flows for a load window and re-enabling them two hours later.
Both routes converge on the same concept: activeVersionNumber = 0 means inactive. If you have seen conflicting advice about a status field or an IsActive flag, that is why — the flow itself has no writable status; the definition's active version number carries the state.
Frequently asked
I get 204 back but the flow is still active. What happened?
Check that you PATCHed FlowDefinition and not a Flow version record, and that the Id came from DurableId. Also re-query rather than trusting a cached list — the Setup UI and FlowDefinitionView can lag a moment behind.
Can I deactivate a managed package flow?
No. Packaged components are locked in the subscriber org. You will get an access error rather than this one — see the guide on INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY.
Does deactivating a flow delete its versions?
No. Every version stays. Deactivation only sets which version, if any, is live.
Is there a bulk endpoint?
Not for this. You PATCH one FlowDefinition per call, so a bulk disable is a loop — which means you need per-record error handling and a resumable queue if the run is large or the session might expire partway.
Which API version should I pin?
Pin a specific recent version such as v62.0 rather than auto-detecting. Auto-detection means an extra round trip that can fail for unrelated reasons, and a hardcoded version keeps behaviour stable across orgs on different releases.
Where OrgKit fits
SF Automation Switch does exactly this across every flow, process, validation rule, and trigger in an org — snapshotting each one's original state first, so reactivation restores the precise versions that were live rather than guessing at the latest. The bulk queue is crash-resumable, because a session expiring halfway through a disable run is the failure that actually hurts.
Free, runs in the browser, nothing stored server-side.
Open SF Automation Switch