---
title: "Creates a new scheduler in the system by accepting scheduler data in the request body"
method: POST
path: "/scheduler"
tags: ["Scheduler"]
---

# Creates a new scheduler in the system by accepting scheduler data in the request body

`POST /scheduler`

## Request body

- SchedulerRequestResource
  - `schedulerId` integer
  - `connectionId` integer
  - `title` string
  - `status` boolean
  - `cronExp` string
  - `debugMode` boolean
  - `notificationResources` NotificationResource[]
    - `notificationId` integer
    - `schedulerId` integer
    - `name` string
    - `eventType` string
    - `notificationType` string
    - `template` TemplateMessageResource
      - `templateId` integer
      - `name` string
    - `recipients` string[]
    - `team` string
    - `channel` string

## Response `201`

Scheduler is successfully created. The 'id' property will include newly created scheduler's 'id'

- SchedulerResource
  - `schedulerId` integer
  - `connection` ConnectionDTO
    - `id` string
    - `connectionId` integer
    - `title` string
    - `description` string
    - `icon` string
    - `fromConnector` ConnectorDTO
      - `connectorId` integer
      - `title` string
      - `icon` string
      - `sslCert` boolean
      - `timeout` integer
      - `invoker` InvokerDTO
        - `name` string
        - `description` string
        - `hint` string
        - `icon` string
        - `authType` string
        - `requiredData` object
        - `operations` FunctionDTO[]
          - `name` string
          - `type` string
          - `request` RequestDTO
            - `id` string
            - `endpoint` string
            - `method` string
            - `header` object
            - `body` BodyDTO
              - …
          - `response` ResponseDTO
            - `id` string
            - `name` string
            - `success` ResultDTO
              - …
            - `fail` ResultDTO
              - …
        - `hasManualSync` boolean
      - `businessLayout` BusinessLayout
        - `id` integer
        - `name` string
        - `svgItems` BLsvgItem[]
          - `id` integer
          - `name` string
          - `axisX` integer
          - `axisY` integer
          - `items` string
          - `getbLayout` BusinessLayout — recursive
        - `arrows` BLarrow[]
          - `from` integer
          - `to` integer
          - `getbLayout` BusinessLayout — recursive
      - `methods` MethodDTO[]
        - `id` string
        - `index` string
        - `name` string
        - `color` string
        - `label` string
        - `methodType` 'CONNECTOR' | 'HTTP_REQUEST' | 'WEBHOOK'
        - `dataAggregator` integer
        - `request` RequestDTO
          - `id` string
          - `endpoint` string
          - `method` string
          - `header` object
          - `body` BodyDTO
            - `type` string
            - `format` string
            - `data` string
            - `fields` object
        - `response` ResponseDTO
          - `id` string
          - `name` string
          - `success` ResultDTO
            - `id` string
            - `status` string
            - `header` object
            - `body` BodyDTO
              - …
          - `fail` ResultDTO
            - `id` string
            - `status` string
            - `header` object
            - `body` BodyDTO
              - …
        - `connector` MethodConnectorDTO
          - `connectorId` integer
          - `title` string
          - `invoker` string
      - `operators` OperatorDTO[]
        - `id` string
        - `type` string
        - `index` string
        - `iterator` string
        - `condition` ConditionDTO
          - `relationalOperator` string
          - `leftStatement` StatementDTO
            - `color` string
            - `field` string
            - `type` string
            - `rightPropertyValue` string
          - `rightStatement` StatementDTO
            - `color` string
            - `field` string
            - `type` string
            - `rightPropertyValue` string
        - `uiId` string
        - `expression` string
    - `toConnector` ConnectorDTO
      - `connectorId` integer
      - `title` string
      - `icon` string
      - `sslCert` boolean
      - `timeout` integer
      - `invoker` InvokerDTO
        - `name` string
        - `description` string
        - `hint` string
        - `icon` string
        - `authType` string
        - `requiredData` object
        - `operations` FunctionDTO[]
          - `name` string
          - `type` string
          - `request` RequestDTO
            - `id` string
            - `endpoint` string
            - `method` string
            - `header` object
            - `body` BodyDTO
              - …
          - `response` ResponseDTO
            - `id` string
            - `name` string
            - `success` ResultDTO
              - …
            - `fail` ResultDTO
              - …
        - `hasManualSync` boolean
      - `businessLayout` BusinessLayout
        - `id` integer
        - `name` string
        - `svgItems` BLsvgItem[]
          - `id` integer
          - `name` string
          - `axisX` integer
          - `axisY` integer
          - `items` string
          - `getbLayout` BusinessLayout — recursive
        - `arrows` BLarrow[]
          - `from` integer
          - `to` integer
          - `getbLayout` BusinessLayout — recursive
      - `methods` MethodDTO[]
        - `id` string
        - `index` string
        - `name` string
        - `color` string
        - `label` string
        - `methodType` 'CONNECTOR' | 'HTTP_REQUEST' | 'WEBHOOK'
        - `dataAggregator` integer
        - `request` RequestDTO
          - `id` string
          - `endpoint` string
          - `method` string
          - `header` object
          - `body` BodyDTO
            - `type` string
            - `format` string
            - `data` string
            - `fields` object
        - `response` ResponseDTO
          - `id` string
          - `name` string
          - `success` ResultDTO
            - `id` string
            - `status` string
            - `header` object
            - `body` BodyDTO
              - …
          - `fail` ResultDTO
            - `id` string
            - `status` string
            - `header` object
            - `body` BodyDTO
              - …
        - `connector` MethodConnectorDTO
          - `connectorId` integer
          - `title` string
          - `invoker` string
      - `operators` OperatorDTO[]
        - `id` string
        - `type` string
        - `index` string
        - `iterator` string
        - `condition` ConditionDTO
          - `relationalOperator` string
          - `leftStatement` StatementDTO
            - `color` string
            - `field` string
            - `type` string
            - `rightPropertyValue` string
          - `rightStatement` StatementDTO
            - `color` string
            - `field` string
            - `type` string
            - `rightPropertyValue` string
        - `uiId` string
        - `expression` string
    - `fieldBinding` FieldBindingDTO[]
      - `id` string
      - `enhancementId` integer
      - `from` LinkedFieldDTO[]
        - `color` string
        - `type` string
        - `field` string
      - `enhancement` EnhancementDTO
        - `title` string
        - `description` string
        - `script` string
        - `args` string
        - `simpleCode` SimpleCodeDTO
          - `pointer` integer
          - `code` CodeDTO[]
            - `name` string
            - `value` string
            - `type` string
        - `language` string
      - `to` LinkedFieldDTO[]
        - `color` string
        - `type` string
        - `field` string
    - `businessLayout` BusinessLayoutResource
      - `id` integer
      - `arrows` BLayoutArrowResource[]
        - `from` integer
        - `to` integer
      - `svgItems` BLayoutSvgItemResource[]
        - `id` integer
        - `name` string
        - `x` integer
        - `y` integer
        - `items` string[]
    - `categoryId` integer
    - `ui` object
  - `title` string
  - `status` boolean
  - `debugMode` boolean
  - `cronExp` string
  - `lastExecution` LastExecutionResource
    - `lastExecutionId` integer
    - `success` ExecutionResource
      - `taId` string
      - `startTime` integer
      - `endTime` integer
      - `duration` integer
      - `hasLog` boolean
    - `fail` ExecutionResource
      - `taId` string
      - `startTime` integer
      - `endTime` integer
      - `duration` integer
      - `hasLog` boolean
  - `webhook` WebhookResource
    - `webhookId` integer
    - `url` string
  - `notification` NotificationResource[]
    - `notificationId` integer
    - `schedulerId` integer
    - `name` string
    - `eventType` string
    - `notificationType` string
    - `template` TemplateMessageResource
      - `templateId` integer
      - `name` string
    - `recipients` string[]
    - `team` string
    - `channel` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Error
- `502` — Bad Gateway

---

[API](https://skmtc.net/opencelium/apis/opencelium-api.md) · [All operations](https://skmtc.net/opencelium/apis/opencelium-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opencelium/opencelium-api/versions/82ed767ffb65/schema)
