Update task execution and optionally re-execute flow - SuperAI Flows

Update task execution and optionally re-execute flow

cURL

curl --request PUT \
  --url https://flows.super.ai/api/task-executions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "flow_execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "task_execution_idx": 1,
  "task_name": "<string>",
  "created_at": "2025-01-23T10:30:00Z",
  "error": {
    "message": "Connection timeout after 30 seconds",
    "traceback": "Traceback (most recent call last):\n  ...",
    "type": "ConnectionError"
  },
  "input": "<unknown>",
  "modified_by": "system",
  "output": {
    "email_id": "msg_123",
    "sent_at": "2025-01-23T10:30:00Z"
  },
  "updated_at": "2025-01-23T10:35:00Z"
}
'

Python Example

import requests

url = "https://flows.super.ai/api/task-executions"

payload = {
    "flow_execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "<string>",
    "task_execution_idx": 1,
    "task_name": "<string>",
    "created_at": "2025-01-23T10:30:00Z",
    "error": {
        "message": "Connection timeout after 30 seconds",
        "traceback": "Traceback (most recent call last):\n  ...",
        "type": "ConnectionError"
    },
    "input": "<unknown>",
    "modified_by": "system",
    "output": {
        "email_id": "msg_123",
        "sent_at": "2025-01-23T10:30:00Z"
    },
    "updated_at": "2025-01-23T10:35:00Z"
}
headers = {
    "X-API-Key": "<api-key>",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)

Response Example

{
  "flow_execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "task_execution_idx": 1,
  "task_name": "<string>",
  "created_at": "2025-01-23T10:30:00Z",
  "error": {
    "message": "Connection timeout after 30 seconds",
    "traceback": "Traceback (most recent call last):\n  ...",
    "type": "ConnectionError"
  },
  "input": "<unknown>",
  "modified_by": "system",
  "output": {
    "email_id": "msg_123",
    "sent_at": "2025-01-23T10:30:00Z"
  },
  "updated_at": "2025-01-23T10:35:00Z"
}