Deciders

List decisions

Returns the decisions in a project, newest first.

get/v1/projects/{project_id}/decisions

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/decisions
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Query parameters

decider_idstring
Example:dcd_V1StGXR8Z5jdHi6B

Only decisions requested from this decider

statusstring[]

Only decisions in these statuses. Repeat the parameter to OR values. A value outside the enum, empty string included, is a 400.

limitinteger

Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is 400.

offsetinteger

Results to skip. Negative or not an integer it is 400.

Response

List of decisions

totalinteger required
limitinteger required
offsetinteger required

Example response

{
  "data": [
    {
      "id": "dec_V1StGXR8Z5jdHi6B",
      "project_id": "proj_V1StGXR8Z5jdHi6B",
      "decider_id": "dcd_V1StGXR8Z5jdHi6B",
      "decider_version": 1,
      "questions": [
        {
          "type": "choice",
          "name": "department",
          "instructions": "Which department should handle this complaint?",
          "choices": [
            {
              "value": "billing",
              "description": "Payments, invoices and refunds."
            }
          ],
          "levels": [
            {
              "label": "Workaround available",
              "description": "A task fails, but another way works."
            }
          ]
        }
      ],
      "answers": [
        {
          "name": "department",
          "probability": 0.92,
          "choice": "billing",
          "score": 1.1,
          "probabilities": [
            {
              "probability": 0.95
            }
          ],
          "confidence": 0.93
        }
      ],
      "error": {
        "code": "AI_PROVIDER_ERROR",
        "message": "Provider returned 402: insufficient credits"
      },
      "generation_id": "gen_V1StGXR8Z5jdHi6B",
      "metadata": {
        "author": "John",
        "revision": 2
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.