---
title: "Apply an AI suggestion to the content body"
method: POST
path: "/content/{id}/ai-comments/{commentId}/apply"
tags: ["Comments"]
---

# Apply an AI suggestion to the content body

`POST /content/{id}/ai-comments/{commentId}/apply`

## Request

- Base URL: `https://next.frase.io/api/v1`
- URL: `https://next.frase.io/api/v1/content/{id}/ai-comments/{commentId}/apply`
- Auth: API key in header `X-API-KEY`

Splices the AI comment's `suggested_text` into `content.body` at the comment's anchored selection, then marks the comment as resolved in a single transaction. Refuses to guess when the target text is missing or appears multiple times.

## Path parameters

- `id` string, uuid, required
- `commentId` string, uuid, required

## Response `200`

Suggestion applied. Content body updated and comment resolved.

- object
  - `data` object
    - `applied` true
    - `content_id` string, uuid
    - `comment_id` string, uuid
    - `word_count` integer, nullable
  - `request_id` string

## Other responses

- `400`: Comment is not an AI suggestion (missing `suggested_text`).
- `401`: Authentication failed
- `404`: Resource not found
- `409`: Target text is missing or ambiguous in the draft. Error `code` is one of `target_text_not_found`, `target_text_ambiguous`.
- `429`: Rate limit exceeded

---

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