## Batch create new Workflow instances `workflows.instances.bulk(strworkflow_name, InstanceBulkParams**kwargs) -> SyncSinglePage[InstanceBulkResponse]` **post** `/accounts/{account_id}/workflows/{workflow_name}/instances/batch` Creates multiple workflow instances in a single batch operation. ### Parameters - `account_id: str` - `workflow_name: str` - `body: Optional[Iterable[Body]]` - `instance_id: Optional[str]` - `instance_retention: Optional[BodyInstanceRetention]` - `error_retention: Optional[Union[int, str]]` Specifies the duration in milliseconds or as a string like '5 minutes'. - `int` Specifies the duration in milliseconds. - `str` - `success_retention: Optional[Union[int, str]]` Specifies the duration in milliseconds or as a string like '5 minutes'. - `int` Specifies the duration in milliseconds. - `str` - `params: Optional[object]` ### Returns - `class InstanceBulkResponse: …` - `id: str` - `status: Literal["queued", "running", "paused", 5 more]` - `"queued"` - `"running"` - `"paused"` - `"errored"` - `"terminated"` - `"complete"` - `"waitingForPause"` - `"waiting"` - `version_id: str` - `workflow_id: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.workflows.instances.bulk( workflow_name="x", account_id="account_id", ) page = page.result[0] print(page.id) ``` #### Response ```json { "errors": [ { "code": 0, "message": "message" } ], "messages": [ { "code": 0, "message": "message" } ], "result": [ { "id": "x", "status": "queued", "version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "workflow_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "success": true, "result_info": { "count": 0, "per_page": 0, "total_count": 0, "cursor": "cursor", "page": 0 } } ```