> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run actions in a batch

> Up to 200 independent action runs, in order, one answer each.

**Re-sent under the same Idempotency-Key:** Each item's `instance_id` names its run: re-sent, a finished item answers `replayed`, and an item that ended `partial` answers its partial result again unless it says `resume: true`.



## OpenAPI

````yaml ontology/openapi.json POST /v1/object-model/actions/batch
openapi: 3.1.0
info:
  description: >-
    An organization's records, facts and figures.


    **Beta.** Every operation is `x-stability: beta`: paths, fields and codes
    may still change before v1 is declared stable. From then on, changes within
    v1 are additive only — new operations, optional fields, response fields,
    enum values and error codes — so a client must ignore fields and values it
    does not know. Anything else needs a new version or a six-month deprecation
    announced with Deprecation and Sunset headers.


    ## Idempotency


    Every write needs an `Idempotency-Key` header: 1–255 printable ASCII
    characters, one key per logical write, sent again unchanged on every retry
    of that write. Reads, the read-only POSTs (`/record-search`,
    `/records/{type_id}/query`, `/facts/query`, `/figures/query`,
    `/figures/explain`) and dry runs (`dry_run: true`) need none and are never
    recorded. A write without one is refused with 400
    `idempotency_key_required`.


    A key belongs to the organization and the person the API key acts for, so
    two of one person's API keys retrying one write agree; another person's
    request under the same key is their own. The API records the request — the
    method, the route, the path parameters, the body as parsed (JSON key order
    and spacing do not matter) and any `If-Match` — and its answer:


    - **The same key and the same request, finished**: the recorded answer again
    — status, body, `Object-Model-Version` and `X-Request-Id` — with
    `Idempotent-Replayed: true`. Nothing runs again, and an `If-Match` the
    original carried is not checked again (the original's own success moved the
    version it named).

    - **The same key and the same request, still running**: 409
    `request_in_progress` with `Retry-After`.

    - **The same key and a different request**: 409 `idempotency_key_reused`.
    Use a new key for a new request.


    A replay is authorized like any request first: the API key must still be
    valid and carry the route's scope, and the rate limit counts it.


    **Retention.** A finished write answers its replays for 24 hours; after that
    the key is free again and a request under it runs. A request still running
    holds its key for as long as the API waits for it plus 30 seconds. Each
    write says, under **Re-sent under the same Idempotency-Key**, what a request
    sent again after that gets — past the 24 hours, or after a 504 ("past the
    replay window"). Most writes still recognize their key then, and are not
    made twice.


    **What is recorded.** Every answer the request got, refusals included: a 422
    for an action that stopped part way replays with what it committed, so a
    retry never silently writes more. A 403 for a missing permission, a 5xx, a
    503 and a 504 are not recorded, because none says what was committed: a
    retry with the same key runs again, and the write's own key keeps it from
    being made twice. After a 504 the request may still be running, so a retry
    within its hold hears `request_in_progress`. If the record cannot be written
    or read, the write is not run: 503 `idempotency_unavailable` with
    `Retry-After`.


    **A lost response.**


    ```http

    POST /v1/object-model/records/company

    Idempotency-Key: create-acme-2026-11-12


    {"values": {"name": "Acme"}}

    ```


    The connection drops before the answer arrives. The client sends the same
    request with the same key:


    ```http

    HTTP/1.1 200 OK

    Idempotent-Replayed: true

    X-Request-Id: 7f3a…   (the original request's)


    {"written_id": "6650…", "disposition": "created", "records": […]}

    ```


    **A concurrent duplicate.** A second copy arrives while the first is still
    running:


    ```http

    HTTP/1.1 409 Conflict

    Retry-After: 2


    {"status": "failed", "code": "request_in_progress", "error": "a request with
    this Idempotency-Key is still running; retry after it finishes to get its
    answer"}

    ```


    Retried after it finishes, it gets the first copy's answer with
    `Idempotent-Replayed: true`.


    **The generic endpoint** (`POST /v1/object-model/{object_model_id}/request`,
    the older endpoint these routes replace) takes `Idempotency-Key` optionally:
    without one a request runs every time it is sent; with one it is recorded
    and replayed as above. The model create (`POST /v1/object-model`) needs
    none: an organization has one model, and a second create is refused.
  title: VectorShift Object Model API
  version: '1'
servers:
  - url: https://api.vectorshift.ai
security: []
paths:
  /v1/object-model/actions/batch:
    post:
      tags:
        - actions
      summary: Up to 200 independent action runs, in order, one answer each.
      description: >-
        Up to 200 independent action runs, in order, one answer each.


        **Re-sent under the same Idempotency-Key:** Each item's `instance_id`
        names its run: re-sent, a finished item answers `replayed`, and an item
        that ended `partial` answers its partial result again unless it says
        `resume: true`.
      operationId: post_actions_batch
      parameters:
        - description: >-
            Required on every write: one key per logical write, sent again
            unchanged on every retry. A finished request replays its answer for
            24 hours; the same key on a different request is refused (409
            `idempotency_key_reused`). A dry run (`dry_run: true`) needs none,
            and is not recorded under one it carries.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 255
            minLength: 1
            pattern: ^[\x20-\x7E]+$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/object_model_ActBatchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/object_model_ActBatchResult'
          description: Answered.
          headers:
            Idempotent-Replayed:
              description: >-
                `true` when this is a recorded answer to an earlier request with
                the same Idempotency-Key, answered again without running the
                write.
              schema:
                enum:
                  - 'true'
                type: string
            Object-Model-Version:
              description: The model version the request was served under.
              schema:
                type: integer
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: >-
            Malformed JSON, an unknown field, an unknown query parameter, one
            naming a field the route fixes, or a malformed Idempotency-Key (code
            `invalid_request`); a write with no Idempotency-Key (code
            `idempotency_key_required`).
          headers:
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: Missing, invalid or expired API key.
          headers:
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: >-
            The key lacks the scope (`scope_required`), the person lacks the
            permission (`forbidden`), or a feature the request needs is not
            enabled for the organization (`not_enabled`).
          headers:
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: >-
            No such record, or one this caller cannot see — the same answer on
            purpose.
          headers:
            Idempotent-Replayed:
              description: >-
                `true` when this is a recorded answer to an earlier request with
                the same Idempotency-Key, answered again without running the
                write.
              schema:
                enum:
                  - 'true'
                type: string
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '409':
          content:
            application/json:
              examples:
                idempotency_key_reused:
                  summary: The key was used for a different request
                  value:
                    code: idempotency_key_reused
                    error: >-
                      this Idempotency-Key was used for a different request;
                      send a new key for a new request
                    status: failed
                request_in_progress:
                  summary: >-
                    A concurrent duplicate: the first request with this key is
                    still running
                  value:
                    code: request_in_progress
                    error: >-
                      a request with this Idempotency-Key is still running;
                      retry after it finishes to get its answer
                    status: failed
              schema:
                $ref: '#/components/schemas/Failure'
          description: >-
            `idempotency_key_reused`: this Idempotency-Key was used for a
            different request. `request_in_progress`: a request with this key is
            still running; retry after Retry-After to get its answer.
          headers:
            Idempotent-Replayed:
              description: >-
                `true` when this is a recorded answer to an earlier request with
                the same Idempotency-Key, answered again without running the
                write.
              schema:
                enum:
                  - 'true'
                type: string
            Retry-After:
              description: 'With `request_in_progress`: seconds to wait before retrying.'
              schema:
                type: integer
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: The body is over 8 MiB.
          headers:
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: >-
            Understood and declined: validation, a guard, a decided field, a
            deletion policy, a wall. `result` carries what the operation did
            before it stopped, when it did anything.
          headers:
            Idempotent-Replayed:
              description: >-
                `true` when this is a recorded answer to an earlier request with
                the same Idempotency-Key, answered again without running the
                write.
              schema:
                enum:
                  - 'true'
                type: string
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: Rate limited. Retry-After says when to try again.
          headers:
            Retry-After:
              description: Seconds to wait before trying again.
              schema:
                type: integer
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: >-
            The request could not be recorded under its Idempotency-Key, so it
            was not run (code `idempotency_unavailable`). Retry it with the same
            key.
          headers:
            Retry-After:
              description: Seconds to wait before trying again.
              schema:
                type: integer
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
          description: >-
            No answer in time. A write may have landed: retry with the same
            Idempotency-Key.
          headers:
            X-Request-Id:
              description: >-
                The request's id: quote it when you contact support. Absent on a
                request refused before it ran, such as one with a bad key or a
                malformed body.
              schema:
                type: string
      security:
        - apiKey:
            - object_model:actions:run
components:
  schemas:
    object_model_ActBatchRequest:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/object_model_ActRequest'
          type: array
      type: object
    object_model_ActBatchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/object_model_ActBatchItem'
          type: array
      type: object
    Failure:
      properties:
        code:
          type: string
        details:
          additionalProperties:
            type: string
          type: object
        error:
          type: string
        path:
          type: string
        request_id:
          type: string
        result:
          description: >-
            The operation's own result, when a declined operation has one: what
            it did before it stopped. An action that stopped part way
            (`partial`) carries its `instance_id`, the records it created, its
            `fact_ids` and `field_outcomes` here — the steps that committed.
            Same shape as the route's 200 body.
          type: object
        status:
          const: failed
          type: string
      required:
        - status
        - code
        - error
      type: object
    object_model_ActRequest:
      additionalProperties: false
      properties:
        action_id:
          description: >-
            The action to run, from the schema's `actions`. On `POST
            /actions/{action_id}/run` the path names it: leave it out, or send
            the same id.
          type: string
        approving_decision_id:
          description: >-
            Set by the app when a decider carries out a decision they approved.
            Leave it out.
          type: string
        citations_json:
          description: >-
            What the run rests on, as a JSON string: `[{"item": …, "attachment":
            …, "page": …, "quote": …}]` (`attachment` and `page` optional), such
            as an email and the words it quotes. Shown to the deciders on the
            decision the run raises, and added to one already waiting for the
            same change. A run that raises no decision ignores it.
          type: string
        confirm_lockout:
          description: >-
            Put a record behind a wall you are outside of anyway, losing sight
            of it, where the wall lets you push records in. Without it, such a
            run is refused `would_lose_access`, and its `lockout` names the wall
            and counts what you would lose (`records`, and of those `own`). To
            go ahead, send the run again with `confirm_lockout: true` under a
            new `Idempotency-Key`: the refusal is kept under the first one.
          type: boolean
        dry_run:
          description: >-
            Check the run and write nothing: params, the action's `requires` and
            access are checked as for a real run. The answer's `status` is
            `previewed`, or says why the run would be refused, with
            `diagnostics`. For a run that would put a record behind a wall you
            are outside of, it depends on the wall. One that lets you push
            records in passes the dry run, and the live run asks for
            `confirm_lockout`. One that refuses writers from outside (`from
            outside: refuse`) refuses the dry run too (`walled`). One that asks
            the people inside instead passes the dry run, and the live run
            writes nothing and asks them (or, for a record the run would create,
            is refused `walled`).
          type: boolean
        field_writes:
          additionalProperties:
            $ref: '#/components/schemas/object_model_FieldWrite'
          description: >-
            Per field the run writes, keyed by field name: what the value rests
            on and when it may land. Each write is weighed against the evidence
            the field already holds, and the answer's `field_outcomes` says what
            became of it.
          type: object
        instance_id:
          description: >-
            The run's id. On `POST /actions/{action_id}/run` it is made from the
            `Idempotency-Key` header: leave it out, except to resume a run that
            ended `partial` (send the `instance_id` its answer carried, with
            `resume`). On a batch item it is required, unique within the batch,
            and a re-sent item naming it answers that run again.
          type: string
        note:
          description: >-
            Where the values came from, in your words: a file's name, or what a
            person said. Stored as the `note` of every fact the run records.
          type: string
        params:
          allOf:
            - $ref: '#/components/schemas/google_protobuf_Struct'
          description: >-
            The action's params by name, each in the JSON its `param_type`
            takes: the same words and shapes as a field's `storage` (see a
            record create's `values`). A `list` param takes an array of objects
            with the param's `fields`; `ref(quantity)` and `ref(definition)`
            take an id; a `creatable` param takes a record id, or `{"new":
            {<field>: <value>, …}}` to create the record as the action runs. An
            optional param you leave out changes nothing: a field the action
            sets from it keeps its value.
        preview_definitions:
          description: >-
            With `dry_run`: figures to compute as if the run had landed, by id
            from the schema's `definitions`. Answered in `previews`, one per
            figure for the subject and for each record the run would create.
          items:
            type: string
          type: array
        record_edit_baselines:
          description: >-
            For an action that only changes fields: what each record's fields
            held when you read them, one entry per record. Records are saved one
            at a time, each only while every field the run changes on it still
            holds its baseline. A changed value found before any record is saved
            refuses the run (`stale_record_value`) and nothing is written. One
            found after a record was saved ends the run `partial` (422, with
            what it wrote under `result`), and the records saved before it keep
            their changes: read the records again before another run, which
            would otherwise apply those changes a second time. An action that
            also creates records is refused with baselines.
          items:
            $ref: '#/components/schemas/object_model_RecordEditBaseline'
          type: array
        resume:
          description: >-
            Continue the run `instance_id` names, which ended `partial`, from
            the step that failed. Send it under a new `Idempotency-Key`, with
            the same action, subject and params. Without it, a request naming a
            partial run answers its partial result again and writes nothing.
          type: boolean
        subject_id:
          description: >-
            The record the action runs on, of the action's `subject_type_id`.
            Leave it out for an action that creates its own subject.
          type: string
        world_id:
          description: >-
            The scenario the run's facts land in, from `GET /worlds`. Leave it
            out to record them outside any scenario.
          type: string
      type: object
    object_model_ActBatchItem:
      additionalProperties: false
      properties:
        error:
          type: string
        result:
          $ref: '#/components/schemas/object_model_ActResult'
      type: object
    object_model_FieldWrite:
      additionalProperties: false
      properties:
        assumed:
          allOf:
            - $ref: '#/components/schemas/object_model_RecordValuePrecondition'
          description: >-
            Write only while the field still holds this value: for a change
            relative to it, such as a date pushed back a week.
        evidence:
          allOf:
            - $ref: '#/components/schemas/object_model_Evidence'
          description: What the value rests on.
        fill:
          description: Write only into an empty field.
          type: boolean
        observation_id:
          description: >-
            The id the write is logged under in the field's evidence. Leave it
            out and one is made for you.
          type: string
      type: object
    google_protobuf_Struct:
      additionalProperties: true
      type: object
    object_model_RecordEditBaseline:
      additionalProperties: false
      properties:
        record_id:
          description: The record read.
          type: string
        values:
          additionalProperties:
            $ref: '#/components/schemas/object_model_RecordValuePrecondition'
          description: 'Each field read, by name, with the value it held: at least one.'
          type: object
      type: object
    object_model_ActResult:
      additionalProperties: false
      properties:
        created:
          description: Records the run created.
          items:
            $ref: '#/components/schemas/object_model_CreatedRecord'
          type: array
        decision_id:
          description: >-
            With `proposed`: the decision the change waits for. Follow it with
            `GET /decisions/{decision_id}`.
          type: string
        diagnostics:
          description: What a dry run or a refusal found.
          items:
            $ref: '#/components/schemas/object_model_ActionDiagnostic'
          type: array
        fact_ids:
          description: Facts the run recorded.
          items:
            type: string
          type: array
        field_outcomes:
          description: What became of each field the request sent `field_writes` for.
          items:
            $ref: '#/components/schemas/object_model_RecordFieldOutcome'
          type: array
        instance_id:
          description: >-
            The run's id. To continue a `partial` run, send it as `instance_id`
            with `resume`, under a new `Idempotency-Key`.
          type: string
        invalidated_definitions:
          description: >-
            Figures the run's writes change, by id: read them again for their
            new values.
          items:
            type: string
          type: array
        lockout:
          allOf:
            - $ref: '#/components/schemas/object_model_WallLockout'
          description: >-
            With a `would_lose_access` refusal: the wall, and what you would
            lose behind it. Send the run again with `confirm_lockout` to go
            ahead.
        previews:
          description: >-
            With `dry_run` and `preview_definitions`: the figures as if the run
            had landed. A record the run would create is named
            `draft:<binding>:<i>` in their `subject_id`.
          items:
            $ref: '#/components/schemas/object_model_Figure'
          type: array
        record_edit_baselines_checked:
          description: How many fields' edit baselines were checked.
          format: int64
          type:
            - string
            - integer
        refusal:
          description: >-
            Why the run was refused, or who decides a `proposed` one, in words
            for a person.
          type: string
        status:
          description: >-
            What happened: `applied`; `replayed` (a re-sent run answered again,
            nothing new written); `resumed` (a `partial` run finished);
            `previewed` (a dry run); `proposed` (answered `202`: nothing is
            written until the decision `decision_id` names is approved);
            `refused` (nothing written; `refusal` and `diagnostics` say why); or
            `partial` (a step failed after earlier ones landed; `created` and
            `fact_ids` say what did). `refused` and `partial` are answered
            `422`, with this answer under `result`; the 422's `code` is
            `partial`, or the refusal's code, such as `would_lose_access`,
            `walled` or `stale_record_value`.
          type: string
      type: object
    object_model_RecordValuePrecondition:
      additionalProperties: false
      description: 'Set exactly one of: value, absent.'
      properties:
        absent:
          allOf:
            - $ref: '#/components/schemas/google_protobuf_Empty'
          description: '`{}`: the field was empty.'
        value:
          allOf:
            - $ref: '#/components/schemas/data_type_DataType'
          description: >-
            The value the field held, tagged by its type as a fact's value is,
            such as `{"string": "diligence"}`.
      type: object
    object_model_Evidence:
      additionalProperties: false
      properties:
        as_of_ms:
          description: >-
            When the statement was made or true, in epoch milliseconds. Leave it
            out for when it is written.
          format: int64
          type:
            - string
            - integer
        kind:
          description: >-
            The kind of source, such as `email`, or `person` for a person's own
            word. Which kinds outrank which for a field is set in the model's
            text.
          type: string
        quote:
          description: The words the value rests on.
          type: string
        reference:
          description: >-
            Where it came from: an email's Message-ID,
            `<message-id>#<attachment>:p<page>`, or a record id.
          type: string
        title:
          description: >-
            How to name the source to a person, such as "Marlow Pike, Oct 3:
            Project Halyard CIM".
          type: string
      type: object
    object_model_CreatedRecord:
      additionalProperties: false
      properties:
        binding:
          description: >-
            The name the action gave the record: its type, or `<type>#<i>` for
            one created in a loop.
          type: string
        entity_id:
          description: The record's id.
          type: string
        type_id:
          description: The record's type.
          type: string
      type: object
    object_model_ActionDiagnostic:
      additionalProperties: false
      properties:
        code:
          description: A stable code for a program to act on.
          type: string
        message:
          description: What is wrong, in words for a person.
          type: string
        path:
          description: 'What it is about: a param, a requirement, a step or a calculation.'
          type: string
      type: object
    object_model_RecordFieldOutcome:
      additionalProperties: false
      properties:
        attribute:
          description: The field.
          type: string
        outcome:
          allOf:
            - $ref: '#/components/schemas/object_model_FieldOutcome'
          description: What became of the write.
        record_id:
          description: The record written.
          type: string
      type: object
    object_model_WallLockout:
      additionalProperties: false
      properties:
        own:
          description: Of those, how many name you.
          type: integer
        records:
          description: >-
            How many records you would lose sight of: the record and every
            record that follows it behind the wall.
          type: integer
        wall_id:
          description: The wall's id.
          type: string
        wall_label:
          description: The wall's name, for a person.
          type: string
      type: object
    object_model_Figure:
      additionalProperties: false
      description: 'Set exactly one of: value, not_computable, error, not_applicable.'
      properties:
        as_of:
          allOf:
            - $ref: '#/components/schemas/google_protobuf_Timestamp'
          description: >-
            With `with_as_of`: the newest date of the values a level-kind figure
            used.
        as_of_earliest:
          allOf:
            - $ref: '#/components/schemas/google_protobuf_Timestamp'
          description: >-
            With `with_as_of`: the oldest date of the values it used, so a stale
            one shows.
        at:
          allOf:
            - $ref: '#/components/schemas/google_protobuf_Timestamp'
          description: >-
            With `by_period`: the period's first instant, at midnight UTC. A
            fiscal year starts the month after `fiscal_year_end_month`, so with
            a June year end the year that ends June 2027 starts 2026-07-01. No
            answer names a year.
        basis:
          description: Not set by this API's reads.
          type: number
        change:
          description: Not set by this API's reads.
          type: number
        change_ratio:
          description: Not set by this API's reads.
          type: number
        coverage:
          allOf:
            - $ref: '#/components/schemas/object_model_FigureCoverage'
          description: >-
            With `coverage`: how many of the records in scope the value covers.
            `included` below `total` is a partial figure; `included` 0 has no
            value.
        definition_id:
          description: The figure's id, or the quantity's for a raw quantity read.
          type: string
        derived:
          description: >-
            The value rests on facts an agent derived from sources some people
            may not see, so who else may see the figure depends on them.
          type: boolean
        error:
          description: Computing it failed, and why.
          type: string
        group_key:
          description: Not set by this API's reads.
          type: string
        index_key:
          description: >-
            Which bucket it is, on a bucketed read: `p:<epoch seconds of the
            period's start>` per period, `a:<value>` per value of
            `group_by_attribute` (`a:` for records with none), or `other:` for
            the bucket past `bucket_limit`.
          type: string
        measure_kind:
          description: >-
            `flow`, `level`, `ratio`, `rate`, `state` or `event`. Do not add up
            `level`, `ratio`, `rate` or `state` figures yourself: their sum
            means nothing. Read the figure over the whole selection instead.
          type: string
        not_applicable:
          description: >-
            The question has no single honest answer here, such as a ratio
            summed across records: read it per record (`each_subject`). Show it
            as "N/A".
          type: string
        not_computable:
          description: >-
            There are no facts in scope to compute it from. Show it as a blank,
            not as zero.
          type: string
        share:
          description: >-
            With `share_of_total`: this bucket's value over the whole
            selection's, when both are values and the total is not zero.
          type: number
        source:
          allOf:
            - $ref: '#/components/schemas/object_model_ValueSource'
          description: 'With `with_source`: the facts or record fields the value rests on.'
        subject_id:
          description: The record it is for. Empty for a figure over the whole selection.
          type: string
        unit:
          description: The unit, to format the value with.
          type: string
        value:
          description: >-
            The value. Exactly one of `value`, `not_computable`,
            `not_applicable` and `error` is set.
          type: number
      type: object
    google_protobuf_Empty:
      type: object
    data_type_DataType:
      additionalProperties: false
      description: >-
        Set exactly one of: null, string, int32, int64, float, bool, bytes, vec,
        map, enumeration, variable, interpolated, timestamp, file, object_info,
        uint32, uint64, web_page, dataframe, chart, folder, double.
      properties:
        bool:
          type: boolean
        bytes:
          contentEncoding: base64
          type: string
        chart:
          $ref: '#/components/schemas/data_type_Chart'
        dataframe:
          $ref: '#/components/schemas/data_type_Dataframe'
        double:
          type: number
        enumeration:
          $ref: '#/components/schemas/data_type_DataTypeMap'
        file:
          $ref: '#/components/schemas/data_type_File'
        float:
          type: number
        folder:
          $ref: '#/components/schemas/data_type_Folder'
        int32:
          type: integer
        int64:
          format: int64
          type:
            - string
            - integer
        interpolated:
          $ref: '#/components/schemas/data_type_InterpolatedString'
        map:
          $ref: '#/components/schemas/data_type_DataTypeMap'
        'null':
          $ref: '#/components/schemas/google_protobuf_Empty'
        object_info:
          $ref: '#/components/schemas/object_ObjectInfo'
        string:
          type: string
        timestamp:
          $ref: '#/components/schemas/google_protobuf_Timestamp'
        uint32:
          type: integer
        uint64:
          format: int64
          type:
            - string
            - integer
        variable:
          $ref: '#/components/schemas/data_type_Variable'
        vec:
          $ref: '#/components/schemas/data_type_DataTypeRepeated'
        web_page:
          $ref: '#/components/schemas/data_type_WebPage'
      type: object
    object_model_FieldOutcome:
      additionalProperties: false
      properties:
        outcome:
          description: >-
            `applied`; `kept` (the value the record holds rests on evidence that
            wins); `needs_person` (a person's value, which an automated write
            never replaces); `stale` (the value the write was relative to
            moved); or `unchanged` (the write was all or nothing, and another
            field lost).
          type: string
        reason:
          description: Why, in words for a person.
          type: string
        standing:
          allOf:
            - $ref: '#/components/schemas/object_model_EvidenceSummary'
          description: The evidence the field holds after the write.
      type: object
    google_protobuf_Timestamp:
      format: date-time
      type: string
    object_model_FigureCoverage:
      additionalProperties: false
      properties:
        included:
          description: Records the value is computed over.
          format: int64
          type:
            - string
            - integer
        subject_type_id:
          description: The type both count.
          type: string
        total:
          description: Records in scope.
          format: int64
          type:
            - string
            - integer
      type: object
    object_model_ValueSource:
      additionalProperties: false
      properties:
        kind:
          type: string
        verified:
          type: boolean
      type: object
    data_type_Chart:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/chart_ChartConfig'
        dataframe:
          $ref: '#/components/schemas/data_type_Dataframe'
      type: object
    data_type_Dataframe:
      additionalProperties: false
      description: >-
        Set exactly one of: object_info, sql, csv, json, md, rows,
        dataframe_file.
      properties:
        csv:
          type: string
        dataframe_file:
          $ref: '#/components/schemas/data_type_File'
        json:
          type: string
        md:
          type: string
        object_info:
          $ref: '#/components/schemas/object_ObjectInfo'
        rows:
          $ref: '#/components/schemas/data_type_Rows'
        sql:
          $ref: '#/components/schemas/data_type_DataframeSqlConnection'
      type: object
    data_type_DataTypeMap:
      additionalProperties: false
      properties:
        items:
          additionalProperties:
            $ref: '#/components/schemas/data_type_DataType'
          type: object
      type: object
    data_type_File:
      additionalProperties: false
      properties:
        id:
          description: 'A stored file''s id. An import does not read it: send `raw_bytes`.'
          type: string
        metadata:
          allOf:
            - $ref: '#/components/schemas/data_type_FileMetadata'
          description: >-
            The file's `name` and `mime_type`. An import reads the name: one
            ending in `.csv` is read as CSV.
        raw_bytes:
          contentEncoding: base64
          description: The file's bytes, base64-encoded.
          type: string
      type: object
    data_type_Folder:
      additionalProperties: false
      properties:
        children:
          $ref: '#/components/schemas/data_type_FolderItemRepeated'
        metadata:
          $ref: '#/components/schemas/data_type_FolderMetadata'
      type: object
    data_type_InterpolatedString:
      additionalProperties: false
      properties:
        parts:
          $ref: '#/components/schemas/data_type_DataTypeRepeated'
        sources:
          items:
            type: string
          type: array
      type: object
    object_ObjectInfo:
      additionalProperties: false
      properties:
        branch_id:
          type: string
        object_id:
          type: string
        object_type:
          enum:
            - Pipeline
            - KnowledgeBase
            - Document
            - Table
            - User
            - Organization
            - Subscription
            - Usage
            - InteractiveAgent
            - Automation
            - Chatbot
            - Evaluation
            - Form
            - Search
            - Transformation
            - File
            - Voicebot
            - BulkJob
            - Folder
            - Portal
            - integration
            - integration_item
            - Workbook
            - VariableSet
            - Evaluator
            - Agent
            - OrgMemberships
            - Marketplace
            - McpServer
            - Project
            - Session
            - SessionMessage
            - KnowledgeBaseItem
            - UserProject
            - Dashboard
            - Prompt
            - Memory
            - Verification
            - VerificationIssue
            - DataRoomTracker
            - Meeting
            - McpConnectorCredential
            - AgentTask
            - AgentTaskRun
            - AgentTaskInvocation
            - KnowledgeGraph
            - DealIntelligence
            - Group
            - Role
            - UsagePolicy
            - CustomObjectSchema
            - CustomObject
            - ObjectModel
            - ExternalSourceItem
            - ExternalContact
            - KnowledgeChannel
            - DefaultSet
            - Credential
          type: string
        state_id:
          type: string
        version:
          $ref: '#/components/schemas/object_ObjectVersion'
      type: object
    data_type_Variable:
      additionalProperties: false
      properties:
        scope:
          enum:
            - global
            - run
          type: string
        variable_id:
          type: string
        variable_set_id:
          type: string
      type: object
    data_type_DataTypeRepeated:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/data_type_DataType'
          type: array
      type: object
    data_type_WebPage:
      additionalProperties: false
      properties:
        page_content:
          type: string
        page_html:
          type: string
        page_urls:
          items:
            type: string
          type: array
        screenshot:
          contentEncoding: base64
          type: string
        url:
          type: string
      type: object
    object_model_EvidenceSummary:
      additionalProperties: false
      properties:
        actor:
          type: string
        as_of_ms:
          format: int64
          type:
            - string
            - integer
        by_person:
          type: boolean
        kind:
          type: string
        observation_id:
          type: string
        reference:
          type: string
        title:
          type: string
      type: object
    chart_ChartConfig:
      additionalProperties: false
      description: >-
        Set exactly one of: bar_chart, line_chart, pie_chart, scatter_chart,
        donut_chart, time_series_chart.
      properties:
        bar_chart:
          $ref: '#/components/schemas/chart_BarChartConfig'
        description:
          type: string
        donut_chart:
          $ref: '#/components/schemas/chart_DonutChartConfig'
        legend_orientation:
          enum:
            - Left
            - Right
            - Top
            - Bottom
            - Hidden
          type: string
        line_chart:
          $ref: '#/components/schemas/chart_LineChartConfig'
        pie_chart:
          $ref: '#/components/schemas/chart_PieChartConfig'
        scatter_chart:
          $ref: '#/components/schemas/chart_ScatterChartConfig'
        time_series_chart:
          $ref: '#/components/schemas/chart_TimeSeriesChartConfig'
        title:
          type: string
      type: object
    data_type_Rows:
      additionalProperties: false
      properties:
        column_order:
          items:
            type: string
          type: array
        items:
          items:
            $ref: '#/components/schemas/data_type_Row'
          type: array
      type: object
    data_type_DataframeSqlConnection:
      additionalProperties: false
      description: 'Set exactly one of: query, table_name.'
      properties:
        integration:
          $ref: '#/components/schemas/object_ObjectInfo'
        query:
          type: string
        table_name:
          type: string
      type: object
    data_type_FileMetadata:
      additionalProperties: false
      properties:
        content_hash:
          type: string
        created_timestamp:
          $ref: '#/components/schemas/google_protobuf_Timestamp'
        mime_type:
          type: string
        name:
          type: string
        path:
          type: string
        save_file_description:
          type: string
        save_file_send:
          type: boolean
        save_file_target_id:
          type: string
      type: object
    data_type_FolderItemRepeated:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/data_type_FolderItem'
          type: array
      type: object
    data_type_FolderMetadata:
      additionalProperties: false
      properties:
        name:
          type: string
        path:
          type: string
      type: object
    object_ObjectVersion:
      additionalProperties: false
      properties:
        major:
          type: integer
        minor:
          type: integer
        patch:
          type: integer
      type: object
    chart_BarChartConfig:
      additionalProperties: false
      properties:
        orientation:
          enum:
            - Horizontal
            - Vertical
          type: string
        show_record_count_on_chart:
          type: boolean
        x_axis:
          $ref: '#/components/schemas/chart_XAxisConfig'
        y_axis:
          $ref: '#/components/schemas/chart_YAxisConfig'
      type: object
    chart_DonutChartConfig:
      additionalProperties: false
      properties:
        categories:
          $ref: '#/components/schemas/chart_CategoriesConfig'
        color:
          type: string
        show_percentage_on_chart:
          type: boolean
        show_record_count_in_legend:
          type: boolean
        values:
          $ref: '#/components/schemas/chart_ValuesConfig'
      type: object
    chart_LineChartConfig:
      additionalProperties: false
      properties:
        plot_dots_on_lines:
          type: boolean
        show_record_count_on_chart:
          type: boolean
        smooth_lines:
          type: boolean
        start_at_zero:
          type: boolean
        x_axis:
          $ref: '#/components/schemas/chart_XAxisConfig'
        y_axis:
          $ref: '#/components/schemas/chart_YAxisConfig'
      type: object
    chart_PieChartConfig:
      additionalProperties: false
      properties:
        categories:
          $ref: '#/components/schemas/chart_CategoriesConfig'
        color:
          type: string
        show_percentage_on_chart:
          type: boolean
        show_record_count_in_legend:
          type: boolean
        values:
          $ref: '#/components/schemas/chart_ValuesConfig'
      type: object
    chart_ScatterChartConfig:
      additionalProperties: false
      properties:
        show_record_count_on_chart:
          type: boolean
        start_at_zero:
          type: boolean
        x_axis:
          $ref: '#/components/schemas/chart_XAxisConfig'
        y_axis:
          $ref: '#/components/schemas/chart_YAxisConfig'
      type: object
    chart_TimeSeriesChartConfig:
      additionalProperties: false
      properties:
        display_options:
          $ref: '#/components/schemas/chart_TimeSeriesDisplayOptions'
        series:
          items:
            $ref: '#/components/schemas/chart_TimeSeriesSeries'
          type: array
        x_axis_field:
          type: string
      type: object
    data_type_Row:
      additionalProperties: false
      properties:
        values:
          additionalProperties:
            $ref: '#/components/schemas/data_type_DataType'
          type: object
      type: object
    data_type_FolderItem:
      additionalProperties: false
      description: 'Set exactly one of: folder, file.'
      properties:
        file:
          $ref: '#/components/schemas/data_type_File'
        folder:
          $ref: '#/components/schemas/data_type_Folder'
      type: object
    chart_XAxisConfig:
      additionalProperties: false
      properties:
        field:
          type: string
        include_empty_records:
          type: boolean
        label:
          type: string
        sort_by:
          enum:
            - XAxis
            - YAxis
          type: string
        sort_order:
          enum:
            - Ascending
            - Descending
          type: string
      type: object
    chart_YAxisConfig:
      additionalProperties: false
      properties:
        fields:
          items:
            $ref: '#/components/schemas/chart_YAxisField'
          type: array
        value_label:
          type: string
      type: object
    chart_CategoriesConfig:
      additionalProperties: false
      properties:
        field:
          type: string
        legend_title:
          type: string
        order:
          enum:
            - Ascending
            - Descending
          type: string
      type: object
    chart_ValuesConfig:
      additionalProperties: false
      properties:
        aggregation:
          enum:
            - Distinct
            - Sum
            - Average
            - Median
            - Min
            - Max
            - Count
          type: string
        summary_field:
          type: string
        value_type:
          enum:
            - CountRecords
            - SummarizeField
          type: string
      type: object
    chart_TimeSeriesDisplayOptions:
      additionalProperties: false
      properties:
        currency_symbol:
          enum:
            - CURRENCY_SYMBOL_UNSPECIFIED
            - CURRENCY_SYMBOL_USD
            - CURRENCY_SYMBOL_EUR
            - CURRENCY_SYMBOL_GBP
            - CURRENCY_SYMBOL_JPY
          type: string
        default_time_period:
          enum:
            - TIME_PERIOD_UNSPECIFIED
            - TIME_PERIOD_1M
            - TIME_PERIOD_6M
            - TIME_PERIOD_YTD
            - TIME_PERIOD_1Y
            - TIME_PERIOD_5Y
            - TIME_PERIOD_MAX
          type: string
        number_format:
          enum:
            - NUMBER_FORMAT_UNSPECIFIED
            - NUMBER_FORMAT_CURRENCY
            - NUMBER_FORMAT_PERCENT
            - NUMBER_FORMAT_RATIO
            - NUMBER_FORMAT_NUMBER
          type: string
        show_percent_change:
          type: boolean
        unit_suffix:
          enum:
            - UNIT_SUFFIX_UNSPECIFIED
            - UNIT_SUFFIX_K
            - UNIT_SUFFIX_M
            - UNIT_SUFFIX_B
            - UNIT_SUFFIX_T
          type: string
      type: object
    chart_TimeSeriesSeries:
      additionalProperties: false
      properties:
        color:
          type: string
        field:
          type: string
        icon_url:
          type: string
        label:
          type: string
      type: object
    chart_YAxisField:
      additionalProperties: false
      properties:
        aggregation:
          enum:
            - Distinct
            - Sum
            - Average
            - Median
            - Min
            - Max
            - Count
          type: string
        color:
          type: string
        field:
          type: string
        label:
          type: string
      type: object
  securitySchemes:
    apiKey:
      description: >-
        An API key issued with object_model scopes: Authorization: Bearer sk_….
        The scopes: object_model:records:read, object_model:records:write,
        object_model:facts:read, object_model:facts:write,
        object_model:model:read, object_model:model:configure,
        object_model:actions:run, object_model:changes:read. An operation's
        `security` lists the scopes it needs; several entries mean any one of
        them will do. A person field (`ref(user)`, `ref_list(user)`) holds a
        user id: look people up by email or id with `GET /v1/users`, outside
        this API, with a key that also has `users:read`.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.