Overview

API Base: https://app.enforcedflow.com/api/v1

Resources

New Human in Loop Task

Endpoint POST /actions

Authentication Authorization: {apiKey}

Request

{
  "action": "HumanLoopNewTask",
  "data": {
      "title": "Title for the action. (Eg: review this content)",
      "notes": "Notes for the reviewer",
      "content": "Content to be reviewed",
      "metadata": {"key":"some key", "value": "some value"}
  }
}

Response

The response will include a URL meant for the reviewer to visit

{
  "data": "https://app.enforcedflow.com/humanloop/review/72a821de-371e-49ef-ba54-45b3863c01d8"
}

Get Round Robin Next Item

Endpoint POST /actions

Authentication Authorization: {apiKey}

Request

{
  "action": "RoundRobin",
  "group": "sales",
  "options": {
     "sales_1": "[email protected]",
     "sales_2": "[email protected]"
  }
}

Response

The response will include a URL meant for the reviewer to visit

{
    "number": 1,
    "key": "sales_1",
    "value": "[email protected]"
}

Zapier Webhook Related

Endpoint POST /v1/webhooks/zapier-subscribe
On setting up a new trigger

{
    "action": "HumanLoopTaskReviewed",
    "url": "{zapier subscribe url}"
}

Endpoint DELETE /v1/webhooks/zapier-unsubscribe
When trigger is no longer used

{
    "url": "{zapier subscribe url}"
}