ai

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-ai"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/98a6220a-4faf-4bff-85cf-4938b3b52dbc/social-card.svg?v=3e7ae33eec8b" alt="ai" width="600" height="315"></a>
POSThttps://hermeticor.com/v1/ai/flow-edit

Propose a changed version of a flow from a plain-words instruction; validated, never saved (the editor saves it as a draft after the user accepts)

Request body

application/json
instructionstringrequired
definitionobjectrequired
Show child parameters
graphobjectrequired
Show child parameters
startstring
= null
nodesNodesItem[]required
edgesEdgesItem[]required
triggersTriggersItem[]required
settingsobjectrequired
Show child parameters
purposestring
marketing | prospecting | transactional | operational = marketing
modestring
journey | sequence = journey
filterCheckstring
entry | every_step | before_send = before_send
filterFailActionstring
exit | skip = exit
profileFilterobject
goalobject
quietHoursstring | object
= inherit
quietHoursActionstring
wait | skip | exit
sendWindowobject
smartSendingobject
enrollmentCapobject
activeWindowobject
failureAlertobject
timezoneSourcestring
profile | workspace = profile
timezonestring
= UTC
exitOnobject
sequenceobject
{
  "instruction": "string",
  "definition": {
    "graph": {
      "start": null,
      "nodes": [
        {
          "id": "string",
          "type": "send_email",
          "config": {
            "templateId": "string",
            "versionId": "string",
            "route": {
              "connectionId": "string",
              "poolId": "string",
              "routePolicyId": "string"
            },
            "topicId": "string",
            "replyToStep": "string",
            "onBlocked": "continue",
            "skipOnFailure": true,
            "skipIfMessagedWithinHours": 0,
            "filter": {
              "type": "group",
              "op": "and",
              "negate": true,
              "children": [
                {}
              ]
            },
            "retries": 0,
            "senderIdentityId": "string",
            "replyTo": "string",
            "oneClickUnsubscribe": true
          },
          "position": {
            "x": 0,
            "y": 0
          },
          "name": "string"
        }
      ],
      "edges": [
        {
          "id": "string",
          "source": "string",
          "sourceHandle": "string",
          "target": "string"
        }
      ]
    },
    "triggers": [
      {
        "type": "profile_created",
        "reentry": {
          "mode": "after_completion"
        }
      }
    ],
    "settings": {
      "purpose": "marketing",
      "mode": "journey",
      "filterCheck": "before_send",
      "filterFailAction": "exit",
      "profileFilter": {
        "type": "group",
        "op": "and",
        "negate": true,
        "children": [
          {}
        ]
      },
      "goal": {
        "kind": "event",
        "eventName": "string",
        "filter": {},
        "definition": {
          "type": "group",
          "op": "and",
          "negate": true,
          "children": [
            {}
          ]
        },
        "windowDays": 30,
        "onReach": "exit"
      },
      "quietHours": "inherit",
      "quietHoursAction": "wait",
      "sendWindow": {
        "startMin": 0,
        "endMin": 0,
        "weekdays": [
          0
        ]
      },
      "smartSending": {
        "skipIfMessagedWithinHours": 0,
        "frequencyCap": {
          "maxSends": 0,
          "windowHours": 0
        }
      },
      "enrollmentCap": {
        "maxTotal": 0,
        "maxConcurrent": 0
      },
      "activeWindow": {
        "from": "2024-01-01T00:00:00Z",
        "until": "2024-01-01T00:00:00Z"
      },
      "failureAlert": {
        "userIds": [],
        "emails": []
      },
      "timezoneSource": "profile",
      "timezone": "UTC",
      "exitOn": {
        "type": "group",
        "op": "and",
        "negate": true,
        "children": [
          {}
        ]
      },
      "sequence": {
        "steps": [],
        "schedule": {
          "weekdays": [
            1,
            2,
            3,
            4,
            5
          ],
          "startMin": 540,
          "endMin": 1020,
          "timezoneSource": "prospect",
          "timezone": "UTC"
        },
        "mailbox": {
          "sticky": true,
          "onUnavailable": "pause"
        },
        "dailyNewLimit": 0,
        "followUpPercent": 0,
        "plainTextOnly": true,
        "trackOpens": true,
        "unsubscribeText": "string",
        "spintaxMode": "random",
        "variables": {},
        "blocklist": {
          "emails": [
            "string"
          ],
          "domains": []
        },
        "reviewBeforeSend": true,
        "reviewEachMessage": true,
        "stop": {
          "onReply": "human",
          "onAutoReply": "continue",
          "onOoo": "pause_until_return",
          "onCompanyReply": "none"
        },
        "onCategory": [
          {
            "category": "positive",
            "sequenceId": "string",
            "stopCurrent": true
          }
        ],
        "ownerUserId": "string",
        "scheduleId": "string",
        "dedupe": {
          "crossSequence": "skip",
          "contactedWithinDays": 0,
          "domain": false
        },
        "startAt": "2024-01-01T00:00:00Z",
        "minGapMinutes": 0,
        "senderOverrides": {},
        "abm": {
          "maxPerAccount": 5,
          "onAccountReply": "stop"
        }
      }
    }
  }
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/ai/flow-edit" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"instruction":"string","definition":{"graph":{"start":null,"nodes":[{"id":"string","type":"send_email","config":{"templateId":"string","versionId":"string","route":{"connectionId":"string","poolId":"string","routePolicyId":"string"},"topicId":"string","replyToStep":"string","onBlocked":"continue","skipOnFailure":true,"skipIfMessagedWithinHours":0,"filter":{"type":"group","op":"and","negate":true,"children":[{}]},"retries":0,"senderIdentityId":"string","replyTo":"string","oneClickUnsubscribe":true},"position":{"x":0,"y":0},"name":"string"}],"edges":[{"id":"string","source":"string","sourceHandle":"string","target":"string"}]},"triggers":[{"type":"profile_created","reentry":{"mode":"after_completion"}}],"settings":{"purpose":"marketing","mode":"journey","filterCheck":"before_send","filterFailAction":"exit","profileFilter":{"type":"group","op":"and","negate":true,"children":[{}]},"goal":{"kind":"event","eventName":"string","filter":{},"definition":{"type":"group","op":"and","negate":true,"children":[{}]},"windowDays":30,"onReach":"exit"},"quietHours":"inherit","quietHoursAction":"wait","sendWindow":{"startMin":0,"endMin":0,"weekdays":[0]},"smartSending":{"skipIfMessagedWithinHours":0,"frequencyCap":{"maxSends":0,"windowHours":0}},"enrollmentCap":{"maxTotal":0,"maxConcurrent":0},"activeWindow":{"from":"2024-01-01T00:00:00Z","until":"2024-01-01T00:00:00Z"},"failureAlert":{"userIds":[],"emails":[]},"timezoneSource":"profile","timezone":"UTC","exitOn":{"type":"group","op":"and","negate":true,"children":[{}]},"sequence":{"steps":[],"schedule":{"weekdays":[1,2,3,4,5],"startMin":540,"endMin":1020,"timezoneSource":"prospect","timezone":"UTC"},"mailbox":{"sticky":true,"onUnavailable":"pause"},"dailyNewLimit":0,"followUpPercent":0,"plainTextOnly":true,"trackOpens":true,"unsubscribeText":"string","spintaxMode":"random","variables":{},"blocklist":{"emails":["string"],"domains":[]},"reviewBeforeSend":true,"reviewEachMessage":true,"stop":{"onReply":"human","onAutoReply":"continue","onOoo":"pause_until_return","onCompanyReply":"none"},"onCategory":[{"category":"positive","sequenceId":"string","stopCurrent":true}],"ownerUserId":"string","scheduleId":"string","dedupe":{"crossSequence":"skip","contactedWithinDays":0,"domain":false},"startAt":"2024-01-01T00:00:00Z","minGapMinutes":0,"senderOverrides":{},"abm":{"maxPerAccount":5,"onAccountReply":"stop"}}}}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "definition": {
    "graph": {
      "start": null,
      "nodes": [
        {
          "id": "string",
          "type": "send_email",
          "config": {
            "templateId": "string",
            "versionId": "string",
            "route": {
              "connectionId": "string",
              "poolId": "string",
              "routePolicyId": "string"
            },
            "topicId": "string",
            "replyToStep": "string",
            "onBlocked": "continue",
            "skipOnFailure": true,
            "skipIfMessagedWithinHours": 0,
            "filter": {
              "type": "group",
              "op": "and",
              "negate": true,
              "children": [
                {}
              ]
            },
            "retries": 0,
            "senderIdentityId": "string",
            "replyTo": "string",
            "oneClickUnsubscribe": true
          },
          "position": {
            "x": 0,
            "y": 0
          },
          "name": "string"
        }
      ],
      "edges": [
        {
          "id": "string",
          "source": "string",
          "sourceHandle": "string",
          "target": "string"
        }
      ]
    },
    "triggers": [
      {
        "type": "profile_created",
        "reentry": {
          "mode": "after_completion"
        }
      }
    ],
    "settings": {
      "purpose": "marketing",
      "mode": "journey",
      "filterCheck": "before_send",
      "filterFailAction": "exit",
      "profileFilter": {
        "type": "group",
        "op": "and",
        "negate": true,
        "children": [
          {}
        ]
      },
      "goal": {
        "kind": "event",
        "eventName": "string",
        "filter": {},
        "definition": {
          "type": "group",
          "op": "and",
          "negate": true,
          "children": [
            {}
          ]
        },
        "windowDays": 30,
        "onReach": "exit"
      },
      "quietHours": "inherit",
      "quietHoursAction": "wait",
      "sendWindow": {
        "startMin": 0,
        "endMin": 0,
        "weekdays": [
          0
        ]
      },
      "smartSending": {
        "skipIfMessagedWithinHours": 0,
        "frequencyCap": {
          "maxSends": 0,
          "windowHours": 0
        }
      },
      "enrollmentCap": {
        "maxTotal": 0,
        "maxConcurrent": 0
      },
      "activeWindow": {
        "from": "2024-01-01T00:00:00Z",
        "until": "2024-01-01T00:00:00Z"
      },
      "failureAlert": {
        "userIds": [],
        "emails": []
      },
      "timezoneSource": "profile",
      "timezone": "UTC",
      "exitOn": {
        "type": "group",
        "op": "and",
        "negate": true,
        "children": [
          {}
        ]
      },
      "sequence": {
        "steps": [],
        "schedule": {
          "weekdays": [
            1,
            2,
            3,
            4,
            5
          ],
          "startMin": 540,
          "endMin": 1020,
          "timezoneSource": "prospect",
          "timezone": "UTC"
        },
        "mailbox": {
          "sticky": true,
          "onUnavailable": "pause"
        },
        "dailyNewLimit": 0,
        "followUpPercent": 0,
        "plainTextOnly": true,
        "trackOpens": true,
        "unsubscribeText": "string",
        "spintaxMode": "random",
        "variables": {},
        "blocklist": {
          "emails": [],
          "domains": []
        },
        "reviewBeforeSend": true,
        "reviewEachMessage": true,
        "stop": {
          "onReply": "human",
          "onAutoReply": "continue",
          "onOoo": "pause_until_return",
          "onCompanyReply": "none"
        },
        "onCategory": [
          {
            "category": "positive",
            "sequenceId": "string",
            "stopCurrent": true
          }
        ],
        "ownerUserId": "string",
        "scheduleId": "string",
        "dedupe": {
          "crossSequence": "skip",
          "contactedWithinDays": 0,
          "domain": false
        },
        "startAt": "2024-01-01T00:00:00Z",
        "minGapMinutes": 0,
        "senderOverrides": {},
        "abm": {
          "maxPerAccount": 5,
          "onAccountReply": "stop"
        }
      }
    }
  },
  "validation": {
    "ok": true,
    "errors": [
      {
        "severity": "error",
        "code": "string",
        "message": "string",
        "nodeId": "string",
        "fix": "string"
      }
    ],
    "warnings": [
      {
        "severity": "error",
        "code": "string",
        "message": "string",
        "nodeId": "string",
        "fix": "string"
      }
    ]
  },
  "draft": true,
  "model": "string"
}
Schema
definitionobjectrequired
Show child parameters
graphobjectrequired
Show child parameters
startstringrequired
= null
nodesNodesItem2[]required
edgesEdgesItem2[]required
triggersTriggersItem2[]required
settingsobjectrequired
Show child parameters
purposestringrequired
marketing | prospecting | transactional | operational = marketing
modestringrequired
journey | sequence = journey
filterCheckstringrequired
entry | every_step | before_send = before_send
filterFailActionstringrequired
exit | skip = exit
profileFilterobject
goalobject
quietHoursstring | Windowrequired
= inherit
quietHoursActionstring
wait | skip | exit
sendWindowobject
smartSendingobject
enrollmentCapobject
activeWindowobject
failureAlertobject
timezoneSourcestringrequired
profile | workspace = profile
timezonestringrequired
= UTC
exitOnobject
sequenceobject
validationobjectrequired
Show child parameters
okbooleanrequired
errorsErrorsItem[]required
Show child parameters
severitystringrequired
error | warning
codestringrequired
messagestringrequired
nodeIdstring
fixstring
warningsErrorsItem[]required
Show child parameters
severitystringrequired
error | warning
codestringrequired
messagestringrequired
nodeIdstring
fixstring
draftbooleanrequired
true
modelstringrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · POST /v1/ai/flow-edit

