---
title: "/api/comments"
method: POST
path: "/api/comments"
---

# /api/comments

`POST /api/comments`

## Response `201`

Created

- object
  - `data` object, required
    - `id` integer, required
    - `uuid` string, uuid, required
    - `author_name` string, required
    - `author_email` string, email, required
    - `content` string, required
    - `body` string
    - `post_title` string
    - `status` 'pending' | 'approved' | 'spam' | 'trash', required
    - `ip_address` string
    - `user_agent` string
    - `is_approved` number
    - `post_id` integer
    - `user_id` integer
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `422` — Validation failed
- `500` — Server error

---

[API](https://skmtc.net/stacksjs/apis/stacks-api.md) · [All operations](https://skmtc.net/stacksjs/apis/stacks-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stacksjs/stacks-api/revisions/f48edd85a8b4/schema)
