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

# Edit a comment

> Edit a comment's body. Only Support Operator (USER) comments can be edited; system comments are immutable.



## OpenAPI

````yaml /api/specs/incident-management-api.json patch /incident-management/v1/incidents/{id}/comments/{commentId}
openapi: 3.0.0
info:
  title: Lynkwell API
  version: 1.377.0
  description: API Documentation for the Incident Management Service
servers:
  - url: https://api.lynkwell.com
security: []
tags: []
paths:
  /incident-management/v1/incidents/{id}/comments/{commentId}:
    patch:
      tags:
        - Incidents
      summary: Edit a comment
      description: >-
        Edit a comment's body. Only Support Operator (USER) comments can be
        edited; system comments are immutable.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: path
          name: commentId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditCommentParams'
      responses:
        '200':
          description: The updated comment.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/IncidentComment'
        '400':
          description: Bad Request (e.g. editing a system comment)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentBadRequestError'
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentUnauthorizedError'
        '403':
          description: Insufficient scope. The body is a plain-text message, not JSON.
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Comment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentNotFoundError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncidentInternalServerError'
      security:
        - oauth2:
            - write:incident
components:
  schemas:
    EditCommentParams:
      type: object
      description: >-
        Edit a comment's body. Only Support Operator (USER) comments can be
        edited.
      properties:
        content:
          type: string
          maxLength: 10000
        changedByUserId:
          type: string
          description: >-
            NetworkUser id of the acting Support Operator. Required on every
            write; attributes the change.
        networkId:
          type: string
          description: >-
            Network id. Required for machine (M2M) callers whose token carries
            no network claim; ignored when the token has one.
      required:
        - content
        - changedByUserId
    IncidentComment:
      type: object
      description: >-
        A comment on an incident. Visibility governs who is notified, not who
        can read it — every comment on this API is returned to callers with read
        access.
      properties:
        id:
          type: string
        networkId:
          type: string
        incidentId:
          type: string
        authorUserId:
          type: string
          description: NetworkUser id of the author; present only when authorType is USER.
        authorType:
          $ref: '#/components/schemas/ActorType'
        visibility:
          type: string
          description: >-
            INTERNAL comments notify the assignee only; EXTERNAL comments notify
            the network's recipients as well. Both are returned by the comments
            read.
          enum:
            - INTERNAL
            - EXTERNAL
        content:
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/IncidentCommentAttachment'
        mergedFromIncidentId:
          type: string
          description: >-
            The incident this row originally belonged to, when a merge moved it
            here. Absent on rows native to this incident.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        editedAt:
          type: string
          format: date-time
          description: Present only on an edited comment.
        editedByUserId:
          type: string
      required:
        - id
        - networkId
        - incidentId
        - authorType
        - visibility
        - content
        - attachments
        - createdAt
    IncidentBadRequestError:
      type: object
      description: The response body for a 400 request.
      properties:
        type:
          type: string
          enum:
            - BAD_REQUEST
        code:
          type: string
          description: >-
            A stable machine-readable error code identifying the specific
            validation failure.
        message:
          type: string
      required:
        - type
        - code
        - message
    IncidentUnauthorizedError:
      type: object
      description: The response body for a 401 request (missing or invalid token).
      properties:
        message:
          type: string
      required:
        - message
    IncidentNotFoundError:
      type: object
      description: The response body for a 404 request.
      properties:
        type:
          type: string
          enum:
            - NOT_FOUND
        code:
          type: string
        message:
          type: string
      required:
        - type
        - code
        - message
    IncidentInternalServerError:
      type: object
      description: The response body for a 500 request.
      properties:
        type:
          type: string
          enum:
            - INTERNAL_ERROR
        message:
          type: string
      required:
        - type
        - message
    ActorType:
      type: string
      description: >-
        Who performed an attributed action. USER = a person (their NetworkUser
        id is on the row). SYSTEM = an automated action by the platform (e.g. a
        trigger opening an incident, or auto-resolution). API is reserved and
        not currently produced.
      enum:
        - USER
        - SYSTEM
        - API
    IncidentCommentAttachment:
      type: object
      properties:
        id:
          type: string
        filename:
          type: string
        contentType:
          type: string
        sizeBytes:
          type: integer
        uploadedAt:
          type: string
          format: date-time
      required:
        - id
        - filename
        - contentType
        - sizeBytes
        - uploadedAt
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth2 Client Credentials Flow
      flows:
        clientCredentials:
          tokenUrl: https://lynkwell-prod.us.auth0.com/oauth/token
          scopes:
            read:asset: Retrieve assets
            write:asset: Create and update assets
            read:assetgroup: Retrieve asset groups
            write:assetgroup: Create and update asset groups
            read:assetstatus: Retrieve asset statuses
            read:chargingstationmodel: Retrieve charging station models
            write:chargingstationmodel: Create and update charging station models
            write:network: Create and update networks
            write:sitepartner: Create and update site partners
            read:sitepartner: Retrieve site partners
            write:sitepartneruser: Create and update site partner users
            read:sitepartneruser: Retrieve site partner users
            read:networkaccessprofile: Retrieve network access profiles
            write:paymentprofile: Create payment profile
            write:onboardinglink: Create an onboarding link
            read:invoice: Retrieve an invoice
            write:session: Create or update a session
            read:session: Retrieve a session
            write:ticket: Create a ticket
            write:verificationcode: Send and confirm verification codes
            write:driver: Create and update drivers
            read:driver: Retrieve drivers
            write:token: Create and update tokens
            read:token: Retrieve tokens
            read:tokenvalue: Retrieve token by ID including its value
            write:invitecode: Create and update invite codes
            write:invitation: Create and update invitations
            read:invitation: Retrieve invitations
            read:payment_terminals_payment: Read payments from payment terminal
            abort:session: Abruptly end session
            read:paymentprofile: Retrieve payment profile from payment terminal
            write:ocpp: Sends request over OCPP
            write:ocpp.raw_request: Sends raw request over OCPP
            write:notification.email: Create and update email
            read:invoiceitem: Retrieve invoice item
            read:subscription: Retrieve subscription
            write:plugandcharge_enrollment: Update Plug and Charge enrollment status
            write:projects: Create and update projects
            read:projects: Retrieve projects
            write:project_stations: Create and update project stations
            write:panel: Create and update panels.
            read:panel: Retrieve panels.
            write:webhooks: Create, update, and delete webhooks
            read:webhooks: Retrieve webhooks
            read:incident: Retrieve incidents and their sub-resources
            write:incident: Create, update, comment on, merge, split, and link incidents

````