> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Import a workflow

POST https://rest.test.zuora.com/workflows/import
Content-Type: application/json

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.


Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/workflow/workflows/post-workflow-import

## Authentication

- `Authorization` header (bearer token, required) — Use `Bearer {{token}}` in the `Authorization` header for authentication.

## Servers

- `https://rest.test.zuora.com` (US Developer & Central Sandbox (incl. Test Drive), default)
- `https://rest.sandbox.na.zuora.com` (US API Sandbox Cloud 1)
- `https://rest.apisandbox.zuora.com` (US API Sandbox Cloud 2)
- `https://rest.na.zuora.com` (US Production Cloud 1)
- `https://rest.zuora.com` (US Production Cloud 2)
- `https://rest.test.eu.zuora.com` (EU Developer & Central Sandbox)
- `https://rest.sandbox.eu.zuora.com` (EU API Sandbox)
- `https://rest.eu.zuora.com` (EU Production)
- `https://rest.test.ap.zuora.com` (APAC Developer & Central Sandbox)
- `https://rest.ap.zuora.com` (APAC Production)

## Request

### Query parameters

- `workflow_definition_id` (integer, optional) — The unique id of the workflow definition to under.
- `version` (string, optional) — The version number of the new workflow version to import. Must be greater than any existing version numbers.
- `activate` (boolean, optional) — Indicates whether the imported version is an active version. Default to be false.

### Headers

- `Idempotency-Key` (string, optional) — 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, optional) — 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, optional) — 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, optional) — 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 (`'`).

### Body (application/json)

This endpoint expects a POSTWorkflowDefinitionImportRequest.

- `linkages` (list of Linkage, optional)
- `tasks` (list of Task, optional)
- `workflow` (Workflow, optional) — A workflow.

## Response

### 200

OK

- `calloutTrigger` (boolean, optional) — Indicates whether the callout trigger is enabled for the retrieved workflow.
- `createdAt` (string, optional) — The date and time when the workflow is created, in the `YYYY-MM-DD HH:MM:SS` format.
- `description` (string, optional) — The description of the workflow.
- `id` (integer, optional) — The unique ID of the workflow.
- `interval` (string, optional) — The schedule of the workflow, in a CRON expression. Returns null if the schedued trigger is disabled.
- `name` (string, optional) — The name of the workflow.
- `ondemandTrigger` (boolean, optional) — Indicates whether the ondemand trigger is enabled for the workflow.
- `scheduledTrigger` (boolean, optional) — Indicates whether the scheduled trigger is enabled for the workflow.
- `timezone` (string, optional) — The timezone that is configured for the scheduler of the workflow. Returns null if the scheduled trigger is disabled.
- `type` (enum, optional) — The type of the workflow. Currently the only valid value is 'Workflow::Setup'.
  - Allowed values: `Workflow::Setup`, `Workflow::Instance`
- `updatedAt` (string, optional) — The date and time when the workflow is updated the last time, in the `YYYY-MM-DD HH:MM:SS` format.
- `version` (string, optional) — The version number of the workflow.

## Types

### Linkage

Used to represent the relationship between workflow tasks

- `linkage_type` (enum, optional)
  - Allowed values: `Start`, `Success`, `Failure`, `Iterate`, `True`, `False`, `Approve`, `Reject`
- `source_task_id` (integer, optional) — the task that spawned the target task
- `source_workflow_id` (integer, optional) — the workflow the target task is associated with
- `target_task_id` (integer, optional) — the task that the source task is linked to.

### Task

A task.

- `action_type` (enum, optional) — The type of the task.
  - Allowed values: `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`
- `call_type` (string, optional) — The type of API used.
- `concurrent_limit` (integer, optional) — the number of concurrent tasks that are allowed to run simultaneously
- `data` (TaskData, optional) — The data payload for the task.
- `end_time` (string, optional) — If **Instance** is **true**, the end time of the task instance.
- `error` (string, optional) — If **Instance** is **true** and **status** is **Error**, the error reason of the task instance failure.
- `error_class` (string, optional) — If **Instance** is **true** and **status** is **Error**, the error class of the task instance failure.
- `error_details` (string, optional) — If **Instance** is **true** and **status** is **Error**, the error details of the task instance failure.
- `id` (integer, optional) — The unique ID of the task.
- `instance` (boolean, optional) — Indicates whether this task belongs to an instance of a workflow.
- `name` (string, optional) — The name of the task.
- `object` (string, optional) — The selected object for the task.
- `object_id` (string, optional) — The id of the selected object of the task.
- `original_task_id` (integer, optional) — If **Instance** is **true**, the ID of the original task in the original workflow.
- `original_workflow_id` (integer, optional) — If **Instance** is **true**, the ID of the original workflow.
- `parameters` (TaskParameters, optional) — The configuration of the task.
- `start_time` (string, optional) — If **Instance** is **true**, the start time of the task instance.
- `status` (enum, optional) — If **Instance** is **true**, the status of the task instance.
  - Allowed values: `Queued`, `Processing`, `Pending`, `Success`, `Stopped`, `Error`
