Approve Comment

Approves a preview comment and adds it to the posting queue.

Endpoint

POST /api/products/{productId}/ai-comments/{commentId}/approve

Authentication

Requires API key authentication via Bearer token.

Authorization: Bearer sk_your_api_key

URL Parameters

ParameterTypeDescription
productIdstringYour product ID
commentIdstringThe comment ID to approve

Request Body

FieldTypeDefaultDescription
scheduleTypestringimmediateOne of: immediate, peak_hours, custom
customDateTimestring-ISO 8601 datetime (required if scheduleType is custom)

Schedule Types

  • immediate - Post as soon as possible
  • peak_hours - Post during peak Reddit hours (US timezone)
  • custom - Post at a specific time

Example Request

bash
curl -X POST https://www.replyagent.ai/api/products/prod_123/ai-comments/cm_abc123/approve \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "scheduleType": "peak_hours"
  }'

Success Response

Status: 200 OK

json
{
  "success": true,
  "message": "Comment approved for immediate posting",
  "comment": {
    "id": "cm_abc123...",
    "isApproved": true,
    "scheduleType": "immediate",
    "scheduledTime": null
  },
  "scheduledTime": null
}

Error Responses

400 Bad Request

json
{
  "error": "Comment not found or already processed",
  "success": false
}

401 Unauthorized

json
{
  "error": "Unauthorized"
}

403 Forbidden

json
{
  "error": "Insufficient credit balance. Please add credits to enable comment posting.",
  "success": false,
  "reason": "INSUFFICIENT_BALANCE",
  "redirectUrl": "/dashboard/billing"
}

404 Not Found

json
{
  "error": "Product not found"
}