---
title: "Bounded company context for an agent"
method: GET
path: "/v1/companies/{id}/context"
tags: ["companies"]
---

# Bounded company context for an agent

`GET /v1/companies/{id}/context`

## Request

- Base URL: `https://api.indraft.io`
- URL: `https://api.indraft.io/v1/companies/{id}/context`
- Auth: HTTP bearer

One bounded view of a company: the record, its contacts, open opportunities, open tasks, and recent interactions. Each collection is capped and the response says whether the cap was reached.

## Path parameters

- `id` string, required

## Query parameters

- `interactions` integer: How many recent interactions to include in the brief. Bounded, and the answer says when the bound bit rather than implying it returned everything.
- `openTasks` integer: How many open tasks to include in the brief, bounded the same way.
- `openOpportunities` integer: How many open deals to include in the brief, bounded the same way.
- `relatedContacts` integer: How many of the account's contacts to include in the brief, bounded the same way.

## Response `200`

Success

- object
  - `company` object, required: The company record itself, with its custom values and tags.
    - `id` string, required
    - `name` string, required
    - `domain` string, required
    - `domainNormalized` string, required
    - `website` string, required
    - `industry` string, required
    - `lifecycle` object, required
      - `category` string, required
      - `label` string
    - `ownerActorId` string, required
    - `externalProvider` string, required
    - `externalId` string, required
    - `version` integer, required
    - `createdAt` string, required
    - `updatedAt` string, required
    - `archivedAt` string, required
  - `contacts` object[], required: People attached to this company, capped. Check `truncated.contacts`.
    - `id` string, required
    - `displayName` string, required
    - `primaryEmail` string, required
    - `emailNormalized` string, required
    - `phone` string, required
    - `phoneNormalized` string, required
    - `title` string, required
    - `companyName` string
    - `lifecycle` object, required
      - `category` string, required
      - `label` string
    - `ownerActorId` string, required
    - `externalProvider` string, required
    - `externalId` string, required
    - `version` integer, required
    - `createdAt` string, required
    - `updatedAt` string, required
    - `archivedAt` string, required
  - `openOpportunities` object[], required: Deals still open on this company, capped. Closed ones are not here.
    - `id` string, required
    - `name` string, required
    - `pipelineId` string, required
    - `stageId` string, required
    - `status` 'open' | 'won' | 'lost', required
    - `amountMinor` integer, required
    - `currency` string, required
    - `probabilityBps` integer, required
    - `expectedCloseDate` string, required
    - `companyName` string
    - `lastActor` object
      - `id` string, required
      - `kind` 'human' | 'agent' | 'api_token' | 'system', required
      - `label` string, required
    - `ownerActorId` string, required
    - `externalProvider` string, required
    - `externalId` string, required
    - `version` integer, required
    - `createdAt` string, required
    - `updatedAt` string, required
    - `archivedAt` string, required
  - `openTasks` object[], required: Work still outstanding on this company, capped. Done and cancelled are not here.
    - `id` string, required
    - `title` string, required
    - `status` 'open' | 'done' | 'cancelled', required
    - `assigneeActorId` string, required
    - `assignee` object
      - `id` string, required
      - `kind` 'human' | 'agent' | 'api_token' | 'system', required
      - `label` string, required
    - `dueAt` string, required
    - `priority` 'low' | 'normal' | 'high', required
    - `completedAt` string, required
    - `ownerActorId` string, required
    - `version` integer, required
    - `links` object[], required
      - `objectType` 'company' | 'contact' | 'opportunity', required
      - `objectId` string, required
    - `createdAt` string, required
    - `updatedAt` string, required
    - `archivedAt` string, required
  - `recentInteractions` object[], required: The most recent interactions, newest first, capped. Summaries and metadata only: this product never stores a message body or a transcript.
    - `id` string, required
    - `interactionType` 'email' | 'call' | 'meeting' | 'message' | 'note', required
    - `direction` 'inbound' | 'outbound' | 'internal', required
    - `subject` string, required
    - `summary` string, required
    - `assertionKind` 'observed' | 'inferred' | 'imported' | 'user_supplied', required
    - `occurredAt` string, required
    - `sourceId` string, required
    - `createdByActorId` string, required
    - `actor` object
      - `id` string, required
      - `kind` 'human' | 'agent' | 'api_token' | 'system', required
      - `label` string, required
    - `links` object[], required
      - `objectType` 'company' | 'contact' | 'opportunity', required
      - `objectId` string, required
    - `createdAt` string, required
  - `ownRecords` object[], required: Records of types THIS workspace defined that point at the company, grouped by type. Always present and empty when the workspace has modelled none, because absent and empty are different statements.
    - `typeKey` string, required
    - `displayName` string, required
    - `via` string, required
    - `items` object[], required
      - `id` string, required
      - `version` integer, required
      - `createdAt` string, required
      - `updatedAt` string, required
      - `archivedAt` string, required
      - `values` object, required
      - `links` object, required
      - `lastActor` object
        - `id` string, required
        - `kind` 'human' | 'agent' | 'api_token' | 'system', required
        - `label` string, required
      - `stage` object
        - `pipelineId` string, required
        - `stageId` string, required
        - `status` 'open' | 'won' | 'lost', required
    - `truncated` boolean, required
  - `standing` object, required: Per field: which kind of claim is standing on it, who asserted it, and when. This is the provenance the product is sold on, keyed by column name so it lines up with `changes`, `held[]` and the unconfirmed queue. `confirmed` means a person checked it and outranks everything an agent can assert; `inferred` is the weakest and is what an agent's own conclusion should carry. A write whose claim ranks below what is here is held rather than applied.
  - `limits` object, required: The cap applied to each collection above, so a caller can tell a short list from a truncated one without guessing.
    - `interactions` integer, required
    - `openTasks` integer, required
    - `openOpportunities` integer, required
    - `relatedContacts` integer, required
  - `truncated` object, required: Which collections hit their cap, keyed by name. True means there is more that is not here, so do not conclude from this response that a company has three contacts.
  - `requestId` string, required

## Other responses

- `401`: No credential, or one that has been revoked.
- `403`: Authenticated, and this capability is not held.
- `404`: No such record, or it belongs to another workspace.
- `422`: The request does not satisfy the schema on this page.
- `429`: Infrastructure protection tripped. This is not a product quota.
- `500`: A defect on our side. The hint says so, and carries an incident id.

---

[API](https://skmtc.dev/indraft/apis/indraft-api.md) · [All operations](https://skmtc.dev/indraft/apis/indraft-api/llms.txt) · [OpenAPI document](https://skmtc.dev/indraft/apis/indraft-api/revisions/d9bb05346d66?raw)