- `tags` (list of string, optional) — The array of filter tags.
- `task_id` (integer, optional) — the id of this task's parent task. Will be null if this is the first task of the workflow
- `workflow_id` (integer, optional) — The ID of the workflow that the task belongs to.

### Workflow

A workflow.

- `calloutTrigger` (boolean, optional) — Indicates whether the callout trigger is enabled for the retrieved workflow.
- `createdAt` (string, optional) — The date and time when the workflow is created, in the `YYYY-MM-DD HH:MM:SS` format.
- `description` (string, optional) — The description of the workflow.
- `id` (integer, optional) — The unique ID of the workflow.
- `interval` (string, optional) — The schedule of the workflow, in a CRON expression. Returns null if the schedued trigger is disabled.
- `name` (string, optional) — The name of the workflow.
- `ondemandTrigger` (boolean, optional) — Indicates whether the ondemand trigger is enabled for the workflow.
- `scheduledTrigger` (boolean, optional) — Indicates whether the scheduled trigger is enabled for the workflow.
- `timezone` (string, optional) — The timezone that is configured for the scheduler of the workflow. Returns null if the scheduled trigger is disabled.
- `type` (enum, optional) — The type of the workflow. Currently the only valid value is 'Workflow::Setup'.
  - Allowed values: `Workflow::Setup`, `Workflow::Instance`
- `updatedAt` (string, optional) — The date and time when the workflow is updated the last time, in the `YYYY-MM-DD HH:MM:SS` format.
- `version` (string, optional) — The version number of the workflow.

### TaskData

The data payload for the task.

### TaskParameters

The configuration of the task.

## Examples

**Request**

```json
{
  "linkages": [
    {
      "linkage_type": "Start",
      "source_workflow_id": 458,
      "target_task_id": 1418
    }
  ],
  "tasks": [
    {
      "action_type": "Approval",
      "call_type": "SOAP",
      "concurrent_limit": 9999999,
      "id": 1418,
      "name": "Checking the Approval Email",
      "object": "",
      "object_id": "",
      "parameters": {
        "approvalNote": "",
        "delivery_method": "email",
        "emailBody": "<body style=\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\>\\n\\t<p> Hello,</p>\\n\\t<p>You have a pending approval. Please <a href=\\{{Data.Approval.approveLink}}\\>approve</a> or <a href=\\{{Data.Approval.rejectLink}}\\>reject</a>.</p>\\n\\t<p>Thanks</p> \\n</body>",
        "email_approver_emails": [
          "admin@company.com"
        ],
        "senderEmail": "workflow@zuora.com",
        "senderName": "Admin",
        "subjectEmail": "This is the email to check if this email is working"
      },
      "tags": []
    }
  ],
  "workflow": {
    "description": "",
    "id": 458,
    "interval": "",
    "name": "Checking Workflow",
    "timezone": "",
    "type": "Workflow::Setup",
    "version": "0.0.1",
    "callout_trigger": false,
    "ondemand_trigger": true,
    "scheduled_trigger": false,
    "status": "Active"
  }
}
```

**Response**

```json
{
  "calloutTrigger": false,
  "createdAt": "2019-10-03T14:14:39.139Z",
  "description": "",
  "id": 3373,
  "interval": "",
  "name": "Checking Workflow",
  "ondemandTrigger": true,
  "scheduledTrigger": false,
  "timezone": "",
  "type": "Workflow::Setup",
  "updatedAt": "2019-10-03T14:14:39.139Z",
  "version": "0.0.1"
}
```

**SDK Code**

