> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-bugfix-ty-screen-designer-paradox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Step object

> Create a Step object

Use the [CreateDefaultWorkflowStepFromType][1] REST endpoint to generate a new carrier with default settings, based on the [type of step][2]. This endpoint returns a pre-populated `Step` object configured with values corresponding to the selected `StepType`.

Similar to triggers, `WorkflowStepId` and `WorkflowId` are automatically assigned by the system upon creation and are not mandatory. These properties are excluded in the examples.

<Note>
  If no Rank is specified in the Step object, the system will determine the Rank automatically based on the order of elements in the object.
</Note>

## Request

```http theme={null}
POST https://{{env}}.superoffice.com/{{tenant}}/v1/Agents/Workflow/CreateDefaultWorkflowStepFromType HTTP/1.1
Authorization: Bearer {{access_token}}
Accept: application/json
Content-Type: application/json; charset=utf-8

{
    "StepType": "WaitForTime",
}
```

## Response

```json theme={null}
{
  "TimeWaitAlgorithm": "None",
  "NumIntervals": 0,
  "IntervalType": "None",
  "Until": null,
  "WorkflowStepId": 0,
  "WorkflowId": 0,
  "StepType": "WaitForTime",
  "Rank": 0
}
```

In the case of a 'WaitForTime' [StepType][2] you have the following examples for each of them:

```json theme={null}
{
    "TimeWaitAlgorithm": "NumIntervals",
    "NumIntervals": 7,
    "IntervalType": "Days",
    "Until": "[DT:05/31/2024 14:24:23]",
    "StepType": "WaitForTime",
    "Rank": 1
}
```

and

```json theme={null}
{
    "TimeWaitAlgorithm": "UntilSpecified",
    "NumIntervals": 7,
    "IntervalType": "Days",
    "Until": "[DT:05/31/2024 14:24:23]",
    "StepType": "WaitForTime",
    "Rank": 1
}
```

[1]: ../../../reference/restful/agent/Workflow_Agent/v1WorkflowAgent_CreateDefaultWorkflowStepFromType

[2]: ../../../../database/tables/enums/workflowsteptype
