Flow

Flow is a resource that represents a sequence of steps that a candidate must finish to complete a recruitment process such as an application or interview. Using FlowRun, a flow can be executed on a MessageThread, allowing the candidate to progress through the recruitment process. Flows can be created and managed via the Recrubo platform, but also generated with our AI engine via the API using the FlowGeneration resource.

Flows can be generated via a FlowGeneration but can also be manually created.

Endpoints

  • GET /flows - Retrieve a list of all flows.

  • GET /flows/{id} - Retrieve a specific flow by ID.

  • POST /flows - Create a new flow.

  • PATCH /flows/{id} - Update a specific flow by ID.

  • DELETE /flows/{id} - Delete a specific flow by ID.

Attributes

Field
Type
Description

name

String

Name of the flow

reminderInterval

Integer

Reminder interval in minutes. If a candidate (after responding to the first message) does not reply within this interval a reminder message will be sent. Set to 0 to disable.

reminderMessage

String

The message that will be sent to the user when the reminderInterval expires.

sessionTimeout

Integer

The interval in minutes after which the FlowRun session will timeout if the candidate does not respond. After this timeout we will stop the FlowRun and the chat will be stopped.

flowGenerationId

String

The FlowGeneration id that was used to generate this flow.

publishedAt

DateTime

The date and time the flow was published. Flows created via a flow generation will automatically be published

unpublishedChanges

Boolean

Indicates if the flow has unpublished changes.

createdAt

DateTime

The date and time the flow was created.

updatedAt

DateTime

The date and time the flow was last updated.

HTTP Methods

Field
GET
POST
PATCH

name

X

X

X

reminderInterval

X

X

X

reminderMessage

X

X

X

sessionTimeout

X

X

X

flowGenerationId

X

publishedAt

X

unpublishedChanges

X

createdAt

X

updatedAt

X

Required Fields for Creation (POST)

Field
Type
Example value

name

String

Job Application Flow

reminderInterval

integer

15

reminderMessage

String

Don't forget to finish the chat, just a few questions left!

sessionTimeout

integer

360

Example POST body

{
    "data": {
        "type": "flows",
        "attributes": {
            "name": "Courier Rotterdam",
            "reminderInterval": 15,
            "reminderMessage": "Don't forget to finish the chat, just a few questions left!",
            "sessionTimeout": 360
        }
    }
}

Example PATCH body

{
    "data": {
        "type": "flows",
        "attributes": {
            "reminderInterval": 30
        }
    }
}

OpenAPI

Retrieve a single flow

get
Authorizations
Path parameters
idstringRequired
Responses
200

flow found

application/vnd.api+json
get
GET /public/v2/flows/{id} HTTP/1.1
Host: {defaulthost}
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "id": "04db2395-ba0d-4bfc-b01c-d538a48f3d61",
    "type": "flows",
    "attributes": {
      "createdAt": "2024-08-20T10:45:01+00:00",
      "updatedAt": "2024-08-20T10:45:01+00:00",
      "name": "deserunt",
      "reminderInterval": 15,
      "reminderMessage": "Are you still there? There are still a few questions left to finish your application.",
      "sessionTimeout": 1440,
      "publishedAt": null,
      "unpublishedChanges": true,
      "flowGenerationId": null
    },
    "relationships": {
      "flowGeneration": {
        "links": {
          "related": "/public/v2/flow-generations?filter[flowId]=04db2395-ba0d-4bfc-b01c-d538a48f3d61"
        }
      },
      "nodes": {
        "links": {
          "related": "/public/v2/nodes?filter[flowId]=04db2395-ba0d-4bfc-b01c-d538a48f3d61"
        }
      }
    }
  },
  "meta": {}
}

Destroy a Flow

delete
Authorizations
Path parameters
idstringRequired
Responses
204

flow destroyed

No content

