Record whether you agree

Your verdict on the answer, per stakeholder.

POST /api/v1/decisions/{id}/assessments. The fields, answers and errors below are rendered from the OpenAPI document.

Record whether you agree

POST /api/v1/decisions/{id}/assessments

Whether Eevo’s best option is right in your judgement, per stakeholder. Each call adds an assessment. Free.

Parameters

  • id (path, required)

    The decision id (dec_…) its creation returned.

    string

Request body

application/json

object

  • overall (required)

    string

    Allowed values
    ["agree","partly","disagree"]
  • stakeholders (required)

    array

    Minimum items
    1
    Maximum items
    8

    Array items:

    object

    • stakeholder (required)

      string

      Minimum length
      1
      Maximum length
      40
      Pattern
      "^[A-Za-z0-9_-]+$"
    • best_correct (required)

      string

      Allowed values
      ["yes","no","unsure"]
    • would_choose (optional)

      string

      Allowed values
      ["A","B","C","D","E","F","G","H","none"]
    • confidence (optional)

      number

      Minimum
      0
      Maximum
      1
    • reason (optional)

      string

      Minimum length
      1
      Maximum length
      2000

    Additional properties: not allowed.

  • assessor (optional)

    object

    • kind (optional)

      string

      Allowed values
      ["agent","human"]
    • agent (optional)

      string

      Minimum length
      1
      Maximum length
      100
    • model (optional)

      string

      Minimum length
      1
      Maximum length
      100

    Additional properties: not allowed.

  • on_behalf_of (optional)

    object

    • name (optional)

      string

      Minimum length
      1
      Maximum length
      200
    • email (optional)

      string · email

      Maximum length
      320

    Additional properties: not allowed.

  • note (optional)

    string

    Minimum length
    1
    Maximum length
    2000

Additional properties: not allowed.

Responses

Response 200

The assessment.

application/json

object

Additional properties: allowed.

Response 400

The request is invalid; the message says which field and why.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 401

No valid API key.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 402

No free decisions or credit left for the request.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 403

Only the person who made the decision, or the API key it was made with, can change who sees it or publish it.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 409

The model is not served yet, or the revised decision already has a newer revision.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 410

No such decision that you can see: none in your organization, or one not shared with you.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 429

Rate limit reached (see Retry-After), or your organization already has 3 Default mode decisions running; send it when one is done.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 502

The model failed to answer, or the decision could not be completed. Nothing is billed.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Response 503

The model is starting after being idle, or a request on free decisions found it busy (free_capacity_busy); retry after Retry-After seconds. Nothing is billed.

application/json

Error

object

  • error (required)

    object

    • type (required)

      string

      Allowed values
      ["invalid_request","authentication","insufficient_credit","model_unavailable","model_warming","free_capacity_busy","too_many_overlap_pairs","too_many_records","revision_conflict","rate_limited","server_error"]
    • message (required)

      string

Record whether you agree: examples

Request example

curl -X POST 'https://eevo.io/api/v1/decisions/{id}/assessments' \
  -H "Authorization: Bearer $EEVO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "overall": "agree",
  "stakeholders": [
    {
      "stakeholder": "string",
      "best_correct": "yes",
      "would_choose": "A",
      "confidence": 0,
      "reason": "string"
    }
  ],
  "assessor": {
    "kind": "agent",
    "agent": "string",
    "model": "string"
  },
  "on_behalf_of": {
    "name": "string",
    "email": "string"
  },
  "note": "string"
}'

Response 200 example

{}