---
updatedAt: 2026-01-28T20:52:08.000Z
agentTools:
  projectIndex: https://developer.vyasa.com/llms.txt
---

# Add an annotation to a document

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Layar API Documentation",
    "version": "v1.927.2",
    "contact": {
      "name": "Certara AI Support",
      "email": "AI-Support@Certara.com",
      "url": "https://vyasa.readme.io/"
    }
  },
  "servers": [
    {
      "url": "BASE_PATH"
    }
  ],
  "paths": {
    "/layar/sourceDocument/{id}/addAnnotation": {
      "post": {
        "operationId": "addAnnotation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "sourceId": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string"
                  },
                  "valueString": {
                    "type": "string"
                  },
                  "valueDouble": {
                    "format": "float",
                    "type": "number"
                  },
                  "valueBoolean": {
                    "type": "boolean"
                  },
                  "valueInteger": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "valueDate": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "valueType": {
                    "enum": [
                      "STRING",
                      "BOOLEAN",
                      "INTEGER",
                      "LONG",
                      "DOUBLE",
                      "DATE"
                    ],
                    "type": "string"
                  }
                },
                "title": "Annotation",
                "type": "object",
                "required": [
                  "key",
                  "valueType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Add an annotation to a document",
        "tags": [
          "sourceDocument"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "Documents",
      "name": "sourceDocument"
    }
  ],
  "components": {
    "securitySchemes": {
      "oAuth2ClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "CONNECT_API_URL/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "oAuth2ClientCredentials": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```