Workflows API
Define and run identity-orchestration workflows, end to end.
The Workflow service defines and runs identity-orchestration workflows. Model a flow as nodes, launch instances, and collect per-instance results — the automation layer that strings 1Kosmos services into a journey.
33 endpoints
across 12 resource groups.
ECDSA-signed
every request is signed with your key pair.
JSON over HTTPS
predictable REST, conventional status codes.
OpenAPI 3.0
Base URL
All Workflows endpoints are relative to your environment host. Examples on this page use the 1Kosmos pilot environment — swap in your production root when you go live.
Content type
Requests and responses use application/json.
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
Authentication
Workflows uses ECDSA key-pair authentication. Each request carries your credentials as
HTTP headers; verification-grade calls additionally sign the request body. Retrieve the system signing
key from /publickeys.
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/healthz", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/healthz",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json())Errors
Workflows uses conventional HTTP status codes: 2xx success, 4xx a problem
with the request, 5xx a service-side error.
| Status | Meaning | Description |
|---|---|---|
| 200 / 204 | OK | The request succeeded. |
| 400 | Bad Request | Validation failed. |
| 401 | Unauthorized | Missing or invalid credentials. |
| 403 | Forbidden | Authenticated, but not permitted. |
| 404 | Not Found | The resource does not exist. |
| 500 | Server Error | Something went wrong on our side. |
{
"statusCode": 400,
"error": "Bad Request",
"message": "Validation error"
}Workflow Instance
Launch and manage workflow runs.
Create workflow instance by access code (callback)
Creates and returns a workflow instance using an access code (callback endpoint).
- Requires ECDSA authentication headers
- Workflow must have
direct_access_enabledset to true - Optionally accepts a base64-encoded JSON string in the
metadata_b64query parameter to prefill metadata in the workflow instance - Returns instance URL and ID for accessing the workflow
| Name | Type | Description |
|---|---|---|
| accessCoderequired | string | Access code for the workflow |
| Name | Type | Description |
|---|---|---|
| metadata_b64 | string | Base64-encoded JSON metadata object (optional) |
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/callback_by_access_code/<accessCode>?metadata_b64=<metadata_b64>' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/callback_by_access_code/<accessCode>?metadata_b64=<metadata_b64>", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/callback_by_access_code/<accessCode>?metadata_b64=<metadata_b64>",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
}
)
print(res.json()){
"data": {
"instanceUrl": "https://example.com/workflow/wf_instance/wfi-123456",
"wfInstanceId": "wfi-123456"
}
}// no response body
// no response body
// no response body
// no response body
Create workflow instance by access code
Creates and returns a workflow instance using an access code.
- Requires ECDSA authentication headers
- Workflow must have
direct_access_enabledset to true - Optionally accepts a base64-encoded JSON string in the
metadata_b64query parameter to prefill metadata in the workflow instance - Returns instance URL and ID for accessing the workflow
Headers
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string), and "ts" (number)
publickey (required)
Public key
Query Parameters
metadata_b64 (optional)
Base64-encoded JSON object containing workflow metadata (not an array). Example decoded JSON:
{
"firstName": "John",
"lastName": "Doe",
"dob": "1990-01-01"
}
Returns
Returns the created workflow instance URL and ID.
This API throws an error if workflow is not found or direct access is disabled.
| Name | Type | Description |
|---|---|---|
| accessCoderequired | string | Access code for the workflow |
| Name | Type | Description |
|---|---|---|
| metadata_b64 | string | Base64-encoded JSON metadata object (optional) |
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| x-ext-id | string | ECDSA-encrypted extension UUID. When present, the server checks extension activation status and conditionally returns a session token. |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/create_by_access_code/<accessCode>?metadata_b64=<metadata_b64>' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'x-ext-id: <value>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/create_by_access_code/<accessCode>?metadata_b64=<metadata_b64>", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"x-ext-id": "<value>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/create_by_access_code/<accessCode>?metadata_b64=<metadata_b64>",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"x-ext-id": "<value>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
}
)
print(res.json()){
"data": {
"instanceUrl": "https://adminconsole.example.com/workflow/wf_instance/wfi-123456",
"wfInstanceId": "wfi-123456",
"token": "eyJhbGciOiJIUzI1NiIs..."
}
}// no response body
// no response body
// no response body
// no response body
// no response body
Fetch reCAPTCHA configuration
Returns the reCAPTCHA configuration for the current tenant and community.
- Requires Bearer JWT authentication.
- Only authorized Community Admins can access this endpoint.
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA containing "appid", "uuid", and "ts" (number) |
| publickeyrequired | string | Public Key |
| authorization | string | Bearer JWT token (required if using JWT auth) |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/recaptcha_config' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/recaptcha_config", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/recaptcha_config",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"data": {
"recaptcha_url": "xxxxxxx",
"secret_key_ui": "xxxxxxx"
},
"publicKey": "xxxxxxx"
}// no response body
// no response body
// no response body
Get workflow instance result summary
Returns the summary of a workflow instance if completed, or progress info if in progress.
- Only a system, service or service_ext key can be used.
- Key must be authorized for community.
| Name | Type | Description |
|---|---|---|
| instanceIdrequired | string | Workflow Instance ID |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<instanceId>/result_summary' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<instanceId>/result_summary", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<instanceId>/result_summary",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": {
"wfInstanceId": "string",
"metaData": {
"firstName": "string",
"lastName": "string",
"dob": "string"
},
"workflowId": "string",
"tenantId": "string",
"communityId": "string",
"status": "string",
"expiresAt": "string",
"createdAt": "string",
"updatedAt": "string",
"startAt": "string",
"summary": {
"person_info": {
"firstName": "string",
"lastName": "string",
"dob": "string"
},
"docsScanned": [
"string"
]
}
}
}// no response body
// no response body
Get all workflow instance node results
Returns an array of node results (nodeId, nodeType, resultData) for a given workflow instance.
- System nodes are excluded from the response.
- Only a system, service, service_ext or app key can be used.
- Key must be authorized for community.
| Name | Type | Description |
|---|---|---|
| instanceIdrequired | string | Workflow Instance ID |
| Name | Type | Description |
|---|---|---|
| authorization | string | JWT Access Token / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<instanceId>/results' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<instanceId>/results", {
method: "GET",
headers: {
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<instanceId>/results",
headers={
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"data": [
{
"nodeId": "form_1",
"nodeType": "form",
"resultData": {
"email": "kakar_manik@yahoo.com"
}
}
]
}// no response body
// no response body
// no response body
Get workflow instance details with node list
Returns workflow instance details including workflow information and paginated list of nodes with their execution status.
- Requires JWT token with
workflow.instance.vieworworkflow.managepermission OR - License with authLevel:
system,service, orservice_ext - Supports pagination for node list
| Name | Type | Description |
|---|---|---|
| wfInstanceIdrequired | string | Workflow Instance ID |
| tenantIdrequired | string | Tenant ID |
| communityIdrequired | string | Community ID |
| Name | Type | Description |
|---|---|---|
| pIndex | integer | Page index for pagination (optional, default 0, min 0) |
| pSize | integer | Number of nodes per page (optional, default 10, min 1, max 100) |
| Name | Type | Description |
|---|---|---|
| licensekey | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorization | string | JWT Access Token / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946/tenant/tenant-123/community/community-456?pIndex=0&pSize=10' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946/tenant/tenant-123/community/community-456?pIndex=0&pSize=10", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946/tenant/tenant-123/community/community-456?pIndex=0&pSize=10",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": {
"workflowId": "wf-123456",
"workflowName": "Identity Verification Workflow",
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"createdAt": "2024-01-15T10:30:00.000Z",
"expiresAt": "2024-01-16T10:30:00.000Z",
"list": [
{
"nodeId": "form_001",
"nodeType": "form",
"status": "COMPLETED",
"createdAt": "2024-01-15T10:35:00.000Z",
"updatedAt": "2024-01-15T10:40:00.000Z"
}
],
"page": {
"index": 0,
"size": 10,
"total": 25
}
}
}// no response body
// no response body
// no response body
// no response body
// no response body
Initiate workflow instance
Initiate a workflow instance.
Headers
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
wfInstanceId (required)
Workflow instance ID to initiate
deviceFingerprint (optional)
Device fingerprint for initiation
Returns
Returns the initiated workflow instance and errors if any.
This API throws an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to initiate workflow instance.
{
"wfInstanceId": "xxxxxxxxxxxxx",
"deviceFingerprint": "abc123"
}| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/initiate' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Content-Type: application/json' \
-d '{"data": {"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946", "deviceFingerprint": "32b7615d1f8708e1e25d43640259f"}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/initiate", {
method: "POST",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"deviceFingerprint": "32b7615d1f8708e1e25d43640259f"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/initiate",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
},
json={
"data": {
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"deviceFingerprint": "32b7615d1f8708e1e25d43640259f"
}
},
)
print(res.json()){
"data": {
"wfInstanceId": "xxxxxxxxxxxxx",
"nodes": [
"abc123"
],
"nextNodeId": "form_002",
"nextNodeType": "form"
}
}// no response body
// no response body
// no response body
// no response body
Send workflow instance notification (SMS or Email)
Sends a notification (SMS or Email) for a workflow instance to the specified recipient.
- Requires Bearer JWT authentication.
- Only authorized users with workflow creation/management permissions can access this endpoint.
- If
typeissms, bothsmsToandsmsISDCodeare required. - If
typeisemail,emailTois required instanceUrlis always required.- Either
captchaTokenorlicensemust be provided (but not both).
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA containing "appid", "uuid", and "ts" (number) |
| publickeyrequired | string | Public Key |
| authorization | string | Bearer JWT token (required if using JWT auth) |
Request body for sending notification for a workflow instance. Example (sms):
{
"data": {
"type": "sms",
"smsTo": "XXXXXXXXXX",
"smsISDCode": "+XX",
"instanceUrl": "https://domain.com/workflow/wf_instance/xxxxx",
"license": "xxxxxxxxxxx"
}
}
Example (email):
{
"data": {
"type": "email",
"emailTo": "example@example.com",
"instanceUrl": "https://domain.com/workflow/wf_instance/xxxxx",
"captchaToken": "xxxxxxx"
}
}
- If
typeissms,smsToandsmsISDCodeare required. - If
typeisemail,emailTois required instanceUrlis always required.- Either
captchaTokenorlicense(system or service level) must be provided (but not both).
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/send/notification' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"data": {"type": "sms", "smsTo": "XXXXXXXXXX", "smsISDCode": "+91", "emailTo": "example@example.com", "instanceUrl": "https://domain.com/workflow/wf_instance/xxxxx", "captchaToken": "string", "license": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/send/notification", {
method: "POST",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"type": "sms",
"smsTo": "XXXXXXXXXX",
"smsISDCode": "+91",
"emailTo": "example@example.com",
"instanceUrl": "https://domain.com/workflow/wf_instance/xxxxx",
"captchaToken": "string",
"license": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/send/notification",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN"
},
json={
"data": {
"type": "sms",
"smsTo": "XXXXXXXXXX",
"smsISDCode": "+91",
"emailTo": "example@example.com",
"instanceUrl": "https://domain.com/workflow/wf_instance/xxxxx",
"captchaToken": "string",
"license": "string"
}
},
)
print(res.json()){
"data": {
"status": "sent",
"messageId": "msg-7890"
}
}// no response body
// no response body
// no response body
// no response body
Create workflow instance
Create a workflow instance.
- Only a system, service or service_ext key can be used to create workflow instance.
- Key must be authorized for community.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
workflowId (required)
Workflow ID
metaData (optional)
Metadata for the workflow instance
Returns
Returns the created workflow instance and errors if any.
This API throws an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Tenant ID |
| communityIdrequired | string | Community ID |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorizationrequired | string | JWT Access Token / Try Authorize 🔒 |
Request body contains below fields to create workflow instance.
{
"workflowId": "xxxxxxxxxxxxx",
"metaData": { "firstName": "", "lastName": "", "dob": "" } (optional),
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/tenant/tenant-123/community/community-456/create' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"workflowId": "xxxxxxxxxxxx", "metaData": {"firstName": "John", "lastName": "Doe", "dob": "19900101"}}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/tenant/tenant-123/community/community-456/create", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"workflowId": "xxxxxxxxxxxx",
"metaData": {
"firstName": "John",
"lastName": "Doe",
"dob": "19900101"
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/tenant/tenant-123/community/community-456/create",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"workflowId": "xxxxxxxxxxxx",
"metaData": {
"firstName": "John",
"lastName": "Doe",
"dob": "19900101"
}
}
},
)
print(res.json()){
"data": {
"wfInstanceId": "xxxxxxxxxxxx",
"wfInstanceUrl": "https://example.com/workflow/xxxxxxxxxxxx"
}
}// no response body
// no response body
// no response body
// no response body
List workflow instances
Returns a paginated list of workflow instances for a given tenant and community.
- Requires either a valid JWT token with
workflow.instance.vieworworkflow.managepermission or a valid community license. - Supported auth levels: system, service, service_ext
- Pagination parameters pSize and pIndex are required
- Supports optional filters: status, wfInstanceId
Headers
licensekey or JWT Token (required)
License key encrypted with ECDSA or Bearer JWT token
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds
publickey (required)
Public key
authorization (optional)
JWT Access Token (if using JWT authentication)
Request Body
pSize (required)
Page size (min: 1, max: 100)
pIndex (required)
Page index (0-based)
query (optional)
Object containing optional filter parameters
query.status (optional)
Array of workflow instance statuses to filter by (PENDING, STARTED, EXPIRED, COMPLETED, FAILED, SUCCESS, INPROGRESS, NOT_PERFORMED)
query.wfInstanceId (optional)
Filter by workflow instance ID (supports partial search, case-insensitive)
query.workflowId (optional)
Filter by workflow ID (exact match)
query.from (optional)
Filter instances updated from this ISO 8601 date-time (e.g., 2026-02-10T00:00:00.000Z). Must be within last 90 days from now. Required if 'to' is provided.
query.to (optional)
Filter instances updated until this ISO 8601 date-time (e.g., 2026-02-10T23:59:59.999Z). Must be greater than or equal to 'from'. Required if 'from' is provided.
query.customFilters (optional)
Array of custom filter objects (max 5 filters allowed). Each filter has 'key' and 'value' properties.
Returns
Returns a paginated list of workflow instances with wfInstanceId, workflowId, status, and updatedAt fields.
Also includes page details (total, index, size).
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Tenant ID |
| communityIdrequired | string | Community ID |
| Name | Type | Description |
|---|---|---|
| licensekey | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorization | string | JWT Access Token / Try Authorize 🔒 |
Request body contains pagination and filter parameters.
{
"data": {
"pSize": 10,
"pIndex": 0,
"query": {
"status": ["COMPLETED", "STARTED"],
"wfInstanceId": "wfi-5c79",
"workflowId": "wf-123456",
"from": "2026-01-01T00:00:00.000Z",
"to": "2026-01-31T23:59:59.999Z",
"customFilters": [
{
"key": "firstName",
"value": "John"
},
{
"key": "lastName",
"value": "Doe"
}
]
}
}
}
pSize and pIndex are required. The query object is optional. wfInstanceId supports partial search (case-insensitive). from and to are ISO 8601 date-time strings (same format as createdAt/updatedAt) for filtering by updatedAt. Both from and to must be provided together. from must be within last 90 days. to must be >= from. customFilters is an array of key-value pairs (max 5 filters allowed).
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/tenant/tenant-123/community/community-456/list' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"pSize": 10, "pIndex": 0, "query": {"status": ["COMPLETED", "STARTED"], "wfInstanceId": "wfi-5c79fc5c", "workflowId": "wf-123456", "from": "2026-01-01T00:00:00.000Z", "to": "2026-01-31T23:59:59.999Z", "customFilters": [{"key": "firstName", "value": "John"}]}}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/tenant/tenant-123/community/community-456/list", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"pSize": 10,
"pIndex": 0,
"query": {
"status": [
"COMPLETED",
"STARTED"
],
"wfInstanceId": "wfi-5c79fc5c",
"workflowId": "wf-123456",
"from": "2026-01-01T00:00:00.000Z",
"to": "2026-01-31T23:59:59.999Z",
"customFilters": [
{
"key": "firstName",
"value": "John"
}
]
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/tenant/tenant-123/community/community-456/list",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"pSize": 10,
"pIndex": 0,
"query": {
"status": [
"COMPLETED",
"STARTED"
],
"wfInstanceId": "wfi-5c79fc5c",
"workflowId": "wf-123456",
"from": "2026-01-01T00:00:00.000Z",
"to": "2026-01-31T23:59:59.999Z",
"customFilters": [
{
"key": "firstName",
"value": "John"
}
]
}
}
},
)
print(res.json()){
"data": {
"list": [
{
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"workflowId": "wf-123456",
"status": "COMPLETED",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
],
"page": {
"total": 150,
"index": 0,
"size": 10
}
}
}// no response body
// no response body
// no response body
// no response body
Workflow
Define workflows.
List of v2 DVC IDs for workflows
Returns a list of v2 DVC IDs used in workflows for the specified tenant and community.
- Only a system, service, or service_ext key can access this endpoint.
- Key must be authorized for the tenant and community.
- You must provide either a valid licensekey or a JWT access token.
- All requests must include requestid and publickey headers as described below.
| Header | Required | Description |
|---|---|---|
| licensekey | Yes* | License key encrypted with ECDSA |
| authorization | Yes* | JWT Access Token (Bearer) |
| requestid | Yes | JSON string encrypted with ECDSA (appid, uuid, ts) |
| publickey | Yes | Public key |
*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| Name | Type | Description |
|---|---|---|
| pSize | integer | Page size for pagination (optional, default 10, min 1, max 100) |
| pIndex | integer | Page index for pagination (optional, default 0) |
| Name | Type | Description |
|---|---|---|
| licensekey | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| authorization | string | JWT Access Token (Bearer) / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/dvcid/list?pSize=10&pIndex=0' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/dvcid/list?pSize=10&pIndex=0", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/dvcid/list?pSize=10&pIndex=0",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"data": {
"list": [
{
"journeyType": "string",
"name": "string",
"tag": "string"
}
]
}
}// no response body
// no response body
// no response body
// no response body
// no response body
Search workflows by name
Search for workflows by name within a specific tenant and community.
- Only a system, service, or service_ext key can access this endpoint.
- Key must be authorized for the tenant and community.
- You must provide either a valid licensekey or a JWT access token.
- All requests must include requestid and publickey headers as described below.
- Supports pagination via pIndex (page index, 0-based) and pSize (page size, default 10, max 100).
Search Behavior:
- If name length < 3 characters: Exact match (case-insensitive)
- If name length >= 3 characters: Partial match (case-insensitive)
| Header | Required | Description |
|---|---|---|
| licensekey | Yes* | License key encrypted with ECDSA |
| authorization | Yes* | JWT Access Token (Bearer) |
| requestid | Yes | JSON string encrypted with ECDSA (appid, uuid, ts) |
| publickey | Yes | Public key |
*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| Name | Type | Description |
|---|---|---|
| namerequired | string | Workflow name to search for (required) |
| pIndex | integer | Page index for pagination (optional, default 0) |
| pSize | integer | Page size for pagination (optional, default 10, min 1, max 100) |
| Name | Type | Description |
|---|---|---|
| licensekey | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| authorization | string | JWT Access Token (Bearer) / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/search?name=My Workflow&pIndex=0&pSize=10' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/search?name=My Workflow&pIndex=0&pSize=10", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/search?name=My Workflow&pIndex=0&pSize=10",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"data": {
"list": [
{
"workflowId": "wf-123e4567-e89b-12d3-a456-426614174000",
"name": "My Workflow"
}
],
"page": {
"index": 0,
"size": 10,
"total": 25
}
}
}// no response body
// no response body
// no response body
// no response body
// no response body
Get workflow by ID
Fetch workflow configuration by workflowId for a given tenant and community.
- Requires ECDSA authenticated headers.
- Key must be authorized for tenant and community.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number)
publickey (required)
Public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| workflowIdrequired | string | workflowId of the workflow |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | Encrypted JSON string with appid, uuid, and timestamp / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorizationrequired | string | JWT Access Token / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/workflowId' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/workflowId", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/workflowId",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"data": {
"workflowId": "string",
"name": "string",
"version": "string",
"tenantId": "string",
"communityId": "string",
"poiOn": true,
"isPublished": true,
"nodes": [
{}
]
}
}// no response body
// no response body
// no response body
// no response body
// no response body
Manage direct access settings for workflow
Enables a direct access code to be created for the workflow. This allows a workflow instance to be created automatically when the access code is invoked. Access code is long lived and does not require to be recreated. Normally, when direct access is not enabled, the endpoint to create workflow instance must be called explicitly to create a new instance.
- Only a system, service, or service_ext key can manage direct access.
- Key must be authorized for the tenant and community.
- Either regenerate or enable must be provided in the request body.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| idrequired | string | Workflow ID |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | Encrypted JSON string with appid, uuid, and timestamp / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body for managing direct access settings. This API expects the payload under a top-level data object.
| Field | Type | Description |
|---|---|---|
| datarequired | object | Direct access configuration payload |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/wf-123/manage_direct_access' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"regenerate": true, "enable": true}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/wf-123/manage_direct_access", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"regenerate": true,
"enable": true
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/wf-123/manage_direct_access",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"regenerate": true,
"enable": true
}
},
)
print(res.json()){
"data": {
"accessCode": "Ab1_c2",
"directAccessEnabled": true
}
}// no response body
// no response body
// no response body
// no response body
// no response body
List workflows for a community
Fetch paginated list of workflows for a tenant's community.
- Only a <b>system</b>, <b>service</b>, or <b>service_ext</b> key can fetch workflows.
- Key must be authorized for the tenant and community.
- Results are sorted by <b>updatedAt</b> (last modified) in descending order.
- Supports pagination via <b>pIndex</b> (page index, 0-based) and <b>pSize</b> (page size, default 10, max 100).
- The <b>query</b> object can be used to filter workflows by any field (e.g. name, type, etc).
| Header | Required | Description |
|---|---|---|
| licensekey | Yes* | License key encrypted with ECDSA |
| authorization | Yes* | JWT Access Token (Bearer) |
| requestid | Yes | JSON string encrypted with ECDSA (appid, uuid, ts) |
| publickey | Yes | Public key |
*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | Encrypted JSON string with appid, uuid, and timestamp / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorizationrequired | string | JWT Access Token / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflows' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"data": {"query": {}, "pIndex": 0, "pSize": 10}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflows", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"query": {},
"pIndex": 0,
"pSize": 10
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflows",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
},
json={
"data": {
"query": {},
"pIndex": 0,
"pSize": 10
}
},
)
print(res.json()){
"data": {
"data": [
{
"workflowId": "wf-123",
"name": "Sample Workflow",
"updatedAt": "2026-01-15T12:34:56.789Z",
"createdAt": "2025-12-01T09:00:00.000Z"
}
],
"page": {
"index": 0,
"size": 10,
"total": 125
}
}
}// no response body
// no response body
// no response body
// no response body
// no response body
Create workflow
Create a workflow configuration.
- Only a system, service, or service_ext key can be used to create workflow.
- Key must be authorized for the given tenant and community.
Headers
licensekey or JWT Token (required)
License key encrypted with ECDSA or Bearer JWT token
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize 🔒 |
| authorizationrequired | string | JWT Access Token / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body for creating a workflow.
{
"version": "v1",
"name": "Sample Workflow",
"type": "IAL2",
"dvcId": "device-789",
"poiOn": true,
"isPublished": false,
"styleSheet": "json-string",
"nodes": [
{ "id": "node-1", "name": "Start Node" },
{ "id": "node-2", "name": "Approval Node" }
],
"canvasData": { },
"header": { type: 'html', html: '' },
"footer": { type: 'html', html: '' }
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X PUT 'https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"data": {"version": "v1", "name": "Sample Workflow", "styleSheet": "json-string", "type": "IAL2", "dvcId": "device-789", "poiOn": true, "isPublished": false, "nodes": [{"id": "node-1", "name": "Start Node"}], "canvasData": {}, "header": {"type": "html", "html": ""}, "footer": {"type": "html", "html": ""}}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"authorization": "Bearer YOUR_TOKEN",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"version": "v1",
"name": "Sample Workflow",
"styleSheet": "json-string",
"type": "IAL2",
"dvcId": "device-789",
"poiOn": true,
"isPublished": false,
"nodes": [
{
"id": "node-1",
"name": "Start Node"
}
],
"canvasData": {},
"header": {
"type": "html",
"html": ""
},
"footer": {
"type": "html",
"html": ""
}
}
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"authorization": "Bearer YOUR_TOKEN",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
},
json={
"data": {
"version": "v1",
"name": "Sample Workflow",
"styleSheet": "json-string",
"type": "IAL2",
"dvcId": "device-789",
"poiOn": true,
"isPublished": false,
"nodes": [
{
"id": "node-1",
"name": "Start Node"
}
],
"canvasData": {},
"header": {
"type": "html",
"html": ""
},
"footer": {
"type": "html",
"html": ""
}
}
},
)
print(res.json()){
"data": {
"workflowId": "xxxxxxxxxxxxx"
}
}// no response body
// no response body
// no response body
// no response body
Update workflow configuration
Update an existing workflow configuration.
- Only a system, service, or service_ext key can update workflow.
- Key must be authorized for the given tenant and community.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| idrequired | string | Workflow ID |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorizationrequired | string | JWT Access Token / Try Authorize 🔒 |
Request body for updating a workflow. The payload must be an object with a top-level data object containing the workflow configuration.
| Field | Type | Description |
|---|---|---|
| datarequired | object | Workflow configuration payload |
curl -X PATCH 'https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/wf-123' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"data": {"version": "v1", "name": "Sample Workflow", "type": "IAL2", "dvcId": "device-789", "poiOn": true, "isPublished": false, "styleSheet": "{}", "nodes": [{"id": "node-1", "name": "Start Node"}], "canvasData": {}, "header": {"type": "html", "html": ""}, "footer": {"type": "html", "html": ""}}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/wf-123", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"version": "v1",
"name": "Sample Workflow",
"type": "IAL2",
"dvcId": "device-789",
"poiOn": true,
"isPublished": false,
"styleSheet": "{}",
"nodes": [
{
"id": "node-1",
"name": "Start Node"
}
],
"canvasData": {},
"header": {
"type": "html",
"html": ""
},
"footer": {
"type": "html",
"html": ""
}
}
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/workflowapi/tenant/tenantId/community/communityId/workflow/wf-123",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
},
json={
"data": {
"version": "v1",
"name": "Sample Workflow",
"type": "IAL2",
"dvcId": "device-789",
"poiOn": true,
"isPublished": false,
"styleSheet": "{}",
"nodes": [
{
"id": "node-1",
"name": "Start Node"
}
],
"canvasData": {},
"header": {
"type": "html",
"html": ""
},
"footer": {
"type": "html",
"html": ""
}
}
},
)
print(res.json()){
"data": {}
}// no response body
// no response body
// no response body
// no response body
// no response body
Delete workflow by ID
Delete a workflow configuration.
- Only a system, service, or service_ext key can delete a workflow.
- Key must be authorized for the tenant and community.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | Tenant ID |
| communityIdrequired | string | Community ID |
| workflowIdrequired | string | Workflow ID |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | Encrypted JSON string with appid, uuid and ts / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorizationrequired | string | JWT Access Token / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/workflowapi/tenant/<tenantId>/community/<communityId>/workflow/<workflowId>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/tenant/<tenantId>/community/<communityId>/workflow/<workflowId>", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/workflowapi/tenant/<tenantId>/community/<communityId>/workflow/<workflowId>",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
// no response body
// no response body
// no response body
// no response body
// no response body
Workflow Instance Result
Fetch workflow results.
Execute a single orphan node
Executes a single orphan JavaScript node directly from the UI without full workflow traversal.
Authentication: None required (no ECDSA, no API key).
Behavior:
- Executes only the specified nodeId
- Node must be an orphan node (no active handlers / connections such as on_success, on_fail, on_error, on_next, on_check_resolution_fail)
- No entry/exit traversal is performed
Validations:
- nodeId must be present and found in the workflow
- tenantId / communityId must be valid and mapped to the given wfInstanceId
- Node must be an orphan (no active handlers enabled or connected)
| Name | Type | Description |
|---|---|---|
| wfInstanceIdrequired | string | Workflow Instance ID |
| tenantIdrequired | string | Tenant ID |
| communityIdrequired | string | Community ID |
| nodeIdrequired | string | ID of the orphan node to execute |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<wfInstanceId>/tenant/<tenantId>/community/<communityId>/execute_node/<nodeId>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<wfInstanceId>/tenant/<tenantId>/community/<communityId>/execute_node/<nodeId>", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<wfInstanceId>/tenant/<tenantId>/community/<communityId>/execute_node/<nodeId>",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"success": true,
"nodeId": "js_node_001",
"result": {},
"error": "Node execution returned no result"
}{
"success": false,
"error": "Node is not an orphan. It has active handlers or connections."
}{
"success": false,
"error": "Workflow instance not found."
}{
"success": false,
"error": "Error while executing orphan node.",
"details": {
"message": "Error executing JS step: unexpected token"
}
}Get workflow instance result by node
Fetches the workflow instance result for a specific node.
- Requires either a valid JWT with workflow.create, workflow.manage or workflow.instance.view permission, or system/service/service_ext license
- Returns whatever data is present in the database for the specified node
- System nodes (nodeType: 'system') are not allowed to be exposed and will return a 403 Forbidden error
| Name | Type | Description |
|---|---|---|
| wfInstanceIdrequired | string | Workflow Instance ID |
| tenantIdrequired | string | Tenant ID |
| communityIdrequired | string | Community ID |
| nodeIdrequired | string | Node ID |
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorization | string | Bearer JWT token (optional if using license) / Try Authorize 🔒 |
| licensekey | string | License key encrypted with ECDSA (optional if using JWT) / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<wfInstanceId>/tenant/<tenantId>/community/<communityId>/node/<nodeId>' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<wfInstanceId>/tenant/<tenantId>/community/<communityId>/node/<nodeId>", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/<wfInstanceId>/tenant/<tenantId>/community/<communityId>/node/<nodeId>",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": {
"wfInstanceId": "string",
"nodeId": "string",
"nodeType": "string",
"workflowId": "string",
"tenantId": "string",
"communityId": "string",
"status": "string",
"resultData": {},
"createdAt": "string",
"updatedAt": "string"
}
}// no response body
// no response body
// no response body
// no response body
Poll workflow instance result
Poll the result of a specific node from a workflow instance.
Headers
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string), and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
wfInstanceId (required)
Workflow Instance ID for which result is being fetched
nodeId (required)
Node ID whose result is being fetched
data (optional)
Additional input data (e.g. device info or empty object)
Returns
Returns the workflow node result if available.
This API throws an error if something goes wrong or if the node result is not yet available.
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body to fetch workflow instance result.
{
"data": {
"wfInstanceId": "5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nodeId": "form_001"
}
}| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/poll' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Content-Type: application/json' \
-d '{"data": {"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946", "nodeId": "form_001"}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/poll", {
method: "POST",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nodeId": "form_001"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/poll",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
},
json={
"data": {
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nodeId": "form_001"
}
},
)
print(res.json()){
"data": {
"wfInstanceId": "5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nextNodeId": "form_001",
"nextNodeType": "form",
"summary": [
"Biometric",
"Passport",
"Driver's license"
]
}
}// no response body
// no response body
// no response body
// no response body
// no response body
// no response body
Poll liveid workflow instance result
Poll the result of a liveid_capture node from a workflow instance.
Headers
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string), and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
wfInstanceId (required)
Workflow Instance ID for which result is being fetched
nodeId (required)
Node ID whose result is being fetched
Returns
Returns the workflow node result if available.
This API throws an error if something goes wrong or if the node result is not yet available.
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body to fetch workflow instance result.
{
"data": {
"wfInstanceId": "5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nodeId": "form_001"
}
}| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/poll_liveid' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Content-Type: application/json' \
-d '{"data": {"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946", "nodeId": "form_001"}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/poll_liveid", {
method: "POST",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nodeId": "form_001"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/poll_liveid",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
},
json={
"data": {
"wfInstanceId": "wfi-5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nodeId": "form_001"
}
},
)
print(res.json()){
"data": {
"wfInstanceId": "5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nextNodeId": "form_001",
"nextNodeType": "form",
"summary": [
"Biometric",
"Passport",
"Driver's license"
]
}
}// no response body
// no response body
// no response body
// no response body
// no response body
// no response body
Create workflow instance result
Create a workflow instance result.
Headers
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
wfInstanceId (required)
Workflow instance ID
nodeId (required)
Node ID for which result is being created
result (optional)
Result data
Returns
Returns the created workflow instance result and errors if any.
This API throws an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to create workflow instance result.
{
"wfInstanceId": "xxxxxxxxxxxxx",
"nodeId": "node-1",
"nodeType": "form",
"requestData": { "field1": "value1", "selfie": "base64EncodedImage" }
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/workflow_instance/submit_result' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Content-Type: application/json' \
-d '{"data": {"wfInstanceId": "xxxxxxxxxxxxx", "nodeId": "node-1", "nodeType": "form", "requestData": {"field1": "value1", "field2": "value2"}}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/workflow_instance/submit_result", {
method: "POST",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"wfInstanceId": "xxxxxxxxxxxxx",
"nodeId": "node-1",
"nodeType": "form",
"requestData": {
"field1": "value1",
"field2": "value2"
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/workflow_instance/submit_result",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
},
json={
"data": {
"wfInstanceId": "xxxxxxxxxxxxx",
"nodeId": "node-1",
"nodeType": "form",
"requestData": {
"field1": "value1",
"field2": "value2"
}
}
},
)
print(res.json()){
"data": {
"wfInstanceId": "5c79fc5c-8a97-4b8b-ab8c-3e196f266946",
"nextNodeId": "form_001",
"nextNodeType": "form",
"summary": [
"Biometric",
"Passport",
"Driver's license"
]
}
}// no response body
// no response body
// no response body
// no response body
Service Key
Service Key endpoints.
Get service keys
This endpoint returns available service keys. The license you are using must be of authLevel 'system'
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns array with service keys
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/servicekeys' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/servicekeys", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/servicekeys",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"tag": "xxxxx",
"keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"type": "xxxxx"
}
]// no response body
// no response body
// no response body
// no response body
Reset Service Key
This endpoint resets service key for given keyId. Deletes current one and recreates a new one. The license you are using must be of authLevel 'system'
Parameters
keyId (required)
The keyId of service key to reset
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns re-created service key
| Name | Type | Description |
|---|---|---|
| keyIdrequired | string | keyId of service key to reset |
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/workflowapi/servicekey/<keyId>' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/servicekey/<keyId>", {
method: "DELETE",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/workflowapi/servicekey/<keyId>",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"tag": "xxxxx",
"keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"type": "xxxxx"
}
]// no response body
// no response body
// no response body
ECDSA Helper
ECDSA Helper endpoints.
Encrypt and decrypt the data string by public key and private key.
Encrypt and decrypt the data string by public key and private key.
Parameters
method (optional)
The method parameter is type of enum. Default value is encrypt.
This parameter only accepts following values
encrypt, decrypt
Request Body
dataStr (required)
The dataStr key is type of string.
publicKey (required)
The publicKey is type of string.
privateKey (required)
The privateKey is type of string.
Returns
Returns the encrypted/decrypted string.
This API throw an error if something goes wrong. A common source of error is public or private key is not valid.
| Name | Type | Description |
|---|---|---|
| method | string | — |
| Field | Type | Description |
|---|---|---|
| dataStr | string | — |
| publicKey | string | — |
| privateKey | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/ecdsa_helper/<method>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"dataStr": "Hey, This is example data string.", "publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=", "privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/ecdsa_helper/<method>", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"dataStr": "Hey, This is example data string.",
"publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
"privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/ecdsa_helper/<method>",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
},
json={
"dataStr": "Hey, This is example data string.",
"publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
"privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"data": "xxxxxxxxxxxxxxxxxxxx",
"publicKey": "xxxxxxxxxxxxxxxxxxxx"
}Environment
Environment endpoints.
/environment
Provide details regarding the environments.
Returns
Returns an environment object
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/environment' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/environment", {
method: "GET",
headers: {
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/environment",
headers={
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
Healthz
Healthz endpoints.
Get healthz.
Get healthz
Returns
Returns a healthz object
- ``
version = <git-tag>.<commit-id>.<dob>``
- ``
git-tag``: When code is compiled from a git-tag, this must carry the tag name. This should match one of the git tags. - ``
commit-id``: This is the git-commit-id. eg: When code is built from this, the hex code, in the end, is the commit it. - ``
dob``: Date Of Build. This is epoc-time-in-se conds that tell the time when the build was created. - if the code is not built from a git-tag, then the ``
version =<commit-id>.<dob>``
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/healthz", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/healthz",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"status": "all services operational",
"publicKey": "//same as <service>/publickeys endpoint",
"code": "200",
"version": "xxxx.xxxx.xxxx"
}JWT
JWT endpoints.
Verify JWT token
Verifies a JWT token and checks if the user has an active login session. If the user does not exist, is disabled, or inactive, all login sessions are destroyed.
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| authorizationrequired | string | Bearer JWT token. |
Encrypted request body containing the JWT token. For Swagger preview, unencrypted data is accepted.
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/workflowapi/jwt/verifyToken' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"data": {"token": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/jwt/verifyToken", {
method: "POST",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"token": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/workflowapi/jwt/verifyToken",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"authorization": "Bearer YOUR_TOKEN",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Authorization": "Bearer YOUR_TOKEN"
},
json={
"data": {
"token": "string"
}
},
)
print(res.json()){
"data": "object",
"publicKey": "string"
}// no response body
Public Key
Public Key endpoints.
Get system's public key.
Get system's public key.
Returns
Returns a public key object
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/publickeys' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/publickeys", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/publickeys",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"publicKey": ""
}// no response body
Service Directory
Service Directory endpoints.
Get all service directories.
Get all service directories.
Returns
Returns all service directories.
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/sd' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/sd", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/sd",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"name1": "https://xxx.xxxxxx.xxx/xxxxx",
"name2": "https://xxx.xxxxxx.xxx/xxxxx",
"name3": "https://xxx.xxxxxx.xxx/xxxxx"
}Well Known config
Well Known config endpoints.
Get well known config.
Get well known config
Returns
Returns an object
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/.well-known' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/.well-known", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/.well-known",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"public_key": "//same as <service>/publickeys endpoint"
}Workflow Node
Workflow node catalog.
Get workflow node library
Returns the list of workflow node categories, elements, handler keys, and default header & footer templates.
<b>Authentication & Headers:</b>
- Requires ECDSA authenticated headers and appropriate permissions.
- You must provide <b>either</b> a valid <b>licensekey</b> <b>or</b> a <b>JWT access token</b>.
- All requests must include <b>requestid</b> and <b>publickey</b> headers as described below.
| Header | Required | Description |
|---|---|---|
| licensekey | Yes* | License key encrypted with ECDSA |
| authorization | Yes* | JWT Access Token (Bearer), e.g. Bearer <token> |
| requestid | Yes | JSON string encrypted with ECDSA (appid, uuid, ts) |
| publickey | Yes | Public key |
*One of <code>licensekey</code> or <code>authorization</code> is required. If using JWT, provide it in the <code>authorization</code> header.
<b>Permissions:</b> SYSTEM, SERVICE, or SERVICE_EXT required.
<b>Response fields:</b> All fields below are always returned.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of the tenant |
| communityIdrequired | string | ID of the community |
| Name | Type | Description |
|---|---|---|
| licensekey | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| authorization | string | JWT Access Token (Bearer) / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA (appid, uuid, ts) / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/workflowapi/v0/tenant/tenantId/community/communityId/workflow/node/library' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'Authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/workflowapi/v0/tenant/tenantId/community/communityId/workflow/node/library", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/workflowapi/v0/tenant/tenantId/community/communityId/workflow/node/library",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"data": {
"categories": [
{
"id": "category-1",
"title": "Document Verification Nodes",
"styles": {
"bg_color": "#123456",
"logo-image": "xxxxxxxxx"
},
"elements": [
"element-1"
]
}
],
"elements": [
{
"id": "element-1",
"name": "Form Node",
"styles": {
"bg_color": "#123456",
"logo-image": "xxxxxxxxx"
},
"node": {
"type": "form",
"fields": []
},
"description": "Performs verification on uploaded documents."
}
],
"handlerKeys": [
{
"key": "string",
"label": "string"
}
],
"templates": {
"header": "string",
"footer": "string"
}
}
}// no response body
// no response body
// no response body