This endpoint can update the workflow’s name, description, threshold_type, automatic_hallucination_tolerance_levels, custom_hallucination_threshold_values, and improvement_action when needed. You can also add or remove extended AI capabilities like web_search and file_search. Only fields provided in the request body will be updated.
Authorizations
Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
workflow_id
string
required
The ID of the workflow to edit.
Body
application/json
name
string
New name for the workflow.
description
string
New description for the workflow.
threshold_type
enum<string>
New type of thresholds to use for the workflow, either automatic or custom. Automatic thresholds are assigned internally after the user specifies a qualitative tolerance for the metrics, whereas custom metrics allow the user to set the threshold for each metric as a floating point number between 0.0 and 1.0.
Available options:
automatic,
custom
automatic_hallucination_tolerance_levels
object
New mapping of guardrail metrics to hallucination tolerance levels
(either low, medium, or high) to be used when threshold_type
is set to automatic. Possible metrics are
completeness, instruction_adherence, context_adherence,
ground_truth_adherence, or comprehensive_safety.
Show child attributes
custom_hallucination_threshold_values
object
New mapping of guardrail metrics to floating point threshold values to be used when threshold_type is set to custom. Possible metrics are correctness, completeness, instruction_adherence, context_adherence, ground_truth_adherence, or comprehensive_safety.
Show child attributes
improvement_action
enum<string>
The new action used to improve outputs that fail one or more guardrail metrics for the workflow events. May be regen, fixit, or do_nothing. ReGen runs the user's input prompt with minor induced variance. FixIt attempts to directly address the shortcomings of the output using the guardrail failure rationale. Do Nothing does not attempt any improvement.
Available options:
regen,
fixit,
do_nothing
max_improvement_attempts
integer
default:10
Max. number of improvement action attempts until a given event passes the guardrails. Defaults to 10.
web_search
boolean
default:false
Whether to enable web search for this workflow's evaluations.
file_search
string[]
An array of file IDs to search in the workflow's evaluations. Files must be uploaded via the DeepRails API first.
A file ID corresponding to a file to search in the workflow's evaluations.
context_awareness
boolean
default:false
Whether to enable context awareness for this workflow's evaluations.
Response
Workflow updated successfully
workflow_id
string
required
A unique workflow ID.
Example:
"wkfl_xxxxxxxxxxxx"
status
enum<string>
required
Status of the selected workflow. May be inactive or active. Inactive workflows will not accept events.
Available options:
inactive,
active
Example:
"active"
modified_at
string<date-time>
required
The time the workflow was last modified in UTC.
Example:
"2025-01-15T10:30:00Z"
name
string
The name of the workflow.
Example:
"Test Workflow"
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"DeepRails","colors":{"primary":"#f2ca46","light":"#f2ca46","dark":"#c4990d"},"logo":{"light":"https://mintcdn.com/deeprails-479f3a7b/bbwR2lswB0faqCU8/logo/deeprails-gold.png?fit=max\u0026auto=format\u0026n=bbwR2lswB0faqCU8\u0026q=85\u0026s=f30c47f94d9c83f7345f61cf0bafdcb1","dark":"https://mintcdn.com/deeprails-479f3a7b/bbwR2lswB0faqCU8/logo/deeprails-gold.png?fit=max\u0026auto=format\u0026n=bbwR2lswB0faqCU8\u0026q=85\u0026s=f30c47f94d9c83f7345f61cf0bafdcb1"},"favicon":"https://mintcdn.com/deeprails-479f3a7b/bbwR2lswB0faqCU8/images/favicon-32x32.png?fit=max\u0026auto=format\u0026n=bbwR2lswB0faqCU8\u0026q=85\u0026s=2c44930664b6ca64cf1cff69a262631f","appearance":{"default":"dark","strict":true},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://www.deeprails.com/","label":"DeepRails Website"}],"primary":{"type":"button","label":"API Console Login","href":"https://console.deeprails.com/login"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/deeprails"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Python SDK","icon":"python","href":"https://pypi.org/project/deeprails"},{"anchor":"TypeScript SDK","icon":"square-js","href":"https://www.npmjs.com/package/deeprails/"},{"anchor":"Ruby SDK","icon":"gem","href":"https://rubygems.org/gems/deeprails"},{"anchor":"Go SDK","icon":"golang","href":"https://pkg.go.dev/github.com/deeprails/deeprails-go-sdk"},{"anchor":"Contact","icon":"envelope","href":"mailto:support@deeprails.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"deeprails-479f3a7b","hasAudioNarration":false,"actualSubdomain":"deeprails-479f3a7b","customDomains":["docs.deeprails.com"],"gitSource":{"type":"github","owner":"deeprails","repo":"docs2","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10b7099ffae5051c40118f"},"entitlements":{},"buildId":"6ae395a7b0143684c1ccab8b","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"Documentation","count":17},{"language":"default","tag":"API Reference","count":12},{"language":"default","tag":"API Documentation","count":12},{"language":"default","tag":"Guardrail Metrics","count":7},{"language":"default","tag":"Defend","count":6},{"language":"default","tag":"Monitor","count":5},{"language":"default","tag":"Defend API","count":3},{"language":"default","tag":"Evaluation Engine","count":3},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"Monitor API","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".sidebar>.section{margin-bottom:0px}.sidebar .page{margin-bottom:0px}.sidebar .page a{padding:0px 0px}:target,h2[id]:target,h3[id]:target,h4[id]:target,h5[id]:target,div[id]:target{position:relative;background:linear-gradient(to left, #f2ca46, #2b2a2a00);animation:highlight-section 3s ease-in-out;scroll-margin-top:80px;padding:0.2rem;border-radius:8px;border-left:4px solid #f2ca46}@keyframes highlight-section{0%{background:linear-gradient(to left, #f2ca46, #2b2a2a00)}50%{background:linear-gradient(to left, #f2ca46, #2b2a2a00)}100%{background:linear-gradient(to left, #f2ca46, #2b2a2a00)}}.tight-section>h3{margin-bottom:0.25rem}table,.markdown table,.prose table,.mdx table{table-layout:fixed!important;width:800px!important;max-width:100%!important;text-align:center!important}table th,.markdown table th,.prose table th,.mdx table th{text-align:center!important}table th:first-child,table td:first-child{width:200px!important}table th:nth-child(2),table td:nth-child(2){width:100px!important}table th:nth-child(3),table td:nth-child(3){width:500px!important}[data-page=\"auto-tables\"] table,.run-modes-table{table-layout:auto!important;width:auto!important;max-width:none!important;text-align:left!important}[data-page=\"auto-tables\"] table th,[data-page=\"auto-tables\"] table td,.run-modes-table th,.run-modes-table td{width:auto!important;text-align:left!important;white-space:nowrap;padding:0.5rem 0.75rem!important}.run-modes-table td:nth-child(3),.run-modes-table td:nth-child(4),.run-modes-table td:nth-child(5),.run-modes-table td:nth-child(6),.run-modes-table th:nth-child(3),.run-modes-table th:nth-child(4),.run-modes-table th:nth-child(5),.run-modes-table th:nth-child(6){text-align:center!important;letter-spacing:1px}.competitor-table{table-layout:fixed!important;width:100%!important;max-width:100%!important;text-align:center!important}.competitor-table th,.competitor-table td{text-align:center!important;vertical-align:top;white-space:normal}.competitor-table th:nth-child(1),.competitor-table td:nth-child(1){width:18%!important}.competitor-table th:nth-child(2),.competitor-table td:nth-child(2){width:18%!important}.competitor-table th:nth-child(3),.competitor-table td:nth-child(3){width:24%!important}.competitor-table th:nth-child(4),.competitor-table td:nth-child(4){width:40%!important}.docs-auto-table{table-layout:auto!important;width:100%!important;max-width:100%!important;text-align:left!important}.docs-auto-table th,.docs-auto-table td{width:auto!important;text-align:left!important;vertical-align:top;white-space:normal}[data-page=\"defend-details\"] h2{margin-top:1.5rem;margin-bottom:0.45rem;font-weight:750}[data-page=\"defend-details\"] h3{margin-top:1rem;margin-bottom:0.35rem;font-weight:700}[data-page=\"defend-details\"] p{margin-top:0.45rem;margin-bottom:0.45rem;line-height:1.55}[data-page=\"defend-details\"] ul,[data-page=\"defend-details\"] ol{margin-top:0.4rem;margin-bottom:0.75rem}[data-page=\"defend-details\"] li{margin-bottom:0.2rem}[data-page=\"defend-details\"] hr{margin:1rem 0}[data-page=\"defend-details\"] strong{font-weight:700}[data-page=\"defend-details\"] table{table-layout:auto!important;width:auto!important;max-width:100%!important;text-align:left!important}[data-page=\"defend-details\"] table th,[data-page=\"defend-details\"] table td{width:auto!important;text-align:left!important;vertical-align:top;white-space:normal;padding:0.5rem 0.75rem!important}"}]}
{"page":{"pagePath":"api-reference/defend/update-a-workflow","slug":"/api-reference/defend/update-a-workflow","pageMetadata":{"title":"Update a Workflow","description":"Use this endpoint to update an existing defend workflow if its details change.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /defend/{workflow_id}","href":"/api-reference/defend/update-a-workflow","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use this endpoint to update an existing defend workflow if its details change.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components};return _jsxs(_components.p,{children:[`This endpoint can update the workflow’s `,_jsx(_components.code,{children:`name`}),`, `,_jsx(_components.code,{children:`description`}),`, `,_jsx(_components.code,{children:`threshold_type`}),`, `,_jsx(_components.code,{children:`automatic_hallucination_tolerance_levels`}),`, `,_jsx(_components.code,{children:`custom_hallucination_threshold_values`}),`, and `,_jsx(_components.code,{children:`improvement_action`}),` when needed. You can also add or remove extended AI capabilities like `,_jsx(_components.code,{children:`web_search`}),` and `,_jsx(_components.code,{children:`file_search`}),`. Only fields provided in the request body will be updated.`]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a Workflow","description":"Use this endpoint to update an existing defend workflow if its details change.\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /defend/{workflow_id}","href":"/api-reference/defend/update-a-workflow","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Defend"],"summary":"Update a Workflow","description":"Use this endpoint to update an existing defend workflow if its details change.\n","x-mint":{"content":"This endpoint can update the workflow's `name`, `description`, `threshold_type`, `automatic_hallucination_tolerance_levels`, `custom_hallucination_threshold_values`, and `improvement_action` when needed. You can also add or remove extended AI capabilities like `web_search` and `file_search`. Only fields provided in the request body will be updated."},"x-codeSamples":[{"lang":"python","label":"Update a Workflow","source":"from deeprails import DeepRails\n\nDEEPRAILS_API_KEY = \"YOUR_API_KEY\"\n\nclient = DeepRails(\n api_key=DEEPRAILS_API_KEY,\n)\n\nworkflow_response = client.defend.update_workflow(\n workflow_id=\"wkfl_xxxxxxxxxxxx\",\n description=\"A workflow used to test the DeepRails SDK\",\n threshold_type=\"automatic\",\n automatic_hallucination_tolerance_levels={\n \"completeness\": \"low\",\n \"instruction_adherence\": \"medium\",\n \"comprehensive_safety\": \"medium\"\n },\n improvement_action=\"regen\",\n max_improvement_attempts=3,\n web_search=False,\n context_awareness=False,\n file_search=[\"file_1\", \"file_2\", \"file_3\"]\n)\nprint(workflow_response)\n"}],"security":["9f824a6f-2329-492f-88c0-ce7aa4c421a1"],"parameters":["2826a3cd-9035-4926-9afc-9755dcb8b8dd"],"requestBody":"7d5d01e4-06d2-4029-bb40-44280f8dd930","responses":{"200":"639b0808-ae5d-4a17-b6a5-79c80e6b3788","400":"7bd6f114-7f47-45d0-9594-439e7ac6488d","401":"10bae258-3ac4-4dd2-90a3-44b727106168","404":"54de1aaa-be70-4d51-a2b6-9b485768b4c5"},"method":"put","type":"path","servers":["354ef262-08b5-467e-b0b8-a640a41a5637"],"path":"/defend/{workflow_id}","baseUrlOptions":["https://api.deeprails.com"],"title":"Update a Workflow","codeSamples":[{"label":"Update a Workflow","lang":"python","source":"from deeprails import DeepRails\n\nDEEPRAILS_API_KEY = \"YOUR_API_KEY\"\n\nclient = DeepRails(\n api_key=DEEPRAILS_API_KEY,\n)\n\nworkflow_response = client.defend.update_workflow(\n workflow_id=\"wkfl_xxxxxxxxxxxx\",\n description=\"A workflow used to test the DeepRails SDK\",\n threshold_type=\"automatic\",\n automatic_hallucination_tolerance_levels={\n \"completeness\": \"low\",\n \"instruction_adherence\": \"medium\",\n \"comprehensive_safety\": \"medium\"\n },\n improvement_action=\"regen\",\n max_improvement_attempts=3,\n web_search=False,\n context_awareness=False,\n file_search=[\"file_1\", \"file_2\", \"file_3\"]\n)\nprint(workflow_response)\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"2826a3cd-9035-4926-9afc-9755dcb8b8dd":{"name":"workflow_id","in":"path","description":"The ID of the workflow to edit.","required":true,"schema":{"type":"string","isRequired":true,"description":"The ID of the workflow to edit.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New name for the workflow.","uniqueKey":"name","typeLabel":"string"},"description":{"type":"string","description":"New description for the workflow.","uniqueKey":"description","typeLabel":"string"},"threshold_type":{"type":"string","description":"New type of thresholds to use for the workflow, either `automatic` or `custom`. Automatic thresholds are assigned internally after the user specifies a qualitative tolerance for the metrics, whereas custom metrics allow the user to set the threshold for each metric as a floating point number between 0.0 and 1.0.\n","enum":["automatic","custom"],"uniqueKey":"threshold_type","typeLabel":"enum\u003cstring>"},"automatic_hallucination_tolerance_levels":{"type":"object","description":"New mapping of guardrail metrics to hallucination tolerance levels\n (either `low`, `medium`, or `high`) to be used when `threshold_type`\n is set to `automatic`. Possible metrics are \n `completeness`, `instruction_adherence`, `context_adherence`, \n `ground_truth_adherence`, or `comprehensive_safety`.\n","additionalProperties":{"type":"string","enum":["low","medium","high"],"uniqueKey":"automatic_hallucination_tolerance_levels.additionalProperties","typeLabel":"enum\u003cstring>"},"uniqueKey":"automatic_hallucination_tolerance_levels","typeLabel":"object"},"custom_hallucination_threshold_values":{"type":"object","description":"New mapping of guardrail metrics to floating point threshold values to be used when `threshold_type` is set to `custom`. Possible metrics are `correctness`, `completeness`, `instruction_adherence`, `context_adherence`, `ground_truth_adherence`, or `comprehensive_safety`.\n","additionalProperties":{"type":"number","format":"float","minimum":0,"maximum":1,"uniqueKey":"custom_hallucination_threshold_values.additionalProperties","typeLabel":"number\u003cfloat>"},"uniqueKey":"custom_hallucination_threshold_values","typeLabel":"object"},"improvement_action":{"type":"string","description":"The new action used to improve outputs that fail one or more guardrail metrics for the workflow events. May be `regen`, `fixit`, or `do_nothing`. ReGen runs the user's input prompt with minor induced variance. FixIt attempts to directly address the shortcomings of the output using the guardrail failure rationale. Do Nothing does not attempt any improvement.\n","enum":["regen","fixit","do_nothing"],"nullable":false,"uniqueKey":"improvement_action","typeLabel":"enum\u003cstring>"},"max_improvement_attempts":{"type":"integer","description":"Max. number of improvement action attempts until a given event passes the guardrails. Defaults to 10.","default":10,"uniqueKey":"max_improvement_attempts","typeLabel":"integer"},"web_search":{"type":"boolean","description":"Whether to enable web search for this workflow's evaluations.","default":false,"uniqueKey":"web_search","typeLabel":"boolean"},"file_search":{"type":"array","description":"An array of file IDs to search in the workflow's evaluations. Files must be uploaded via the DeepRails API first.","items":{"type":"string","description":"A file ID corresponding to a file to search in the workflow's evaluations.","uniqueKey":"file_search.items.[INDEX]","typeLabel":"string"},"uniqueKey":"file_search","typeLabel":"string[]"},"context_awareness":{"type":"boolean","description":"Whether to enable context awareness for this workflow's evaluations.","default":false,"uniqueKey":"context_awareness","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"\u003cstring>","description":"\u003cstring>","automatic_hallucination_tolerance_levels":{},"custom_hallucination_threshold_values":{},"max_improvement_attempts":10,"web_search":false,"file_search":["\u003cstring>"],"context_awareness":false}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"639b0808-ae5d-4a17-b6a5-79c80e6b3788":{"description":"Workflow updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"workflow_id":{"type":"string","description":"A unique workflow ID.","example":"wkfl_xxxxxxxxxxxx","isRequired":true,"uniqueKey":"workflow_id","typeLabel":"string"},"status":{"type":"string","description":"Status of the selected workflow. May be `inactive` or `active`. Inactive workflows will not accept events.","example":"active","enum":["inactive","active"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"modified_at":{"type":"string","format":"date-time","description":"The time the workflow was last modified in UTC.","example":"2025-01-15T10:30:00Z","isRequired":true,"uniqueKey":"modified_at","typeLabel":"string\u003cdate-time>"},"name":{"type":"string","description":"The name of the workflow.","example":"Test Workflow","uniqueKey":"name","typeLabel":"string"}},"required":["workflow_id","status","modified_at"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"workflow_id":"wkfl_xxxxxxxxxxxx","status":"active","modified_at":"2025-01-15T10:30:00Z","name":"Test Workflow"}}},"exampleType":"generated"}},"exampleType":"generated"},"7bd6f114-7f47-45d0-9594-439e7ac6488d":{"description":"Invalid request","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"10bae258-3ac4-4dd2-90a3-44b727106168":{"description":"Unauthorized","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"54de1aaa-be70-4d51-a2b6-9b485768b4c5":{"description":"Workflow not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"9f824a6f-2329-492f-88c0-ce7aa4c421a1":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"354ef262-08b5-467e-b0b8-a640a41a5637":{"url":"https://api.deeprails.com","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"deeprails-479f3a7b","siteName":"DeepRails","title":"Update a Workflow - DeepRails","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-09T20:45:59.252Z","originalFileLocation":"api-reference/defend/update-a-workflow.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use this endpoint to update an existing defend workflow if its details change.\">\u003cmeta data-mint-head name=\"application-name\" content=\"DeepRails\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a Workflow - DeepRails\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use this endpoint to update an existing defend workflow if its details change.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DeepRails\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.deeprails.com/api-reference/defend/update-a-workflow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://deeprails-479f3a7b.mintlify.site/_mintlify/api/og/v2?division=Defend\u0026amp;title=Update+a+Workflow\u0026amp;description=Use+this+endpoint+to+update+an+existing+defend+workflow+if+its+details+change.%0A\u0026amp;theme=e5255410c10d93655e7ca4a4\u0026amp;signature=bf1cdaa082a9c5a6e96d65af0313cc5d0155a041953ae16f6681d12184090a96\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update a Workflow - DeepRails\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use this endpoint to update an existing defend workflow if its details change.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://deeprails-479f3a7b.mintlify.site/_mintlify/api/og/v2?division=Defend\u0026amp;title=Update+a+Workflow\u0026amp;description=Use+this+endpoint+to+update+an+existing+defend+workflow+if+its+details+change.%0A\u0026amp;theme=e5255410c10d93655e7ca4a4\u0026amp;signature=bf1cdaa082a9c5a6e96d65af0313cc5d0155a041953ae16f6681d12184090a96\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/deeprails-479f3a7b/Z_VM1vKqq_sDqO8r/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DeepRails\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#f2ca46\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.deeprails.com/api-reference/defend/update-a-workflow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/defend/update-a-workflow.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.deeprails.com/#organization\",\"name\":\"DeepRails\",\"url\":\"https://docs.deeprails.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/deeprails-479f3a7b/bbwR2lswB0faqCU8/logo/deeprails-gold.png?fit=max\u0026auto=format\u0026n=bbwR2lswB0faqCU8\u0026q=85\u0026s=f30c47f94d9c83f7345f61cf0bafdcb1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.deeprails.com#website\",\"name\":\"DeepRails\",\"url\":\"https://docs.deeprails.com\",\"publisher\":{\"@id\":\"https://docs.deeprails.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow#webpage\",\"url\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow\",\"name\":\"Update a Workflow\",\"description\":\"Use this endpoint to update an existing defend workflow if its details change.\",\"dateModified\":\"2026-03-09T20:45:59.252Z\",\"isPartOf\":{\"@id\":\"https://docs.deeprails.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Documentation\",\"item\":\"https://docs.deeprails.com/api-reference/defend/create-a-workflow\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Defend\",\"item\":\"https://docs.deeprails.com/api-reference/defend/create-a-workflow\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update a Workflow\",\"item\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow#apireference\",\"headline\":\"Update a Workflow\",\"name\":\"Update a Workflow\",\"description\":\"Use this endpoint to update an existing defend workflow if its details change.\",\"url\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow\",\"mainEntityOfPage\":{\"@id\":\"https://docs.deeprails.com/api-reference/defend/update-a-workflow#webpage\"},\"dateModified\":\"2026-03-09T20:45:59.252Z\",\"publisher\":{\"@id\":\"https://docs.deeprails.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.deeprails.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DeepRails\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"DeepRails\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/defend/update-a-workflow.md","siteName":"DeepRails","nav":{"global":{"anchors":[{"anchor":"Python SDK","icon":"python","href":"https://pypi.org/project/deeprails"},{"anchor":"TypeScript SDK","icon":"square-js","href":"https://www.npmjs.com/package/deeprails/"},{"anchor":"Ruby SDK","icon":"gem","href":"https://rubygems.org/gems/deeprails"},{"anchor":"Go SDK","icon":"golang","href":"https://pkg.go.dev/github.com/deeprails/deeprails-go-sdk"},{"anchor":"Contact","icon":"envelope","href":"mailto:support@deeprails.ai"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"group":"Defend","pages":[{"title":"Create a Workflow","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /defend","href":"/api-reference/defend/create-a-workflow"},{"title":"Retrieve a Workflow's Details","description":"Use this endpoint to retrieve the details for a specific defend workflow\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /defend/{workflow_id}","href":"/api-reference/defend/retrieve-a-workflows-details"},{"title":"Update a Workflow","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /defend/{workflow_id}","href":"/api-reference/defend/update-a-workflow"},{"title":"Submit a Workflow Event","description":"Use this endpoint to submit a model input and output pair to a workflow for evaluation\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /defend/{workflow_id}/events","href":"/api-reference/defend/submit-a-workflow-event"},{"title":"Retrieve an Event's Details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /defend/{workflow_id}/events/{event_id}","href":"/api-reference/defend/retrieve-an-events-details"},{"title":"Stream a Workflow Event (Optimized)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /defend/{workflow_id}/events?stream=true","href":"/api-reference/defend/stream-a-workflow-event-optimized"}]},{"group":"Monitor","pages":[{"title":"Create a Monitor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /monitor","href":"/api-reference/monitor/create-a-monitor"},{"title":"Retrieve a Monitor's Details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /monitor/{monitor_id}","href":"/api-reference/monitor/retrieve-a-monitors-details"},{"title":"Update a Monitor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /monitor/{monitor_id}","href":"/api-reference/monitor/update-a-monitor"},{"title":"Submit a Monitor Event","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /monitor/{monitor_id}/events","href":"/api-reference/monitor/submit-a-monitor-event"},{"title":"Retrieve a Monitor Event's Details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /monitor/{monitor_id}/events/{event_id}","href":"/api-reference/monitor/retrieve-a-monitor-events-details"}]},{"group":"Files","pages":[{"title":"Upload a File","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /files/upload","href":"/api-reference/files/upload-a-file"}]}]}]}]},"basePath":"","title":"Update a Workflow - DeepRails","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CaRkHcld.js","snippetPresets-CbOVSLWB.js","utils-cjri0g4r.js","style-to-object-BY3JEAdk.js","utils-DINdUa17.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-B6z-PJGf.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BldndzCM.js","_Uint8Array-BFUkDgJK.js","isObject-FP1Yky1u.js","ApiExamples-gah5G0c1.js","usePlaygroundInputsStore-DMbftGRK.js","shallow-BPuQ-dV8.js","isEqual-Du6c450V.js","CodeSnippets-BSVM0Ibi.js","CodeSnippet-BtGQRZnK.js","use-playground-group-access-98JyaSW7.js","Page-DuvGhd6e.js","api-description-markdown-ja0XM5Ae.js","DynamicMarkdown-DgKZ4_wp.js","SectionHeading-S4Jc_qPe.js","MethodPill-HIsDH_bI.js","getPastedJson-BKEmMYEO.js","Check2Icon-CRFAnWm9.js","axios-CsQoIw0U.js","Markdown-CexXCNoj.js","AssistantPageLink-C2AZnMAs.js","dist-CjxLTLs9.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}