Skip to main content

Overview

The single endpoint API mode provides synchronous execution of autonomous flows. The API call waits for the flow to complete and returns the final result in the response. Limitations:
  • Maximum execution time: 120-150 seconds
  • Not recommended for complex or multi-step flows
  • Best suited for simple, fast operations

Endpoint

POST https://ai-core.phinite.ai/trigger/{workspace_id}/{trigger_id}/{environment}

Request Payload

The API accepts the following JSON payload:
{
  "message": "",
  "user_variables": {"key1":"value1", "key2":"value2"}
}

Field Descriptions

FieldTypeDescription
messageStringThe first message sent to the flow when the session starts. Can be empty if not required.
user_variablesObjectSession variables to initialize the conversation with. These variables will be available throughout the flow.

Response Format

The API directly returns the completed or failed status: Success Response (200 OK):
{
  "workflow_id": "workflowid-uuid",
  "response": {
    "key1": "value1",
    "key2": "value2"
  },
  "status": "completed",
  "logs": [...],
  "requires_input": false,
  "error": null
}
Failed Response (200 OK):
{
  "workflow_id": "workflowid-uuid",
  "response": {},
  "status": "failed",
  "logs": [...],
  "requires_input": false,
  "error": "Error details here"
}