POSThttps://hermeticor.com/v1/ai/subject-experiment

Generate subject-line variants and start them as an experiment on the campaign (variants returned for you to apply as campaign variants)

Request body

application/json
bodystringrequired
countinteger
= 3
tonestring
campaignIdstringrequired
metricobject
= {"primary":"clicks","guardrails":[]}
Show child parameters
primarystring
clicks | replies | conversions | revenue | opens = clicks
guardrailsGuardrailsItem[]
= []
Show child parameters
metricstringrequired
unsubscribe | complaint | bounce
thresholdnumberrequired
{
  "body": "string",
  "count": 3,
  "tone": "string",
  "campaignId": "string",
  "metric": {
    "primary": "clicks",
    "guardrails": []
  }
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/ai/subject-experiment" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"string","count":3,"tone":"string","campaignId":"string","metric":{"primary":"clicks","guardrails":[]}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
Example
{
  "experimentId": "string",
  "variants": [
    {
      "key": "string",
      "subject": "string"
    }
  ],
  "model": "string"
}
Schema
experimentIdstringrequired
variantsobject[]required
Show child parameters
keystringrequired
subjectstringrequired
modelstringrequired
4XX Default Response

Same as 4XX · POST /v1/ai/flow-edit

5XX Default Response

Same as 4XX · POST /v1/ai/flow-edit

GEThttps://hermeticor.com/v1/ai/flow-builds

History of AI journey builds, newest first

Parameters

limitintegerquery
= 50
cursorstringquery

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/ai/flow-builds" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "description": "string",
      "definition": {},
      "errors": 0,
      "warnings": 0,
      "model": "string",
      "createdBy": "string",
      "workflowId": "string",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem97[]required
Show child parameters
idstringrequired
descriptionstringrequired
definitionrequired
errorsintegerrequired
warningsintegerrequired
modelstringrequired
createdBystringrequired
workflowIdstringrequired
createdAtstringrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · POST /v1/ai/flow-edit

5XX Default Response

Same as 4XX · POST /v1/ai/flow-edit

GEThttps://hermeticor.com/v1/ai/flow-builds/{id}

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/ai/flow-builds/{id}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "description": "string",
  "definition": {},
  "errors": 0,
  "warnings": 0,
  "model": "string",
  "createdBy": "string",
  "workflowId": "string",
  "createdAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
descriptionstringrequired
definitionrequired
errorsintegerrequired
warningsintegerrequired
modelstringrequired
createdBystringrequired
workflowIdstringrequired
createdAtstringrequired
4XX Default Response

Same as 4XX · POST /v1/ai/flow-edit

5XX Default Response

Same as 4XX · POST /v1/ai/flow-edit

Updated