---
title: "Mark a comment as guidance"
method: PATCH
path: "/v1/issues/{idOrNumber}/comments/{commentId}"
tags: ["Issues"]
---

# Mark a comment as guidance

`PATCH /v1/issues/{idOrNumber}/comments/{commentId}`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/issues/{idOrNumber}/comments/{commentId}`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Makes a person's comment guidance, advice agents weigh, or stops it being guidance. People only; an agent's comment can never be guidance.

## Path parameters

- `idOrNumber` string, required
- `commentId` string, required

## Request body

- SetCommentGuidanceRequest: Makes a person's comment guidance, or stops it being guidance; people only.
  - `guidance` boolean, required: Whether the comment is guidance, which agents weigh as advice.

## Response `200`

Comment updated

- IssueComment: A comment on an issue. A guidance comment, which only people write, is advice every later investigation on the issue's entities weighs; any other comment is a plain note.
  - `author` IssueActor: Who made a change to an issue. An agent is named by its own id and the investigation it acted in, never by the service account it authenticated as, since several agents may share one.
    - `agentId` string: The agent, for an agent actor; null otherwise.
    - `id` string: The person's user id, the agent's execution principal (its service account's token subject), or `system` for the server.
    - `investigationId` string: The investigation the agent acted in, for an agent actor; null otherwise.
    - `kind` 'PERSON' | 'AGENT' | 'SYSTEM': A person, an agent, or the server.
  - `body` string: The markdown body.
  - `channel` 'REST' | 'MCP' | 'SYSTEM': How a change reached the server.
  - `createdAt` string, date-time: When it was written.
  - `editedAt` string, date-time: When its author last changed the body, or null.
  - `guidance` boolean: Whether it is guidance, which agents weigh as advice.
  - `guidanceSetAt` string, date-time: When it was marked guidance, or null.
  - `guidanceSetBy` string: The user id of the person who marked it guidance, or null.
  - `id` string: The comment id.
  - `issueId` string: The issue it is on.
  - `lockedFieldProposal` string: The locked field the comment proposes changing, as named in a `FIELD_LOCKED` error (`priority`, `label:cost`), or null.

## Other responses

- `400`: The comment is an agent's
- `401`: Unauthorized
- `403`: Not a person, or no permission to edit the issue
- `404`: Issue or comment not found

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
