Skip to main content
POST
https://api.getmalakai.com/
workflows
/
create-or-update
curl --request POST \
  --url 'workflows/create-or-update' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  -F 'name="Sample"' \
  -F 'description="sample description"' \
  -F 'nodes=[]' \
  -F 'edges=[]' \
  -F 'ml_payload=[]' \
{
    "responseCode": 2000,
    "message": "Workflow created/updated successfully",
    "data": {
        "workflow": {
            "name": null,
            "description": null,
            "nodes": null,
            "edges": null,
            "ml_payload": null,
            "user_id": "**",
            "id": "c392dd0e-6d8c-43b6-aefd-***",
            "created_at": "2025-07-29T09:11:00.661Z",
            "updated_at": "2025-07-29T09:11:00.661Z"
        }
    }
}

Headers

Authorization
string
required
Your API key for authentication. Prefix with Bearer .
x-access-token
string
required
Your access token for authentication.

Body

name
string
required
The name for the new workflow.
description
string
required
The description for the new workflow.
nodes
object[]
An array of objects containing all of the nodes.
edges
object[]
An array of objects containing all of the edges.
ml_payload
object[]
An array of objects containing all of the nodes and edges in a specific format.
curl --request POST \
  --url 'workflows/create-or-update' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  -F 'name="Sample"' \
  -F 'description="sample description"' \
  -F 'nodes=[]' \
  -F 'edges=[]' \
  -F 'ml_payload=[]' \

Response

responseCode
string
Confirms the request was successful.
message
string
A human-readable message about the request’s outcome.
data
object
An object containing the details of the newly created workflow.
{
    "responseCode": 2000,
    "message": "Workflow created/updated successfully",
    "data": {
        "workflow": {
            "name": null,
            "description": null,
            "nodes": null,
            "edges": null,
            "ml_payload": null,
            "user_id": "**",
            "id": "c392dd0e-6d8c-43b6-aefd-***",
            "created_at": "2025-07-29T09:11:00.661Z",
            "updated_at": "2025-07-29T09:11:00.661Z"
        }
    }
}