---
title: "Set Workflow Use Draft"
method: PUT
path: "/organizations/{orgId}/integrationdestinations/workflows/{id}/useDraft"
tags: ["IntegrationDestinations"]
---

# Set Workflow Use Draft

`PUT /organizations/{orgId}/integrationdestinations/workflows/{id}/useDraft`

## Request

- Base URL: `https://api.m3ter.com`
- URL: `https://api.m3ter.com/organizations/{orgId}/integrationdestinations/workflows/{id}/useDraft`
- Auth: OAuth 2
  - Authorization code: `https://m3ter.auth.us-east-1.amazoncognito.com/oauth2/authorize`, token URL `https://m3ter.auth.us-east-1.amazoncognito.com/oauth2/token`
  - Client credentials, token URL `/oauth/token`
- TypeScript: <https://skmtc.dev/m3ter-com/apis/m3ter-api/docs/organizations/:orgId/integrationdestinations/workflows/:id/useDraft/put.ts> (a function with typed inputs; its response is checked against the schema)

Toggle whether workflow execution uses the latest draft version or the latest live version

## Path parameters

- `orgId` string, required
- `id` string, required

## Query parameters

- `draft` boolean

## Response `200`

SetWorkflowUseDraft 200 response

- WorkflowDestinationResponse
  - `trigger` WorkflowTrigger
    - `enabled` boolean: whether or not the trigger is enabled.
    - `firstFunction` string: Function ID of the next function to run
  - `functions` AbstractFunctionRequest[]
    - `functionId` string
    - `title` string
    - `description` string
    - `className` string
    - `parameters` object
    - `exits` object
      - `TRUE` string
      - `FALSE` string
      - `VALID` string
      - `INVALID` string
      - `NEXT` string
      - `TERMINATE` string
      - `ERROR` string
  - `globalParameters` AbstractGlobalParameter[]
    - `name` string
    - `type` string, required
    - `constraints` object
  - `templateOverrides` object
  - `enabled` boolean
  - `validationErrors` object
  - `currentVersion` integer
  - `workflowVersion` integer
  - `draft` boolean
  - `useDraftVersion` boolean
  - `versions` VersionDetailResponse[]
    - `version` integer
    - `description` string
    - `dtCreated` string, date-time
    - `createdBy` string
    - `draftVersion` string
    - `templateId` string
    - `platform` boolean
    - `templateVersion` integer
  - `drafts` VersionDetailResponse[]
    - `version` integer
    - `description` string
    - `dtCreated` string, date-time
    - `createdBy` string
    - `draftVersion` string
    - `templateId` string
    - `platform` boolean
    - `templateVersion` integer
  - `id` string, required: The UUID of the entity.
  - `version` integer: The version number: - **Create:** On initial Create to insert a new entity, the version is set at 1 in the response. - **Update:** On successful Update, the version is incremented by 1 in the response.
  - `dtCreated` string, date-time: The DateTime when this item was created *(in ISO-8601 format)*.
  - `dtLastModified` string, date-time: The DateTime when this item was last modified *(in ISO-8601 format)*.
  - `createdBy` string: The ID of the user who created this item.
  - `lastModifiedBy` string: The ID of the user who last modified this item.
  - `name` string
  - `description` string
  - `code` string
  - `active` boolean

## Other responses

- `4XX`: Error message
- `5XX`: Error message

## Changes

- **2026-10-16** `85c514abc692`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/m3ter-com/apis/m3ter-api/changes/organizations/:orgId/integrationdestinations/workflows/:id/useDraft/put.md)

---

[API](https://skmtc.dev/m3ter-com/apis/m3ter-api.md) - [All operations](https://skmtc.dev/m3ter-com/apis/m3ter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/m3ter-com/apis/m3ter-api/revisions/85c514abc692?raw)
