Skip to content

API / webhook

The API / webhook trigger lets your own systems start a workflow with a request. You declare the fields the workflow expects, and NuacemOne checks each request against them before the run starts. You can stop duplicate requests from starting a second run, limit which API clients may call it, and choose whether the caller gets an answer straight away or waits for the result.

  • Your loan system creates an application and a workflow should collect documents and get approval.
  • An online store posts each new order so a workflow can confirm it with the customer.
  • An insurance system sends a renewal record and expects a quote back in the same call.
  • The same event should start several workflows, or wake runs that are already waiting for it. Use Business event.
  • Runs should start on a timetable. Use Schedule.
  • A customer’s call or message should start it. Use Channel inbound.
Setting What it does
Input fields The payload fields the workflow uses. Each has a name, a type (text, number, true/false, date, email, phone or choice) and can be required. A request that lacks a required field, or sends one of the wrong type, is refused. Up to 40 fields.
Duplicate key The input field that identifies a request, for example requestId. A second request with the same value returns the first run instead of starting another. Test runs ignore it.
Allowed API clients Service client ids or API key ids (key_…) that may start this workflow. Empty allows any client with permission to start runs and any secret key of the workspace.
Respond immediately (default) returns the new run at once. on_completion holds the request until the run ends or the response timeout passes, then returns the run’s output.
Response timeout For On completion. How long the caller waits. Default: 30s.
  • input.<field> for every field in the payload. Declared fields are converted to their type, so a number sent as "1200" arrives as 1200.
  • trigger.type is trigger.api.
  • With Respond set to On completion, the caller gets the Output of the End step that finished the run. If the run is still going when the timeout passes, the caller gets the run without an output and can check on it later.

A request from a client that is not in the allowed list gets a 403 error. A payload that fails the input checks gets a 422 error that names the problem. See the workflows API guide and Starting runs.

A lender starts a document collection workflow when an application is created.

API / webhook → Send message (document checklist) → Wait for event (documents.uploaded) → Approval → End
{
"requestId": "app-20391",
"applicationId": "LN-88213",
"customerName": "Asha",
"phone": "+919800000000",
"amount": 450000
}

With Duplicate key set to requestId, a retry of the same request returns the run that is already in progress.