# Import a workflow Create a new workflow definition and its first version using the exported JSON document of an existing workflow version. ### User Access Permission You must be assigned the Workflow Manage Access permission to run this operation. Endpoint: POST /workflows/import Version: 2026-02-20 Security: bearerAuth ## Header parameters: - `Idempotency-Key` (string) Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. - `Accept-Encoding` (string) Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it. - `Content-Encoding` (string) Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. - `Zuora-Track-Id` (string) A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote ('). ## Query parameters: - `workflow_definition_id` (integer) The unique id of the workflow definition to under. - `version` (string) The version number of the new workflow version to import. Must be greater than any existing version numbers. - `activate` (boolean) Indicates whether the imported version is an active version. Default to be false. ## Request fields (application/json): - `linkages` (array) Example: [{"source_workflow_id":458,"source_task_id":null,"target_task_id":1418,"linkage_type":"Finish"}] - `linkages.linkage_type` (string) Enum: "Start", "Success", "Failure", "Iterate", "True", "False", "Approve", "Reject" - `linkages.source_task_id` (integer) the task that spawned the target task - `linkages.source_workflow_id` (integer) the workflow the target task is associated with - `linkages.target_task_id` (integer) the task that the source task is linked to. - `tasks` (array) Example: [{"id":1418,"name":"Checking the Approval Email","parameters":{"emailBody":"\\n\\t

Hello,

\\n\\t

You have a pending approval. Please approve or reject.

\\n\\t

Thanks

\\n","senderName":"Admin","senderEmail":"workflow@zuora.com","approvalNote":"","subjectEmail":"This is the email to check if this email is working","delivery_method":"email","email_approver_emails":["admin@company.com"]},"action_type":"Approval","object":"","object_id":"","call_type":"SOAP","task_id":null,"concurrent_limit":9999999,"tags":[]}] - `tasks.action_type` (string) The type of the task. Enum: "Approval", "Attachment", "Billing::BillRun", "Billing::CurrencyConversion", "Billing::CustomInvoice", "Callout", "Cancel", "Create", "CustomObject::Create", "CustomObject::Delete", "CustomObject::Query", "CustomObject::Update", "Data::BillingPreviewRun", "Data::Link", "Delay", "Delete", "Download::SFTP", "Email", "Export", "File::CustomPDF::CustomDocument", "If", "InvoiceGenerate", "Iterate", "Logic::CSVTranslator", "Logic::Case", "Logic::CustomCode", "Logic::JSONTransform", "Logic::Lambda", "Logic::ResponseFormatter", "Logic::XMLTransform", "NewProduct", "Notifications::GoogleCloudPrint", "Notifications::PhoneCall", "Notifications::SMS", "Payment::GatewayReconciliation", "Payment::PaymentRun", "Query", "RemoveProduct", "Reporting::ReportData", "Reporting::RunReport", "Resume", "Suspend", "UI::Page", "UI::Stop", "Update", "Upload::FTP", "Upload::SFTP", "WriteOff" - `tasks.call_type` (string) The type of API used. - `tasks.concurrent_limit` (integer) the number of concurrent tasks that are allowed to run simultaneously - `tasks.data` (object) The data payload for the task. - `tasks.end_time` (string) If Instance is true, the end time of the task instance. - `tasks.error` (string) If Instance is true and status is Error, the error reason of the task instance failure. - `tasks.error_class` (string) If Instance is true and status is Error, the error class of the task instance failure. - `tasks.error_details` (string) If Instance is true and status is Error, the error details of the task instance failure. - `tasks.id` (integer) The unique ID of the task. - `tasks.instance` (boolean) Indicates whether this task belongs to an instance of a workflow. - `tasks.name` (string) The name of the task. - `tasks.object` (string) The selected object for the task. - `tasks.object_id` (string) The id of the selected object of the task. - `tasks.original_task_id` (integer) If Instance is true, the ID of the original task in the original workflow. - `tasks.original_workflow_id` (integer) If Instance is true, the ID of the original workflow. - `tasks.parameters` (object) The configuration of the task. - `tasks.start_time` (string) If Instance is true, the start time of the task instance. - `tasks.status` (string) If Instance is true, the status of the task instance. Enum: "Queued", "Processing", "Pending", "Success", "Stopped", "Error" - `tasks.tags` (array) The array of filter tags. - `tasks.task_id` (integer) the id of this task's parent task. Will be null if this is the first task of the workflow - `tasks.workflow_id` (integer) The ID of the workflow that the task belongs to. - `workflow` (object) A workflow. - `workflow.calloutTrigger` (boolean) Indicates whether the callout trigger is enabled for the retrieved workflow. - `workflow.createdAt` (string) The date and time when the workflow is created, in the YYYY-MM-DD HH:MM:SS format. - `workflow.description` (string) The description of the workflow. - `workflow.id` (integer) The unique ID of the workflow. - `workflow.interval` (string) The schedule of the workflow, in a CRON expression. Returns null if the schedued trigger is disabled. - `workflow.name` (string) The name of the workflow. - `workflow.ondemandTrigger` (boolean) Indicates whether the ondemand trigger is enabled for the workflow. - `workflow.scheduledTrigger` (boolean) Indicates whether the scheduled trigger is enabled for the workflow. - `workflow.timezone` (string) The timezone that is configured for the scheduler of the workflow. Returns null if the scheduled trigger is disabled. - `workflow.type` (string) The type of the workflow. Currently the only valid value is 'Workflow::Setup'. Enum: "Workflow::Setup", "Workflow::Instance" - `workflow.updatedAt` (string) The date and time when the workflow is updated the last time, in the YYYY-MM-DD HH:MM:SS format. - `workflow.version` (string) The version number of the workflow. ## Response 200 fields (application/json): - `calloutTrigger` (boolean) Indicates whether the callout trigger is enabled for the retrieved workflow. - `createdAt` (string) The date and time when the workflow is created, in the YYYY-MM-DD HH:MM:SS format. - `description` (string) The description of the workflow. - `id` (integer) The unique ID of the workflow. - `interval` (string) The schedule of the workflow, in a CRON expression. Returns null if the schedued trigger is disabled. - `name` (string) The name of the workflow. - `ondemandTrigger` (boolean) Indicates whether the ondemand trigger is enabled for the workflow. - `scheduledTrigger` (boolean) Indicates whether the scheduled trigger is enabled for the workflow. - `timezone` (string) The timezone that is configured for the scheduler of the workflow. Returns null if the scheduled trigger is disabled. - `type` (string) The type of the workflow. Currently the only valid value is 'Workflow::Setup'. Enum: "Workflow::Setup", "Workflow::Instance" - `updatedAt` (string) The date and time when the workflow is updated the last time, in the YYYY-MM-DD HH:MM:SS format. - `version` (string) The version number of the workflow.