> ## 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.

# Introduction to working with flows through the APIs

> Introduction to working with Flows through the API

A flow is an automated sequence of marketing-related steps, such as sending a message, updating participant information, or creating an activity. For a conceptual overview, see [the Learn - Marketing section][1]. This page details how to create flows using the API.

## Creating an EmailFlow

To create a new flow programmatically:

1. [Create a default `EmailFlow` object][4]: Start with the [CreateDefaultEmailFlow Agent][2] to initialize a new flow.

   ```http theme={null}
   POST /api/v1/Agents/Workflow/CreateDefaultEmailFlow
   ```

2. [Add triggers][5]: Include triggers (in the `EmailFlow` object) to set conditions for when a person is suggested as participant in the flow.

   ```http theme={null}
   POST /api/v1/Agents/Workflow/CreateDefaultWorkflowTrigger
   ```

3. [Add steps][6]: Define and incorporate steps (into the `EmailFlow` object) to sequence the flow of actions.

   ```http theme={null}
   POST /api/v1/Agents/Workflow/CreateDefaultWorkflowStepFromType
   ```

4. [Save the flow][7]: Use the [SaveEmailFlow Agent][3] to finalize and save the configured email flow.

   ```http theme={null}
   POST /api/v1/Agents/Workflow/SaveEmailFlow
   ```

<Tip>
  Explore code examples on [GitHub][8]!
</Tip>

[1]: ../../../../marketing/flows/learn/index

[2]: ../../../reference/restful/agent/Workflow_Agent/v1WorkflowAgent_CreateDefaultEmailFlow

[3]: ../../../reference/restful/agent/Workflow_Agent/v1WorkflowAgent_SaveEmailFlow

[4]: ./rest-create-default-email-flow

[5]: ./rest-create-flow-trigger

[6]: ./rest-create-flow-step

[7]: ./rest-save-flow

[8]: https://github.com/SuperOffice/RESTful-HTTP-Queries/blob/eivinds/src/Flow.http


## Related topics

- [Introduction to working with flows through the APIs](/en/api/web-services/howto/flows/index.md)
- [Introduction](/en/api/overview/quickstart.md)
- [Introduction to online development](/en/api/overview/develop-apps-or-integrations.md)
- [OICD Implicit flow](/en/api/authentication/online/sign-in-user/implicit-flow.md)
- [Marketing automation - flows](/en/marketing/flows/learn/index.md)
- [Authorization Code flow](/en/api/authentication/online/sign-in-user/auth-code-flow.md)
- [Introduction to custom objects and fields](/en/api/web-services/howto/custom-objects/index.md)
