> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trysiren.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Trigger

> Bulk Trigger in Workflow

<Info>
  The same API endpoint is used to trigger scheduled workflows.
</Info>

## Header

<ParamField header="apiToken" type="string" required>
  Bearer token for API authentication. Format: `Bearer {{apiToken}}`
</ParamField>

```json Request Body theme={null}
{
  "workflowName": "<workflow_name>",
  "data": {
    "<key>": "<value>"
  },
  "notify": [
    {
      "<key>": "<value>"
    }
  ]
}
```

## Body Parameters

<ParamField body="data" type="object">
  Data that is being used in the workflow

  <ParamField type="string">
    Dynamic key-value pairs for common data.
  </ParamField>
</ParamField>

<ParamField body="notify" type="object" required>
  In Bulk trigger, this attribute is an array of objects. Bulk trigger is used when multiple recipients are there.

  <ParamField type="string">
    The type of notification (e.g., `email`, `sms`).
  </ParamField>

  <ParamField type="string">
    The recipient of the notification (e.g., email address, phone number).
  </ParamField>
</ParamField>

<RequestExample>
  ```json Request Example theme={null}
  {
    "workflowName": "otp",
    "data": {
      "subject": "otp verification"
    },
    "notify": [
      {
        "notificationType": "email",
        "recipient": "example@example.com"
      },
      {
        "notificationType": "sms",
        "recipient": "+1234567890"
      }
    ]
  }
  ```
</RequestExample>

## Response

<ResponseField name="data" type="object">
  <ResponseField name="requestId" type="UUID">
    UUID — identifier for the bulk request.
  </ResponseField>

  <ResponseField name="workflowExecutionIds" type="array">
    Array of UUIDs — each corresponding to an individual workflow execution.
  </ResponseField>

  <ResponseField name="errorCode" type="string">
    The error code (e.g., `BAD_REQUEST`).
  </ResponseField>

  <ResponseField name="message" type="string">
    A human-readable error message.
  </ResponseField>
</ResponseField>

<ResponseExample>
  ```json success (200) theme={null}
  {
    "data": {
      "requestId": UUID,    //id of the request
      "workflowExecutionIds": [UUID]    // list of workflow execution ids
    },
    "error": null,
    "errors": null,
    "meta": null
  }
  ```

  ```json bad request (400) theme={null}
  {
    "data": null,
    "error": {
      "errorCode": "BAD_REQUEST",
      "message": "Bad request"
    },
    "errors": [
      {
        "errorCode": "BAD_REQUEST",
        "message": "Bad request"
      }
    ],
    "meta": null
  }
  ```

  ```json unauthorised (401) theme={null}
  {
    "data": null,
    "error": {
      "errorCode": "UNAUTHORISED",
      "message": "Unauthorised"
    },
    "errors": [
      {
        "errorCode": "UNAUTHORISED",
        "message": "Unauthorised"
      }
    ],
    "meta": null
  }
  ```

  ```json not found (404) theme={null}
  {
    "data": null,
    "error": {
      "errorCode": "NOT FOUND",
      "message": "Not found"
    },
    "errors": [
      {
        "errorCode": "NOT FOUND",
        "message": "Not found"
      }
    ],
    "meta": null
  }
  ```
</ResponseExample>

## Status Codes

* `200` - OK
* `400` - BAD REQUEST
* `401` - UNAUTHORISED
* `404` - NOT FOUND

***
