Scale Intelligence■ Docs
Docs / Reference / act: annotate

act: annotate.

An `Annotation` with the target *an entity* and the entity's id, from the web shell, the desktop shell, the agent or the API; in the side panel the same type travels inside the page's reading to the fact the person stated, a claim or a connection, by its id and kind (`UnitRef`)

Figure 1POST /v1/act/annotatespecified
CALLERyour app or an agentholds the keyAPI GATEWAY/v1/act/annotate4 headersCORE: ACTrung usergrant actRECORDreads or writesCARD, 200body UnitRefThe input is Annotation. Every response carries the contract's hash.flows forwardthe result
The caller sends Annotation to /v1/act/annotate. The platform returns a card whose body is UnitRef.
POST/v1/act/annotate

Annotate a subject. The call needs the user rung under a token with the act grant, and it is served by the platform.

The route takes Annotation and returns a card whose body is UnitRef.

Request body#

The request body is Annotation.

fieldtyperequirednote
targetone of the page | an item | a contact | a region | an entityyesan entity when the annotation is made on an entity’s page or by the agent, with the entity in subject
subjectidnothe entity the annotation is about when the target is an entity; absent on a page, whose subject the capture supplies
said_inone of the capture panel | the web shell | the desktop shell | the agent | the APInothe face the person said it in; absent means the capture panel
item_fieldtextnothe list field the item belongs to
item_keytextnothe item’s own id, or its index
contacttextnothe contact’s namespace and normalised value, joined by a bar
region_selectortextnoa selector path to the picked element
region_texttextnothe picked element’s visible text
kindone of a tag | a relation | a note | a rival | a fit | a membership | a kind of thingyesa rival marks the subject as competing with one of the tenant’s brands; a fit states it fits a kind of buyer; a membership places it in a facet, a vertical, a segment or a community; a kind of thing says what the subject is
registertextnothe place of the record the unit was found in (kinds of buyer, brands, offerings, facets, verticals, concepts, segments, communities, entities)
valuetextyesthe tag’s name, the relation’s kind of connection or the person’s own words for it, the note, or the kind of entity
entityidnothe unit of the record it points at; absent for a thing the record does not hold yet
entity_nametextnothe unit’s name, or the name of a new thing
entity_kindtextnothe unit’s kind, or the kind of entity the person set for a new thing
roletextnofor a relation: the role the page’s subject takes
stated_attimeyes

Response#

The route returns a card whose body is UnitRef. Every card ends with a foot that states the basis of each number, the scope of the call, and the time when the facts were true.

Headers#

headerrequiredmeaning
Scale-Scopeyesthe scope the call runs in: tenant/, then /brand/, then /strategy/
Scale-As-True-Onnothe date the facts must have been true on; defaults to now
Scale-As-Known-Onnothe date the facts must have been known on; defaults to now
Scale-Keynofor a change, the key made from the input; a repeat under the same key returns the unit held and writes nothing

A caller needs the user rung and a token with the act grant. The platform serves this route.

Example#

The example sends the smallest body that Annotation allows. The build validates it against the schema of Annotation.

Example
curl -X POST https://api.scaleintelligence.co/v1/act/annotate \
  -H "Scale-Key: $SCALE_KEY" -H "Scale-Scope: tenant/<id>" \
  -H "content-type: application/json" \
  -d '{ "target": "the page", "kind": "a tag", "value": "…", "stated_at": "…" }'
import { client } from "@scale/sdk";
const answer = await client.act.annotate({
    "target": "the page",
    "kind": "a tag",
    "value": "…",
    "stated_at": "…"
  });
// answer.body is a UnitRef. answer.foot holds the basis, the scope and the time.
import requests
answer = requests.post("https://api.scaleintelligence.co/v1/act/annotate",
    headers={"Scale-Key": KEY, "Scale-Scope": "tenant/<id>"},
    json={
      "target": "the page",
      "kind": "a tag",
      "value": "…",
      "stated_at": "…"
    }).json()
let answer: Card = client.post("https://api.scaleintelligence.co/v1/act/annotate")
    .header("Scale-Key", key).header("Scale-Scope", "tenant/<id>")
    .json(&Annotation { /* the fields of the page */ }).send().await?.json().await?;

MCP tool#

The MCP tool si.act.annotate takes the same input and returns the same card. The tool changes data and needs a grant. An MCP host that renders cards draws this card from ui://scale-intelligence/cards/UnitRef. The tool’s page describes it.

POST /v1/act/annotate
Scale-Scope: …
Scale-As-True-On: …
Scale-As-Known-On: …
Scale-Key: …
content-type: application/json

{
  "target": "the page",
  "kind": "a tag",
  "value": "…",
  "stated_at": "…"
}
Without a key, this page shows the request only. The request body is Annotation, and the route returns a card whose body is UnitRef.

Claims#

claimstateroute or tool
The platform serves the route /v1/act/annotate at contract 0476e35e6e275db5.target/v1/act/annotate