stabisoDocs

API reference

Conversation

Home as a conversation: the answers a person pinned to the top of their Home, each the chart the assistant showed and the question that gave it.

Operation Summary Scope Idempotency-Key
DELETE /v1/conversation-pins/{pin_id} Take a pinned answer off Home read
GET /v1/entities/{entity}/conversation-pins List the answers pinned to Home read
POST /v1/entities/{entity}/conversation-pins Pin an answer to Home read

DELETE /v1/conversation-pins/{pin_id}

Take a pinned answer off Home

Only from the caller's own Home: another person's pin is not found (404).

Required scope read (admin implies every scope)
Idempotency-Key not used
Operation id delete_pin_v1_conversation_pins__pin_id__delete

Parameters

In Name Type Required Description
path pin_id string (uuid) yes Pinned answer id (GET /v1/entities/{entity}/conversation-pins).

Example request

curl -X DELETE "$ERP_URL/v1/conversation-pins/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
204 No content
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
409 The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

GET /v1/entities/{entity}/conversation-pins

List the answers pinned to Home

The caller's pinned answers on the company's Home, in the order pinned: each the question asked and the chart the assistant showed, with its values as of pinned_at.

Required scope read (admin implies every scope)
Operation id list_pins_v1_entities__entity__conversation_pins_get

Parameters

In Name Type Required Description
path entity string yes Entity code, e.g. CH01 (GET /v1/entities).

Example request

curl "$ERP_URL/v1/entities/CH01/conversation-pins" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 OK array of PinOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "entity": "string",
    "question": "string",
    "answer": {
      "title": "string",
      "kind": "bar",
      "categories": [
        "string"
      ],
      "figures": [],
      "unit": "string"
    },
    "pinned_at": "2026-09-21T09:30:00Z"
  }
]

POST /v1/entities/{entity}/conversation-pins

Pin an answer to Home

Keep a chart the assistant showed on the caller's Home of the company, with the question that gave it. A person keeps at most 12 per company (422 conversation_pin_limit); a key the system issued has no Home (403 conversation_pin_no_person).

Required scope read (admin implies every scope)
Idempotency-Key not used
Operation id create_pin_v1_entities__entity__conversation_pins_post

Parameters

In Name Type Required Description
path entity string yes Entity code, e.g. CH01 (GET /v1/entities).

Request body

application/json (required): PinInput

Field Type Required Description
question string yes What the person asked to get the answer. (min length 1; max length 4000)
answer PinnedChart yes The chart the assistant showed with its answer.

Example request

curl -X POST "$ERP_URL/v1/entities/CH01/conversation-pins" \
  -H "Authorization: Bearer $ERP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "answer": {
    "categories": [
      "W1",
      "W2",
      "W3"
    ],
    "figures": [
      {
        "label": "Cash",
        "numbers": [
          "212400.00",
          "198100.00",
          "41000.00"
        ]
      }
    ],
    "kind": "bar",
    "title": "Cash at the end of each week",
    "unit": "CHF"
  },
  "question": "When do we get tight on cash?"
}'

Responses

Status Meaning Body
201 Created PinOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
409 The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "entity": "string",
  "question": "string",
  "answer": {
    "title": "string",
    "kind": "bar",
    "categories": [
      "string"
    ],
    "figures": [
      {
        "label": null,
        "numbers": null
      }
    ],
    "unit": "string"
  },
  "pinned_at": "2026-09-21T09:30:00Z"
}

Schemas

PinInput

Field Type Required Description
question string yes What the person asked to get the answer. (min length 1; max length 4000)
answer PinnedChart yes The chart the assistant showed with its answer.

PinOut

Field Type Required Description
id string (uuid) yes The pin's id (to take it off Home).
entity string yes Code of the company it is about.
question string yes What the person asked.
answer PinnedChart yes The chart, as the assistant showed it then.
pinned_at string (date-time) yes When it was pinned: the chart's values are as of then.

PinnedChart

A chart of an answer as it is kept on Home: the assistant's Chart (its series as figures, each with its values as numbers) without what only the turn that drew it knew (which values no tool returned).

Field Type Required Description
title string yes The chart's title. (max length 200)
kind "bar" | "line" yes line or bar.
categories array of string yes The labels along the axis. (min items 1; max items 60)
figures array of PinnedFigures yes The lines or bars: one series of figures each. (min items 1; max items 6)
unit string or null yes A currency code (CHF), %, days, or null. (max length 8)

PinnedFigures

Field Type Required Description
label string yes What the figures are, e.g. Cash. (max length 120)
numbers array of string or null yes One value per category, a decimal string as the assistant showed it; null for none.
Stabiso, the Enterprise System of Record · generated from the code and its guides · release 3262ae655e81