```python response
import requests

url = "https://rest.test.zuora.com/workflows/import"

payload = {
    "linkages": [
        {
            "linkage_type": "Start",
            "source_workflow_id": 458,
            "target_task_id": 1418
        }
    ],
    "tasks": [
        {
            "action_type": "Approval",
            "call_type": "SOAP",
            "concurrent_limit": 9999999,
            "id": 1418,
            "name": "Checking the Approval Email",
            "object": "",
            "object_id": "",
            "parameters": {
                "approvalNote": "",
                "delivery_method": "email",
                "emailBody": "<body style=\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\>\n\t<p> Hello,</p>\n\t<p>You have a pending approval. Please <a href=\{{Data.Approval.approveLink}}\>approve</a> or <a href=\{{Data.Approval.rejectLink}}\>reject</a>.</p>\n\t<p>Thanks</p> \n</body>",
                "email_approver_emails": ["admin@company.com"],
                "senderEmail": "workflow@zuora.com",
                "senderName": "Admin",
                "subjectEmail": "This is the email to check if this email is working"
            },
            "tags": []
        }
    ],
    "workflow": {
        "description": "",
        "id": 458,
        "interval": "",
        "name": "Checking Workflow",
        "timezone": "",
        "type": "Workflow::Setup",
        "version": "0.0.1",
        "callout_trigger": False,
        "ondemand_trigger": True,
        "scheduled_trigger": False,
        "status": "Active"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript response
const url = 'https://rest.test.zuora.com/workflows/import';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"linkages":[{"linkage_type":"Start","source_workflow_id":458,"target_task_id":1418}],"tasks":[{"action_type":"Approval","call_type":"SOAP","concurrent_limit":9999999,"id":1418,"name":"Checking the Approval Email","object":"","object_id":"","parameters":{"approvalNote":"","delivery_method":"email","emailBody":"<body style=\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\>\\n\\t<p> Hello,</p>\\n\\t<p>You have a pending approval. Please <a href=\\{{Data.Approval.approveLink}}\\>approve</a> or <a href=\\{{Data.Approval.rejectLink}}\\>reject</a>.</p>\\n\\t<p>Thanks</p> \\n</body>","email_approver_emails":["admin@company.com"],"senderEmail":"workflow@zuora.com","senderName":"Admin","subjectEmail":"This is the email to check if this email is working"},"tags":[]}],"workflow":{"description":"","id":458,"interval":"","name":"Checking Workflow","timezone":"","type":"Workflow::Setup","version":"0.0.1","callout_trigger":false,"ondemand_trigger":true,"scheduled_trigger":false,"status":"Active"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go response
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rest.test.zuora.com/workflows/import"

	payload := strings.NewReader("{\n  \"linkages\": [\n    {\n      \"linkage_type\": \"Start\",\n      \"source_workflow_id\": 458,\n      \"target_task_id\": 1418\n    }\n  ],\n  \"tasks\": [\n    {\n      \"action_type\": \"Approval\",\n      \"call_type\": \"SOAP\",\n      \"concurrent_limit\": 9999999,\n      \"id\": 1418,\n      \"name\": \"Checking the Approval Email\",\n      \"object\": \"\",\n      \"object_id\": \"\",\n      \"parameters\": {\n        \"approvalNote\": \"\",\n        \"delivery_method\": \"email\",\n        \"emailBody\": \"<body style=\\\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\\\>\\\\n\\\\t<p> Hello,</p>\\\\n\\\\t<p>You have a pending approval. Please <a href=\\\\{{Data.Approval.approveLink}}\\\\>approve</a> or <a href=\\\\{{Data.Approval.rejectLink}}\\\\>reject</a>.</p>\\\\n\\\\t<p>Thanks</p> \\\\n</body>\",\n        \"email_approver_emails\": [\n          \"admin@company.com\"\n        ],\n        \"senderEmail\": \"workflow@zuora.com\",\n        \"senderName\": \"Admin\",\n        \"subjectEmail\": \"This is the email to check if this email is working\"\n      },\n      \"tags\": []\n    }\n  ],\n  \"workflow\": {\n    \"description\": \"\",\n    \"id\": 458,\n    \"interval\": \"\",\n    \"name\": \"Checking Workflow\",\n    \"timezone\": \"\",\n    \"type\": \"Workflow::Setup\",\n    \"version\": \"0.0.1\",\n    \"callout_trigger\": false,\n    \"ondemand_trigger\": true,\n    \"scheduled_trigger\": false,\n    \"status\": \"Active\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby response
require 'uri'
require 'net/http'

url = URI("https://rest.test.zuora.com/workflows/import")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"linkages\": [\n    {\n      \"linkage_type\": \"Start\",\n      \"source_workflow_id\": 458,\n      \"target_task_id\": 1418\n    }\n  ],\n  \"tasks\": [\n    {\n      \"action_type\": \"Approval\",\n      \"call_type\": \"SOAP\",\n      \"concurrent_limit\": 9999999,\n      \"id\": 1418,\n      \"name\": \"Checking the Approval Email\",\n      \"object\": \"\",\n      \"object_id\": \"\",\n      \"parameters\": {\n        \"approvalNote\": \"\",\n        \"delivery_method\": \"email\",\n        \"emailBody\": \"<body style=\\\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\\\>\\\\n\\\\t<p> Hello,</p>\\\\n\\\\t<p>You have a pending approval. Please <a href=\\\\{{Data.Approval.approveLink}}\\\\>approve</a> or <a href=\\\\{{Data.Approval.rejectLink}}\\\\>reject</a>.</p>\\\\n\\\\t<p>Thanks</p> \\\\n</body>\",\n        \"email_approver_emails\": [\n          \"admin@company.com\"\n        ],\n        \"senderEmail\": \"workflow@zuora.com\",\n        \"senderName\": \"Admin\",\n        \"subjectEmail\": \"This is the email to check if this email is working\"\n      },\n      \"tags\": []\n    }\n  ],\n  \"workflow\": {\n    \"description\": \"\",\n    \"id\": 458,\n    \"interval\": \"\",\n    \"name\": \"Checking Workflow\",\n    \"timezone\": \"\",\n    \"type\": \"Workflow::Setup\",\n    \"version\": \"0.0.1\",\n    \"callout_trigger\": false,\n    \"ondemand_trigger\": true,\n    \"scheduled_trigger\": false,\n    \"status\": \"Active\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://rest.test.zuora.com/workflows/import")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"linkages\": [\n    {\n      \"linkage_type\": \"Start\",\n      \"source_workflow_id\": 458,\n      \"target_task_id\": 1418\n    }\n  ],\n  \"tasks\": [\n    {\n      \"action_type\": \"Approval\",\n      \"call_type\": \"SOAP\",\n      \"concurrent_limit\": 9999999,\n      \"id\": 1418,\n      \"name\": \"Checking the Approval Email\",\n      \"object\": \"\",\n      \"object_id\": \"\",\n      \"parameters\": {\n        \"approvalNote\": \"\",\n        \"delivery_method\": \"email\",\n        \"emailBody\": \"<body style=\\\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\\\>\\\\n\\\\t<p> Hello,</p>\\\\n\\\\t<p>You have a pending approval. Please <a href=\\\\{{Data.Approval.approveLink}}\\\\>approve</a> or <a href=\\\\{{Data.Approval.rejectLink}}\\\\>reject</a>.</p>\\\\n\\\\t<p>Thanks</p> \\\\n</body>\",\n        \"email_approver_emails\": [\n          \"admin@company.com\"\n        ],\n        \"senderEmail\": \"workflow@zuora.com\",\n        \"senderName\": \"Admin\",\n        \"subjectEmail\": \"This is the email to check if this email is working\"\n      },\n      \"tags\": []\n    }\n  ],\n  \"workflow\": {\n    \"description\": \"\",\n    \"id\": 458,\n    \"interval\": \"\",\n    \"name\": \"Checking Workflow\",\n    \"timezone\": \"\",\n    \"type\": \"Workflow::Setup\",\n    \"version\": \"0.0.1\",\n    \"callout_trigger\": false,\n    \"ondemand_trigger\": true,\n    \"scheduled_trigger\": false,\n    \"status\": \"Active\"\n  }\n}")
  .asString();
```

