> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/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


## Related topics

- [Create Default Workflow Step Option From Type](/en/api/reference/restful/agent/workflow_agent/create-default-workflow-step-option-from-type.md)
- [SuperOffice.WebApi.Data.WorkflowStepCreateRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.WorkflowStepCreateRequest.md)
- [SuperOffice.WebApi.Data.WorkflowStepCreateSale](/en/api/reference/webapi/SuperOffice.WebApi.Data.WorkflowStepCreateSale.md)
- [Create an EmailFlow object](/en/api/web-services/howto/flows/rest-create-default-email-flow.md)
- [SuperOffice.WebApi.Data.WorkflowStepCreateFollowUp](/en/api/reference/webapi/SuperOffice.WebApi.Data.WorkflowStepCreateFollowUp.md)
- [SuperOffice.WebApi.Data.Workflow CreateDefaultWorkflowStepFromTypeRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Workflow_CreateDefaultWorkflowStepFromTypeRequest.md)
