---
title: "Flows"
slug: "flows"
abstract: ""
---
# Flows

The Flows resource is the first endpoint for the Agent.

Only the **POST** method is supported.

## POST /api/flows

Asks the Orchestrator for a new Flow to process. Returns **Location** header for the newly created [Flow resource](https://doc.sitecore.com/ch/en/developers/cloud-dev/flow-1523374.html "Flow") and a [Flow Object](https://doc.sitecore.com/ch/en/developers/cloud-dev/flow.html "Flow") with the contents of that Flow resource.

Example Request:

```json
GET http://<hostname>/api/flows
Host: hostname
Accept: application/json

```json
{

}

```

This action is returning the number of flows that are pending and also the flows in progress.

Example Response:

```json
HTTP/1.1 201 Created
Content-Length: content length
Content-Type: application/json; charset=utf-8
Location: http://<hostname>/api/flows/flow-id/flow-version

```json
{
    "flows_pending": 0,
    "flows_in_progress": 0,
    "self": {
        "href": "http://processing-api.customer.com:82/api/flows"
        }
}

```