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

# Get Note

> Returns a single note by ID.

**Required permission:** Permission depends on entity type:
- `events` → `claim.notes:read`
- `policies` → `policy.notes:read`
- `insureds` → `insured.notes:read`

**Privileged notes:** If the note is privileged, the API key must have `privileged_notes:read` permission to view it.




## OpenAPI

````yaml /openapi/generated-external-api.yaml get /api/external/companies/{companyId}/{entityType}/{entityId}/notes/{noteId}
openapi: 3.0.3
info:
  title: AI Insurance External API
  description: External API for AI Insurance platform
  version: 1.0.0
  contact:
    email: support@aiinsurance.io
servers:
  - url: https://app.aiinsurance.io
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/external/companies/{companyId}/{entityType}/{entityId}/notes/{noteId}:
    get:
      tags:
        - Notes
      summary: Get Note
      description: >
        Returns a single note by ID.


        **Required permission:** Permission depends on entity type:

        - `events` → `claim.notes:read`

        - `policies` → `policy.notes:read`

        - `insureds` → `insured.notes:read`


        **Privileged notes:** If the note is privileged, the API key must have
        `privileged_notes:read` permission to view it.
      operationId: getNote
      parameters:
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/entityType'
        - $ref: '#/components/parameters/entityId'
        - $ref: '#/components/parameters/noteId'
      responses:
        '200':
          description: Note details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Note'
              examples:
                success:
                  summary: Note retrieved
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440003
                    entityId: 550e8400-e29b-41d4-a716-446655440001
                    entityType: events
                    text: >-
                      Adjuster contacted claimant and scheduled inspection for
                      Monday.
                    author:
                      id: 550e8400-e29b-41d4-a716-446655440010
                      name: John Smith
                      email: john@example.com
                    authorName: John Smith
                    isPrivileged: false
                    createdAt: '2025-01-15T10:30:00.000Z'
                    updatedAt: null
                externalAuthor:
                  summary: Note with external author (no linked user)
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440004
                    entityId: 550e8400-e29b-41d4-a716-446655440001
                    entityType: events
                    text: Historical note imported from legacy system.
                    author: null
                    authorName: Jane Doe (External)
                    isPrivileged: false
                    createdAt: '2024-06-01T14:00:00.000Z'
                    updatedAt: null
        '400':
          description: Bad Request - Invalid path parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidEntityType:
                  summary: Invalid entity type
                  value:
                    error:
                      code: INVALID_ENTITY_TYPE
                      message: 'entityType must be one of: events, policies, insureds'
                invalidNoteId:
                  summary: Invalid note ID
                  value:
                    error:
                      code: NotUUID
                      message: 'noteId: Value is not a valid UUID'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Note not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                noteNotFound:
                  summary: Note not found
                  value:
                    error:
                      code: NOT_FOUND
                      message: Note not found
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
    entityType:
      name: entityType
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/NoteEntityType'
      description: The type of entity (events, policies, or insureds)
    entityId:
      name: entityId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: The ID of the entity
    noteId:
      name: noteId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Note identifier
  schemas:
    Note:
      type: object
      description: A note attached to an entity (event, policy, or insured)
      properties:
        id:
          type: string
          format: uuid
        entityId:
          type: string
          format: uuid
          description: The ID of the entity this note is attached to
        entityType:
          $ref: '#/components/schemas/NoteEntityType'
        text:
          type: string
          description: The note content
        author:
          allOf:
            - $ref: '#/components/schemas/NoteAuthor'
          nullable: true
          description: >-
            User details when the note has a linked user (null for notes created
            with authorName)
        authorName:
          type: string
          description: >-
            Display name for the author. Uses user's name if author is linked,
            otherwise the stored authorName, or "UNKNOWN" if neither.
        isPrivileged:
          type: boolean
          description: >-
            Whether this is a privileged note (only visible with
            privileged_notes:read permission)
        createdAt:
          type: string
          format: date-time
          description: When the note was created (ISO 8601)
        updatedAt:
          type: string
          format: date-time
          nullable: true
          description: When the note was last updated (ISO 8601), or null if never updated
    ErrorResponse:
      type: object
      description: Standard error response for all external API endpoints
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
              example: 'submissionId: Required field is missing'
            details:
              type: array
              description: Additional details for validation errors (field-level errors)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: The field that caused the error
                    example: submissionId
                  message:
                    type: string
                    description: Description of the field error
                    example: Required field is missing
    NoteEntityType:
      type: string
      description: The type of entity the note is attached to
      enum:
        - events
        - policies
        - insureds
    NoteAuthor:
      type: object
      description: >-
        The author of the note. When authorId was used, includes full user
        details. When authorName was used, only name is populated.
      nullable: true
      properties:
        id:
          type: string
          nullable: true
          description: User ID (null if authorName was used instead of authorId)
        name:
          type: string
          description: Author display name (user's name or the authorName value)
        email:
          type: string
          format: email
          nullable: true
          description: User email (null if authorName was used instead of authorId)
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: Authorization header is required
            bearerTokenNotAllowed:
              summary: Bearer token used instead of API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: External API endpoints require API key authentication
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientPermissions:
              summary: Insufficient permissions
              value:
                error:
                  code: FORBIDDEN
                  message: Insufficient permissions to perform this action
    InternalServerError:
      description: Internal Server Error - Unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                error:
                  code: INTERNAL_ERROR
                  message: An unexpected error occurred. Please try again later.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````