---
title: "Create a comment"
method: POST
path: "/projects/{project_id}/faults/{fault_id}/comments"
tags: ["Comments"]
---

# Create a comment

`POST /projects/{project_id}/faults/{fault_id}/comments`

## Request

- Base URL: `https://app.honeybadger.io/v3`
- URL: `https://app.honeybadger.io/v3/projects/{project_id}/faults/{fault_id}/comments`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/honeybadger/apis/honeybadger-api/docs/projects/:project_id/faults/:fault_id/comments/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds a comment to a fault.

## Path parameters

- `project_id` string, required
- `fault_id` string, required

## Request body

- CommentInput: Writable comment attributes
  - `body` string, required: The comment text. `@mentions` notify the named project members.

## Response `201`

Comment created

- object
  - `data` Comment, required: A comment on a fault
    - `id` string, required
    - `fault_id` string, required: ID of the fault this comment belongs to
    - `author` object, nullable, required: Author of the comment
      - `id` string, nullable: ID of the author
      - `name` string, nullable: Name of the author
      - `email` string, nullable: Email of the author; null for authors known only by name, such as an account token or name-only feedback
    - `body` string, nullable, required: Comment body text
    - `source` string, required: Where the comment was made: `web`, `web-batch` (a bulk action in the web app), `api`, `email` (a reply to a notification email), `feedback` (a user feedback form) or `unknown`.
    - `event` string, nullable, required: Event type associated with the comment
    - `created_at` string, date-time, required: When the comment was created
    - `links` WebLinks, required: Links into the Honeybadger web UI
      - `web` string, uri, required: The resource's page in the Honeybadger web UI, as an absolute URL. Resources without a page, such as outages and deploys, don't have `links`. For a project provisioned through Heroku, error, notice and comment links go through Heroku's single sign-on.
  - `meta` ResponseMeta
    - `request_id` string: Unique identifier for the request, for correlating with support

## Other responses

- `400`: A query parameter is malformed or outside its allowed values. `error.details` names the parameter.
- `401`: The credential is missing, invalid, expired or revoked (`unauthorized`), or was sent in a way v3 doesn't accept (see the examples).
- `403`: The credential isn't allowed to do this. `error.code` says why. An account or project the credential doesn't cover is 404 `not_found`, not 403.
- `404`: Resource not found
- `422`: Validation error

---

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