Skip to main content
PATCH
/
v1
/
runs
/
{run_id}
/
feedback
Set or clear customer feedback on a run
curl --request PATCH \
  --url https://api.runflow.io/v1/runs/{run_id}/feedback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "is_positive": true,
  "reason": "<string>"
}
'
import requests

url = "https://api.runflow.io/v1/runs/{run_id}/feedback"

payload = {
    "is_positive": True,
    "reason": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({is_positive: true, reason: '<string>'})
};

fetch('https://api.runflow.io/v1/runs/{run_id}/feedback', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.runflow.io/v1/runs/{run_id}/feedback",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'is_positive' => true,
    'reason' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.runflow.io/v1/runs/{run_id}/feedback"

	payload := strings.NewReader("{\n  \"is_positive\": true,\n  \"reason\": \"<string>\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.runflow.io/v1/runs/{run_id}/feedback")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"is_positive\": true,\n  \"reason\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.runflow.io/v1/runs/{run_id}/feedback")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"is_positive\": true,\n  \"reason\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "comfyui_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "target_version": "<string>",
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "input": {},
  "output": {},
  "context": {},
  "duration_ms": 123,
  "cost": "<string>",
  "cost_breakdown": {},
  "nodes_total": 123,
  "nodes_completed": 123,
  "resolved_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "client_ref": "<string>",
  "jurisdiction_code": "<string>",
  "flow_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "request_id": "<string>",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "callback_url": "<string>",
  "metadata": {},
  "has_logs": true,
  "has_node_runs": true,
  "links": {},
  "failure_code": "<string>",
  "failure_message": "<string>",
  "feedback_is_positive": true,
  "feedback_reason": "<string>",
  "source_chat_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "current_evaluation_summary": {
    "passed": true,
    "status_code": "<string>",
    "score": 0.5
  },
  "node_runs": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "flow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "state_code": "<string>",
      "input": {},
      "output": {},
      "input_signature": "<string>",
      "preview_type": "<string>",
      "preview_value": "<string>",
      "duration_ms": 123,
      "cost": "<string>",
      "retry_count": 123,
      "error_message": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "started_at": "2023-11-07T05:31:56Z",
      "completed_at": "2023-11-07T05:31:56Z"
    }
  ],
  "logs": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "level_code": "<string>",
      "message": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "meta": {},
      "run": null
    }
  ],
  "model": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "model_creator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "slug": "<string>",
    "name": "<string>",
    "description": "<string>",
    "version": "<string>",
    "is_public": true,
    "is_open_source": true,
    "icon_url": "<string>",
    "cover_url": "<string>",
    "category_code": "<string>",
    "status_code": "<string>",
    "family_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "family_variant_code": "<string>",
    "param_count": "<string>",
    "architecture": "<string>",
    "license_code": "<string>",
    "max_resolution": "<string>",
    "lora_support": true,
    "fine_tuning": true,
    "supports_streaming": true,
    "paper_url": "<string>",
    "github_url": "<string>",
    "is_official": true,
    "availability_status": "<string>",
    "seo": {},
    "notable_features": [
      "<unknown>"
    ],
    "content": "<string>",
    "pricing_note": "<string>",
    "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "deleted_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "inputs": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "display_name": "<string>",
        "description": "<string>",
        "variable_type_code": "<string>",
        "default_behavior_code": "<string>",
        "validator_code": "<string>",
        "validator_attrs": {},
        "is_required": true,
        "default_value": {},
        "sort_order": 123,
        "is_featured": true,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "outputs": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "display_name": "<string>",
        "description": "<string>",
        "variable_type_code": "<string>",
        "validator_code": "<string>",
        "validator_attrs": {},
        "sort_order": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "examples": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "title": "<string>",
        "description": "<string>",
        "input": {},
        "output": {},
        "status_code": 123,
        "cost": "<string>",
        "start_type": "<string>",
        "timing": {},
        "duration_ms": 123,
        "total_ms": 123,
        "thumbnail_url": "<string>",
        "category_code": "<string>",
        "is_featured": true,
        "is_public": true,
        "sort_order": 123,
        "ran_at": "2023-11-07T05:31:56Z",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "faq_entries": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "question": "<string>",
        "answer": "<string>",
        "sort_order": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "pricing": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "pricing_model_code": "<string>",
        "rule_effect_code": "<string>",
        "model_input_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "match_value": null,
        "dimension_code": "<string>",
        "min_value": "<string>",
        "max_value": "<string>",
        "price": "<string>",
        "currency_code": "<string>",
        "unit_code": "<string>",
        "multiplier_label": "<string>",
        "description": "<string>",
        "sort_order": 123,
        "disabled_at": "2023-11-07T05:31:56Z",
        "measurement_source": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "related_links": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "related_model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "sort_order": 123,
        "created_at": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "comfyui_workflow": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "slug": "<string>",
    "name": "<string>",
    "description": "<string>",
    "workflow_json": {},
    "version": "<string>",
    "is_public": true,
    "status_code": "<string>",
    "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "environment": {},
    "models": {},
    "custom_nodes": {},
    "graph": {},
    "resources": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": "2023-11-07T05:31:56Z",
    "deleted_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "category_code": "<string>",
    "gpu_current_tier_code": "<string>",
    "inputs": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "comfyui_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "display_name": "<string>",
        "description": "<string>",
        "variable_type_code": "<string>",
        "default_behavior_code": "<string>",
        "validator_code": "<string>",
        "validator_attrs": {},
        "is_required": true,
        "default_value": {},
        "sort_order": 123,
        "comfyui_node_id": "<string>",
        "comfyui_field_name": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "outputs": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "comfyui_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "display_name": "<string>",
        "description": "<string>",
        "variable_type_code": "<string>",
        "validator_code": "<string>",
        "validator_attrs": {},
        "sort_order": 123,
        "comfyui_node_id": "<string>",
        "comfyui_field_name": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "gpu_explicit_models": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "comfyui_workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "gpu_model_code": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      }
    ]
  }
}
{
  "code": "<string>",
  "message": "<string>",
  "errors": [
    {}
  ]
}
{
  "code": "<string>",
  "message": "<string>",
  "errors": [
    {}
  ]
}
{
  "code": "<string>",
  "message": "<string>",
  "errors": [
    {}
  ]
}
{
  "code": "<string>",
  "message": "<string>",
  "errors": [
    {}
  ]
}
{
  "code": "<string>",
  "message": "<string>",
  "errors": [
    {}
  ]
}
{
  "code": "<string>",
  "message": "<string>",
  "errors": [
    {}
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Organization-Id
string | null

Path Parameters

run_id
string<uuid>
required

Body

application/json

Body for PATCH .../feedback — set or clear customer feedback.

Reversible singleton state: pass is_positive as true for šŸ‘, false for šŸ‘Ž, or null to clear an existing rating. reason is dropped when is_positive is null.

is_positive
boolean | null
required

true records a thumbs-up, false records a thumbs-down, null clears any prior rating.

reason
string | null

Optional free-form note explaining the rating. Ignored when is_positive is null.

Required string length: 1 - 2000

Response

Successful Response

Response shape.

id
string<uuid> | null
flow_id
string<uuid> | null
model_id
string<uuid> | null
comfyui_workflow_id
string<uuid> | null
target_type
enum<string> | null
Available options:
model,
flow,
comfyui
target_version
string | null
org_id
string<uuid> | null
status_code
enum<string> | null
Available options:
queued,
dispatching,
running,
succeeded,
failed,
cancelled,
partial_succeeded
source_code
enum<string> | null
Available options:
playground,
api,
flow-node
input
Input Ā· object | null
output
Output Ā· object | null
context
Context Ā· object | null
duration_ms
integer | null
cost
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
cost_breakdown
Cost Breakdown Ā· object | null
nodes_total
integer | null
nodes_completed
integer | null
resolved_template_id
string<uuid> | null
batch_id
string<uuid> | null
client_ref
string | null
jurisdiction_code
string | null
flow_version_id
string<uuid> | null
request_id
string | null
created_by
string<uuid> | null
created_at
string<date-time> | null
started_at
string<date-time> | null
completed_at
string<date-time> | null
callback_url
string | null
metadata
Metadata Ā· object | null
has_logs
boolean | null
has_node_runs
boolean | null
failure_code
string | null

Failure classification (FK to run_failure_codes.code). None on successful runs.

failure_message
string | null

Human-readable failure detail. See /v1/runs/{id}/logs for full audit history.

failure_stage_code
enum<string> | null

Pipeline stage where the failure originated (FK to run_failure_stages.code).

Available options:
dispatch,
execution,
callback,
reconciliation
feedback_is_positive
boolean | null

Customer thumb (TRUE = šŸ‘, FALSE = šŸ‘Ž, NULL = no rating yet).

feedback_reason
string | null

Optional customer-supplied note explaining the feedback.

source_chat_message_id
string<uuid> | null

Chat message that dispatched this run, if any.

current_evaluation_summary
RunEvaluationSummary Ā· object | null

Slim projection of a run's current evaluation, surfaced as the current_evaluation_summary custom embed on GET /v1/runs.

"Current" = status_code == 'completed' AND superseded_at IS NULL. The embed loader (routers/runs._populate_evaluation_summary) writes None for runs with no current evaluation so the wire shape is {"current_evaluation_summary": null} rather than an absent key once the caller opts into the embed. The field is gated behind evaluations:read — see _RUN_CUSTOM_EMBED_PERMISSIONS.

status_code is typed as Literal["completed"] because the loader's subquery (RunRepository._current_evaluation) filters to completed rows only; any other value would be a contract violation.

node_runs
FullValidator Ā· object[] | null
logs
FullValidator Ā· object[] | null
model
FullValidator Ā· object | null

Response shape.

comfyui_workflow
FullValidator Ā· object | null

Response shape.