Skip to main content
PATCH
/
workflow_executions
/
{execution_id}
Update workflow execution status
curl --request PATCH \
  --url https://api.kapso.ai/platform/v1/workflow_executions/{execution_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "workflow_execution": {
    "status": "ended"
  }
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "running",
    "started_at": "2023-11-07T05:31:56Z",
    "last_event_at": "2023-11-07T05:31:56Z",
    "ended_at": "2023-11-07T05:31:56Z",
    "tracking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "whatsapp_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workflow": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "status": "<string>"
    },
    "current_step": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "identifier": "<string>",
      "stepable_type": "<string>",
      "position": {
        "x": 123,
        "y": 123
      }
    },
    "error_details": {}
  }
}

Authorizations

X-API-Key
string
header
required

Path Parameters

execution_id
string<uuid>
required

Execution identifier

Body

application/json

Request to update a workflow execution status. Only certain status transitions are allowed (ended, handoff, waiting). The execution will transition to the new status if the transition is valid according to the workflow state machine.

workflow_execution
object
required

Response

Execution status updated successfully

Minimal workflow execution response (without execution_context and events)

data
object
required

Base workflow execution schema