Skip to main content
PUT
/
v2
/
workflowDefinitions
/
{workflowDefinitionId}
Create or update a workflow definition
curl --request PUT \
  --url https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId} \
  --header 'Content-Type: application/json' \
  --header 'X-Frankie-CustomerID: <x-frankie-customerid>' \
  --header 'X-Frankie-RequestID: <x-frankie-requestid>' \
  --header 'api_key: <api-key>' \
  --data @- <<EOF
{
  "id": "customer-verification-workflow",
  "name": "Customer Verification Workflow",
  "tasks": [
    {
      "id": "verify-identity",
      "name": "Verify Identity",
      "configuration": {
        "type": "HTTP"
      },
      "description": "Runs identity verification checks against the customer",
      "errorHandling": {
        "ignoreErrors": false,
        "fallbackState": {},
        "retryConfig": {
          "maxAttempts": 3,
          "delayMs": 1000,
          "backoffFactor": 2
        }
      }
    }
  ],
  "description": "Workflow to verify new customer identities",
  "owner": "SYSTEM",
  "isDraft": false,
  "isTemplate": false,
  "tags": [
    "customer-verification",
    "kyc"
  ],
  "initialState": {
    "name": "John Doe",
    "age": 30
  },
  "defaultErrorHandling": {
    "ignoreErrors": false,
    "fallbackState": {},
    "retryConfig": {
      "maxAttempts": 3,
      "delayMs": 1000,
      "backoffFactor": 2
    }
  },
  "variables": [
    {
      "name": "customerEmail",
      "type": "STRING",
      "description": "Customer's email address",
      "example": "customer@example.com",
      "default": ""
    }
  ],
  "versions": [
    1,
    2,
    3
  ],
  "version": 3,
  "versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
  "createdAt": "2023-01-01T12:00:00Z",
  "updatedAt": "2023-01-02T14:30:00Z",
  "createdBy": "John Doe",
  "updatedBy": "Jane Smith"
}
EOF
{
  "workflowDefinition": {
    "id": "customer-verification-workflow",
    "name": "Customer Verification Workflow",
    "description": "<string>",
    "owner": "SYSTEM",
    "isDraft": true,
    "version": 1,
    "versions": [
      1,
      2,
      3
    ],
    "versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
    "tags": [
      "<string>"
    ],
    "tasks": [
      {}
    ],
    "variables": [
      {}
    ],
    "createdAt": "2023-01-01T12:00:00Z",
    "updatedAt": "2023-01-02T14:30:00Z",
    "createdBy": "John Doe",
    "updatedBy": "Jane Smith"
  }
}

Authorizations

api_key
string
header
required

Headers

api_key
string
required

Your API key provided by FrankieOne

Example:

"245c765b124a098d09ef8765...."

X-Frankie-CustomerID
string
required

Your Customer ID provided by FrankieOne

Example:

"12345678-1234-1234-1234-123456789012"

X-Frankie-CustomerChildID
string

Your Customer Child ID provided by FrankieOne

Example:

"87654321-4321-4321-4321-210987654321"

X-Frankie-Channel
string

Open string that can be used to define the "channel" the request comes in from. It can potentially be used in routing and risk calculations upon request. Default values that can be used are: api portal smartui Any alphanumeric string is supported though. Anything over 64 characters will be truncated.

X-Frankie-Username
string

Username provided by API caller

Example:

"fred.flintstone@frankieone.com"

X-Frankie-RequestID
string
required

GUID identifier for request

Example:

"82988375-1F9C-40C7-8543-ECCA0D94CC7C"

Path Parameters

workflowDefinitionId
string
required

The unique identifier of the workflow definition to create or update

Example:

"customer-verification-workflow"

Body

application/json

Request body for creating or updating a workflow definition

id
string
required

Unique identifier for the workflow

Example:

"customer-verification-workflow"

name
string
required

Human-readable name for the workflow

Example:

"Customer Verification Workflow"

tasks
object[]
required

Array of workflow tasks

description
string

Optional detailed description of the workflow

Example:

"Workflow to verify new customer identities"

owner
string
default:SYSTEM

Owner of the workflow

Example:

"SYSTEM"

isDraft
boolean
default:false

true = save as draft (version -1), false = publish new version

isTemplate
boolean
default:false

Whether the workflow is a template

tags
string[]

Tags associated with the workflow

Example:
["customer-verification", "kyc"]
initialState
object

Initial state for the workflow execution

Example:
{ "name": "John Doe", "age": 30 }
defaultErrorHandling
object

Error handling configuration for workflow tasks

variables
object[]

Workflow-level variables that can be referenced in task configurations using template syntax, these would be validated into the initial state on workflow execution

versions
integer[]

List of available versions for this workflow definition

Example:
[1, 2, 3]
version
integer

The version number of this workflow definition

Example:

3

versionId
string<ulid>

Version Identifier to refer to

Example:

"01KCNG5VAH4ZQC5T1H4A2ZZHWA"

createdAt
string<date-time>

Timestamp when the workflow definition was first created

Example:

"2023-01-01T12:00:00Z"

updatedAt
string<date-time>

Timestamp when the workflow definition was last updated

Example:

"2023-01-02T14:30:00Z"

createdBy
string

User who created the workflow definition

Example:

"John Doe"

updatedBy
string

User who last updated the workflow definition

Example:

"Jane Smith"

Response

OK

workflowDefinition
object
required

The created or updated workflow definition