```php response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rest.test.zuora.com/workflows/import', [
  'body' => '{
  "linkages": [
    {
      "linkage_type": "Start",
      "source_workflow_id": 458,
      "target_task_id": 1418
    }
  ],
  "tasks": [
    {
      "action_type": "Approval",
      "call_type": "SOAP",
      "concurrent_limit": 9999999,
      "id": 1418,
      "name": "Checking the Approval Email",
      "object": "",
      "object_id": "",
      "parameters": {
        "approvalNote": "",
        "delivery_method": "email",
        "emailBody": "<body style=\\\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\\\>\\\\n\\\\t<p> Hello,</p>\\\\n\\\\t<p>You have a pending approval. Please <a href=\\\\{{Data.Approval.approveLink}}\\\\>approve</a> or <a href=\\\\{{Data.Approval.rejectLink}}\\\\>reject</a>.</p>\\\\n\\\\t<p>Thanks</p> \\\\n</body>",
        "email_approver_emails": [
          "admin@company.com"
        ],
        "senderEmail": "workflow@zuora.com",
        "senderName": "Admin",
        "subjectEmail": "This is the email to check if this email is working"
      },
      "tags": []
    }
  ],
  "workflow": {
    "description": "",
    "id": 458,
    "interval": "",
    "name": "Checking Workflow",
    "timezone": "",
    "type": "Workflow::Setup",
    "version": "0.0.1",
    "callout_trigger": false,
    "ondemand_trigger": true,
    "scheduled_trigger": false,
    "status": "Active"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp response
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/workflows/import");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"linkages\": [\n    {\n      \"linkage_type\": \"Start\",\n      \"source_workflow_id\": 458,\n      \"target_task_id\": 1418\n    }\n  ],\n  \"tasks\": [\n    {\n      \"action_type\": \"Approval\",\n      \"call_type\": \"SOAP\",\n      \"concurrent_limit\": 9999999,\n      \"id\": 1418,\n      \"name\": \"Checking the Approval Email\",\n      \"object\": \"\",\n      \"object_id\": \"\",\n      \"parameters\": {\n        \"approvalNote\": \"\",\n        \"delivery_method\": \"email\",\n        \"emailBody\": \"<body style=\\\\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\\\\>\\\\n\\\\t<p> Hello,</p>\\\\n\\\\t<p>You have a pending approval. Please <a href=\\\\{{Data.Approval.approveLink}}\\\\>approve</a> or <a href=\\\\{{Data.Approval.rejectLink}}\\\\>reject</a>.</p>\\\\n\\\\t<p>Thanks</p> \\\\n</body>\",\n        \"email_approver_emails\": [\n          \"admin@company.com\"\n        ],\n        \"senderEmail\": \"workflow@zuora.com\",\n        \"senderName\": \"Admin\",\n        \"subjectEmail\": \"This is the email to check if this email is working\"\n      },\n      \"tags\": []\n    }\n  ],\n  \"workflow\": {\n    \"description\": \"\",\n    \"id\": 458,\n    \"interval\": \"\",\n    \"name\": \"Checking Workflow\",\n    \"timezone\": \"\",\n    \"type\": \"Workflow::Setup\",\n    \"version\": \"0.0.1\",\n    \"callout_trigger\": false,\n    \"ondemand_trigger\": true,\n    \"scheduled_trigger\": false,\n    \"status\": \"Active\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "linkages": [
    [
      "linkage_type": "Start",
      "source_workflow_id": 458,
      "target_task_id": 1418
    ]
  ],
  "tasks": [
    [
      "action_type": "Approval",
      "call_type": "SOAP",
      "concurrent_limit": 9999999,
      "id": 1418,
      "name": "Checking the Approval Email",
      "object": "",
      "object_id": "",
      "parameters": [
        "approvalNote": "",
        "delivery_method": "email",
        "emailBody": "<body style=\font-family: Arial, sans-serif; margin: 20px; line-height: 1.6; color: #333;\>\n\t<p> Hello,</p>\n\t<p>You have a pending approval. Please <a href=\{{Data.Approval.approveLink}}\>approve</a> or <a href=\{{Data.Approval.rejectLink}}\>reject</a>.</p>\n\t<p>Thanks</p> \n</body>",
        "email_approver_emails": ["admin@company.com"],
        "senderEmail": "workflow@zuora.com",
        "senderName": "Admin",
        "subjectEmail": "This is the email to check if this email is working"
      ],
      "tags": []
    ]
  ],
  "workflow": [
    "description": "",
    "id": 458,
    "interval": "",
    "name": "Checking Workflow",
    "timezone": "",
    "type": "Workflow::Setup",
    "version": "0.0.1",
    "callout_trigger": false,
    "ondemand_trigger": true,
    "scheduled_trigger": false,
    "status": "Active"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/workflows/import")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```