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

# Upsert Event Label



## OpenAPI

````yaml /api-reference/openapi.json put /api/runtime-security/apps/{app_uuid}/labeling/events/{event_uuid}/label
openapi: 3.1.0
info:
  title: Blindsight API
  version: 0.1.0
  description: >-
    The full Blindsight REST surface, generated from the running application.
    Replace the server host with your own deployment.


    For the Runtime Security integration surface (scan, proxy, tool calls) see
    the Runtime Security spec, which is hand written and carries worked
    examples.
servers:
  - url: https://api.your-blindsight.com
    description: Your Blindsight deployment
security: []
paths:
  /api/runtime-security/apps/{app_uuid}/labeling/events/{event_uuid}/label:
    put:
      tags:
        - runtime-security-apps
      summary: Upsert Event Label
      operationId: >-
        upsert_event_label_api_runtime_security_apps__app_uuid__labeling_events__event_uuid__label_put
      parameters:
        - name: app_uuid
          in: path
          required: true
          schema:
            type: string
            title: App Uuid
        - name: event_uuid
          in: path
          required: true
          schema:
            type: string
            title: Event Uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventLabelWrite'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventLabelRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EventLabelWrite:
      properties:
        dimension:
          type: string
          enum:
            - injection
            - pii
          title: Dimension
        mark:
          type: string
          enum:
            - confirm
            - false_positive
            - missed_detection
            - relabel
          title: Mark
        given_label:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Given Label
        corrected_intent:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Corrected Intent
          description: Corrected attack intent (labels.INTENT_CLASSES).
        corrected_is_acting:
          anyOf:
            - type: string
              enum:
                - acting
                - framing
            - type: 'null'
          title: Corrected Is Acting
        corrected_pii_categories:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 32
            - type: 'null'
          title: Corrected Pii Categories
        note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Note
      additionalProperties: false
      type: object
      required:
        - dimension
        - mark
      title: EventLabelWrite
    EventLabelRead:
      properties:
        uuid:
          type: string
          title: Uuid
        event_id:
          type: integer
          title: Event Id
        dimension:
          type: string
          title: Dimension
        mark:
          type: string
          title: Mark
        predicted_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Predicted Label
        predicted_score:
          type: number
          title: Predicted Score
          default: 0
        given_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Given Label
        corrected_intent:
          anyOf:
            - type: string
            - type: 'null'
          title: Corrected Intent
        corrected_is_acting:
          anyOf:
            - type: string
            - type: 'null'
          title: Corrected Is Acting
        corrected_pii_categories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Corrected Pii Categories
        text_source:
          type: string
          title: Text Source
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        reviewer_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reviewer Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - uuid
        - event_id
        - dimension
        - mark
        - text_source
        - created_at
        - updated_at
      title: EventLabelRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````