delete
DELETE /public/v2/flows/{id} HTTP/1.1
Host: {defaulthost}
Authorization: YOUR_API_KEY
Accept: */*

No content

Patch a Flow

patch
Authorizations
Path parameters
idstringRequired
Body
Responses
200

flow updated

No content

patch
PATCH /public/v2/flows/{id} HTTP/1.1
Host: {defaulthost}
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 130

{
  "data": {
    "id": "text",
    "type": "text",
    "attributes": {
      "name": "text",
      "reminderInterval": 1,
      "reminderMessage": "text",
      "sessionTimeout": 1
    }
  }
}

No content

Retrieve all Flows

get
Authorizations
Responses
200

flows found

application/vnd.api+json
get
GET /public/v2/flows HTTP/1.1
Host: {defaulthost}
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": "0c9f9121-2f34-429b-940e-c50a58bf0872",
      "type": "flows",
      "attributes": {
        "createdAt": "2024-08-20T10:45:00+00:00",
        "updatedAt": "2024-08-20T10:45:00+00:00",
        "name": "hic",
        "reminderInterval": 15,
        "reminderMessage": "Are you still there? There are still a few questions left to finish your application.",
        "sessionTimeout": 1440,
        "publishedAt": null,
        "unpublishedChanges": true,
        "flowGenerationId": null
      },
      "relationships": {
        "flowGeneration": {
          "links": {
            "related": "/public/v2/flow-generations?filter[flowId]=0c9f9121-2f34-429b-940e-c50a58bf0872"
          }
        },
        "nodes": {
          "links": {
            "related": "/public/v2/nodes?filter[flowId]=0c9f9121-2f34-429b-940e-c50a58bf0872"
          }
        }
      }
    },
    {
      "id": "3e8ab19c-4999-41cc-986f-db633bda086f",
      "type": "flows",
      "attributes": {
        "createdAt": "2024-08-20T10:45:00+00:00",
        "updatedAt": "2024-08-20T10:45:00+00:00",
        "name": "iusto",
        "reminderInterval": 15,
        "reminderMessage": "Are you still there? There are still a few questions left to finish your application.",
        "sessionTimeout": 1440,
        "publishedAt": null,
        "unpublishedChanges": true,
        "flowGenerationId": null
      },
      "relationships": {
        "flowGeneration": {
          "links": {
            "related": "/public/v2/flow-generations?filter[flowId]=3e8ab19c-4999-41cc-986f-db633bda086f"
          }
        },
        "nodes": {
          "links": {
            "related": "/public/v2/nodes?filter[flowId]=3e8ab19c-4999-41cc-986f-db633bda086f"
          }
        }
      }
    },
    {
      "id": "aea053e1-a308-42db-8a61-4a53a3bd3195",
      "type": "flows",
      "attributes": {
        "createdAt": "2024-08-20T10:45:00+00:00",
        "updatedAt": "2024-08-20T10:45:00+00:00",
        "name": "saepe",
        "reminderInterval": 15,
        "reminderMessage": "Are you still there? There are still a few questions left to finish your application.",
        "sessionTimeout": 1440,
        "publishedAt": null,
        "unpublishedChanges": true,
        "flowGenerationId": null
      },
      "relationships": {
        "flowGeneration": {
          "links": {
            "related": "/public/v2/flow-generations?filter[flowId]=aea053e1-a308-42db-8a61-4a53a3bd3195"
          }
        },
        "nodes": {
          "links": {
            "related": "/public/v2/nodes?filter[flowId]=aea053e1-a308-42db-8a61-4a53a3bd3195"
          }
        }
      }
    }
  ],
  "meta": {
    "total": 3,
    "totalUnfiltered": 3,
    "currentSize": 25,
    "currentPage": 1,
    "maxPage": 1
  }
}

Create a Flow

post
Authorizations
Body
Responses
201

flow created

application/vnd.api+json
post
POST /public/v2/flows HTTP/1.1
Host: {defaulthost}
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 130

{
  "data": {
    "id": "text",
    "type": "text",
    "attributes": {
      "name": "text",
      "reminderInterval": 1,
      "reminderMessage": "text",
      "sessionTimeout": 1
    }
  }
}
{
  "data": {
    "id": "f6c0d339-98c6-49fe-8593-c8f51211c8da",
    "type": "flows",
    "attributes": {
      "createdAt": "2024-08-20T10:45:02+00:00",
      "updatedAt": "2024-08-20T10:45:02+00:00",
      "name": "hic",
      "reminderInterval": 15,
      "reminderMessage": "Are you still there? There are still a few questions left to finish your application.",
      "sessionTimeout": 1440,
      "publishedAt": null,
      "unpublishedChanges": true,
      "flowGenerationId": null
    },
    "relationships": {
      "flowGeneration": {
        "links": {
          "related": "/public/v2/flow-generations?filter[flowId]=f6c0d339-98c6-49fe-8593-c8f51211c8da"
        }
      },
      "nodes": {
        "links": {
          "related": "/public/v2/nodes?filter[flowId]=f6c0d339-98c6-49fe-8593-c8f51211c8da"
        }
      }
    }
  },
  "meta": {}
}

Last updated