Skip to main content
POST
/
annotations
/
suggest
JavaScript SDK
const data = {
  pageNumber: 7,
  textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },
  extractedText: 'i am your father',
};
const partial = {
  annotatedResourceType: 'file' as const,
  annotatedResourceId: 1,
  annotationType: 'documents.ExtractedText',
  creatingApp: 'integration-tests',
  creatingAppVersion: '0.0.1',
  creatingUser: 'integration-tests',
  data,
};

const created = await client.annotations.suggest([partial]);
{
  "items": [
    {
      "id": 4096,
      "createdTime": 1730204346000,
      "lastUpdatedTime": 1730204346000,
      "annotatedResourceType": "file",
      "annotatedResourceId": 1337,
      "annotationType": "pointcloud.BoundingVolume",
      "creatingApp": "cognite-vision",
      "creatingAppVersion": "1.2.1",
      "creatingUser": "john.doe@cognite.com",
      "data": {
        "assetRef": {
          "externalId": "abc"
        },
        "symbolRegion": {
          "xMin": 0.1,
          "xMax": 0.2,
          "yMin": 0.1,
          "yMax": 0.2
        },
        "textRegion": {
          "xMin": 0.2,
          "xMax": 0.3,
          "yMin": 0.2,
          "yMax": 0.3
        },
        "pageNumber": 43
      },
      "status": "approved"
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Body

application/json

A request for suggesting annotations, i.e., creating them with the "suggested" status

items
object[]
required

A list of annotations to suggest

Response

Successful creation

items
object[]
required

A list of annotations

Last modified on April 23, 2026