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

# Resolve or reopen a signal

> Resolve or reopen a signal. Dismissing is not possible here.

Requires MEMBER role or higher in the project's workspace (the write
service decides). Resolving needs a ``reason``; the reason ``other`` also
needs a ``note``. A resolved signal opens again by itself when its
detector finds the problem in a trace that started after the resolve. Send
``expected_status`` to refuse the change when someone else changed the
status first. Setting the status the signal already has changes nothing.

Args:
    request (Request): Incoming request (rate-limit plumbing).
    response (Response): Outgoing response (rate-limit plumbing).
    auth (AccountStampedAuth): Account-scope user auth (session token or
        CLI access JWT); its resolved ``user_id`` becomes the actor.
    signal_id (str): The signal to change.
    payload (SignalStatusRequest): The project, the target status, and
        the reason, note and expected status.
    _live (None): Write-path liveness gate (blocks a revoked JWT session).

Returns:
    SignalStatusResponse: The signal with its new status.

Raises:
    HTTPException: The write service's 400/403/404/409 verbatim, or a
        503 when its response is ambiguous.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/public/signals/{signal_id}/status
openapi: 3.1.0
info:
  title: TraceRoot Public API
  version: 0.1.0
servers:
  - description: TraceRoot Cloud
    url: https://app.traceroot.ai
  - description: Self-hosted
    url: '{baseUrl}'
    variables:
      baseUrl:
        default: http://localhost:8000
        description: Your TraceRoot backend URL
security: []
paths:
  /api/v1/public/signals/{signal_id}/status:
    patch:
      tags:
        - Signals
      summary: Resolve or reopen a signal
      description: >-
        Resolve or reopen a signal. Dismissing is not possible here.


        Requires MEMBER role or higher in the project's workspace (the write

        service decides). Resolving needs a ``reason``; the reason ``other``
        also

        needs a ``note``. A resolved signal opens again by itself when its

        detector finds the problem in a trace that started after the resolve.
        Send

        ``expected_status`` to refuse the change when someone else changed the

        status first. Setting the status the signal already has changes nothing.


        Args:
            request (Request): Incoming request (rate-limit plumbing).
            response (Response): Outgoing response (rate-limit plumbing).
            auth (AccountStampedAuth): Account-scope user auth (session token or
                CLI access JWT); its resolved ``user_id`` becomes the actor.
            signal_id (str): The signal to change.
            payload (SignalStatusRequest): The project, the target status, and
                the reason, note and expected status.
            _live (None): Write-path liveness gate (blocks a revoked JWT session).

        Returns:
            SignalStatusResponse: The signal with its new status.

        Raises:
            HTTPException: The write service's 400/403/404/409 verbatim, or a
                503 when its response is ambiguous.
      operationId: set_signal_status
      parameters:
        - in: path
          name: signal_id
          required: true
          schema:
            title: Signal Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignalStatusRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignalStatusResponse'
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication failed or session revoked
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Insufficient role or wrong credential kind
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            The status changed since the caller read it, or the signal was
            merged
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Write service unavailable
      security:
        - BearerAuth: []
components:
  schemas:
    SignalStatusRequest:
      additionalProperties: false
      description: >-
        Body for resolving or reopening a signal.


        Only ``resolved`` and ``open`` are settable here. A dismissed signal
        never

        reopens on a new finding, so dismissing stays a decision a person makes
        in

        the web app. Resolving needs a ``reason``; the reason ``other`` also
        needs

        a ``note``. The write service is the single validator of those rules.
      properties:
        expected_status:
          description: >-
            The status the caller last read. When the signal's current status
            differs, nothing is written and the answer is a 409.
          enum:
            - open
            - resolved
            - dismissed
          title: Expected Status
          type: string
        note:
          description: A free-text note; required when reason is "other"
          maxLength: 4000
          title: Note
          type: string
        project_id:
          title: Project Id
          type: string
        reason:
          description: Why the signal is resolved; required when status is "resolved"
          enum:
            - fixed_elsewhere
            - fixed_by_pr
            - already_fixed_before
            - other
          title: Reason
          type: string
        status:
          enum:
            - resolved
            - open
          title: Status
          type: string
      required:
        - project_id
        - status
      title: SignalStatusRequest
      type: object
    SignalStatusResponse:
      description: >-
        The signal after the write. ``changed`` is empty when it already had
        that status.
      properties:
        changed:
          items:
            type: string
          title: Changed
          type: array
        signal:
          $ref: '#/components/schemas/SignalStatusRow'
        updated:
          title: Updated
          type: boolean
      required:
        - updated
        - changed
        - signal
      title: SignalStatusResponse
      type: object
    ErrorResponse:
      description: >-
        The canonical public error envelope (matches the gateway's normalized
        shape).
      properties:
        detail:
          title: Detail
          type: string
      required:
        - detail
      title: ErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SignalStatusRow:
      description: A signal as the status write returns it.
      properties:
        detector_id:
          title: Detector Id
          type: string
        project_id:
          title: Project Id
          type: string
        reopen_count:
          title: Reopen Count
          type: integer
        resolved_at:
          anyOf:
            - type: string
            - type: 'null'
          format: date-time
          title: Resolved At
        signal_id:
          title: Signal Id
          type: string
        status:
          enum:
            - open
            - resolved
            - dismissed
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - signal_id
        - project_id
        - detector_id
        - title
        - status
        - resolved_at
        - reopen_count
      title: SignalStatusRow
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.