Crego Platform
  1. Flow
Crego Platform
  • Authentication
    • Login
      POST
    • Refresh JWT Token
      POST
  • Flow
    • Upload File
      POST
    • Create Runner
      POST
  1. Flow

Create Runner

POST
/runners/
This API is used for creating a new application using the email or mobile no. of the customer, all the data that needs to be initiated with that application can be passed inside the data parameter of the payload. Either pass in the mobile parameter or the email parameter

Request

Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Header Params

Body Params application/json

Examples

Responses

🟢201Sample Response
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://demo.preprod.crego.ai/flow/api/runners/' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "flow_id": "{{flow_id}}",
    "email": "gautam.s@crego.ai", // Optional Field, can also pass mobile instead of this
    // "mobile": "9569476978",
    "create_if_not_exists": true,
    "type": "customer",
    "action": "submit",
    "data": {
        "contact": {
            "email": "gautam.s@crego.ai", // Optional Field, can also pass mobile instead of this
            // "mobile": "9569476978",
        }
    }
}'
Response Response Example
{
    "id": "3c2a1a4b-da86-4683-ac3e-f9f29b4d28aa",
    "created_at": "2025-11-26T12:52:33.875482",
    "updated_at": null,
    "created_by": "01KAAV7BB8XZCFW6KRKEYBG51C",
    "ref_id": "RUNNER-2511-18",
    "flow_id": "1811afd8-2a5a-4c48-a536-d0675ab5b0d8",
    "design_id": "x0acd546-40d8-4305-b39c-eb6b4e390b8b",
    "params": {
        "environment": "dev",
        "prod": {},
        "dev": {},
        "auth_token_config": {
            "mode": "bearer",
            "bearer": {
                "login": {
                    "url": "${SECRET.idfc.auth_host}/authorization/oauth2/token",
                    "method": "post",
                    "headers": {
                        "Content-Type": "application/x-www-form-urlencoded"
                    },
                    "data": {
                        "grant_type": "client_credentials",
                        "client_id": "${SECRET.idfc.client_id}",
                        "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
                        "scope": "digital-lending-onboarding-enc-panverification",
                        "client_assertion": "${jwt_encode({'headers': {'alg': 'RS256', 'typ': 'JWT'}, 'payload': {'jti': uuid4(), 'sub': SECRET.idfc.client_id, 'iss': SECRET.idfc.client_id, 'aud': str(SECRET.idfc.jwt_host) + '/platform/oauth/oauth2/token', 'exp': date_to_epoch(strftime(timedelta(now(), {'minutes': 30}), '%Y/%m/%d %H:%M:%S'))}, 'secret': SECRET.idfc.jwks})}.safe_eval"
                    }
                }
            },
            "response_type": "json",
            "cache": {
                "key": "${RUNNER_ID}",
                "ttl": {
                    "access_token": "expires_in"
                }
            },
            "response_map": {
                "access_token": "access_token"
            }
        },
        "encryption_config": {
            "encrypt": true,
            "decrypt": true,
            "algorithm": "aes256",
            "mode": "cbc",
            "key": "${SECRET.idfc.encryption_key}"
        },
        "storage": {
            "vendor": "${SECRET.storage.vendor}",
            "creds_key": "storage_s3_creds"
        },
        "states": [
            "ANDAMAN AND NICOBAR ISLANDS",
            "ANDHRA PRADESH",
            "ARUNACHAL PRADESH",
            "ASSAM",
            "BIHAR",
            "CHANDIGARH",
            "CHATTISGARH",
            "DADRA AND NAGAR HAVELI AND DAMAN AND DIU",
            "DELHI",
            "GOA",
            "GUJARAT",
            "HARYANA",
            "HIMACHAL PRADESH",
            "JAMMU AND KASHMIR",
            "JHARKHAND",
            "KARNATAKA",
            "KERALA",
            "LADAKH",
            "LAKSHADWEEP",
            "MADHYA PRADESH",
            "MAHARASHTRA",
            "MANIPUR",
            "MEGHALAYA",
            "MIZORAM",
            "NAGALAND",
            "ODISHA",
            "PUDUCHERRY",
            "PUNJAB",
            "RAJASTHAN",
            "SIKKIM",
            "TAMIL NADU",
            "TELANGANA",
            "TRIPURA",
            "UTTAR PRADESH",
            "UTTARAKHAND",
            "WEST BENGAL"
        ],
        "state_enum_names": [
            "Andaman and Nicobar Islands",
            "Andhra Pradesh",
            "Arunachal Pradesh",
            "Assam",
            "Bihar",
            "Chandigarh",
            "Chattisgarh",
            "Dadra and Nagar Haveli and Daman and Diu",
            "Delhi",
            "Goa",
            "Gujarat",
            "Haryana",
            "Himachal Pradesh",
            "Jammu and Kashmir",
            "Jharkhand",
            "Karnataka",
            "Kerala",
            "Ladakh",
            "Lakshadweep",
            "Madhya Pradesh",
            "Maharashtra",
            "Manipur",
            "Meghalaya",
            "Mizoram",
            "Nagaland",
            "Odisha",
            "Puducherry",
            "Punjab",
            "Rajasthan",
            "Sikkim",
            "Tamil Nadu",
            "Telangana",
            "Tripura",
            "Uttar Pradesh",
            "Uttarakhand",
            "West Bengal"
        ]
    },
    "current_node": "init",
    "store_id": "f9034fc8-d7b3-4e5a-8d87-9783b6568dbe",
    "visited_nodes": null,
    "parent_runner_id": null,
    "primary_user_id": "01KAZG47AKJ8CRKER4339QVG4N",
    "store_info": {}
}
Modified at 2025-11-26 11:12:01
Previous
Upload File
Built with