### List AI Comments - Basic Request (Bash) Source: https://www.replyagent.ai/docs/api/list Demonstrates a basic GET request to retrieve AI-generated comments for a given product ID. It requires an API key for authentication. ```bash curl -X GET "https://www.replyagent.ai/api/products/prod_123/ai-comments" \ -H "Authorization: Bearer sk_your_api_key" ``` -------------------------------- ### Batch Import Reddit Posts/Comments (Bash) Source: https://www.replyagent.ai/docs/api/import This example demonstrates how to perform a batch import of multiple Reddit posts or comments using the ReplyAgent AI API. The bash script sends a single POST request with a JSON payload containing an array of import objects, allowing for both AI-generated and manual replies within the same request. ```bash curl -X POST https://www.replyagent.ai/api/products/prod_123/ai-comments/manual-import \ -H "Authorization: Bearer sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "imports": [ { "url": "https://www.reddit.com/r/SaaS/comments/abc123/post1/" }, { "url": "https://www.reddit.com/r/startups/comments/def456/post2/", "reply": "Custom reply for this one" } ] }' ``` -------------------------------- ### Get Comment Details Source: https://www.replyagent.ai/docs/api Retrieves detailed information about a specific comment. ```APIDOC ## GET /api/comment/{commentId} ### Description Get comment details. ### Method GET ### Endpoint `/api/comment/{commentId}` ### Parameters #### Path Parameters - **commentId** (string) - Required - The ID of the comment to retrieve. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the outcome of the operation. - **data** (object) - Contains the details of the comment. #### Response Example ```json { "success": true, "message": "Operation completed", "data": { "commentId": "comment123", "productId": "productXYZ", "text": "This is a sample comment.", "author": "User A", "createdAt": "2023-10-27T10:00:00Z", "status": "pending" } } ``` ``` -------------------------------- ### Search Comments by Keyword and Status (Bash) Source: https://www.replyagent.ai/docs/api/list This snippet demonstrates how to use the curl command to send a GET request to the ReplyAgent AI API to search for comments. It filters comments by the keyword 'pricing' and sets the status to 'preview'. Ensure you replace 'sk_your_api_key' with your actual API key. ```bash curl -X GET "https://www.replyagent.ai/api/products/prod_123/ai-comments?search=pricing&status=preview" \ -H "Authorization: Bearer sk_your_api_key" ``` -------------------------------- ### List AI Comments - 404 Not Found Error (JSON) Source: https://www.replyagent.ai/docs/api/list Example of an error response when the requested product ID does not exist. ```json { "error": "Product not found" } ``` -------------------------------- ### Import Reddit Posts/Comments via API (Bash) Source: https://www.replyagent.ai/docs/api/import This code snippet demonstrates how to import Reddit posts or comments using the ReplyAgent AI API. It shows how to make a POST request to the manual import endpoint, including the necessary Authorization header and a JSON payload containing the import details. This example focuses on an AI-generated reply. ```bash curl -X POST https://www.replyagent.ai/api/products/prod_123/ai-comments/manual-import \ -H "Authorization: Bearer sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "imports": [ { "url": "https://www.reddit.com/r/SaaS/comments/abc123/best_tools_for_startups/" } ] }' ``` -------------------------------- ### GET /products/{productId}/ai-comments Source: https://www.replyagent.ai/docs/api/list Searches for AI-generated comments related to a specific keyword and status within a given product. ```APIDOC ## GET /products/{productId}/ai-comments ### Description Searches for AI-generated comments related to a specific keyword and status within a given product. ### Method GET ### Endpoint /products/{productId}/ai-comments ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. #### Query Parameters - **search** (string) - Required - The keyword to search for within comments. - **status** (string) - Optional - The status of the comments to filter by (e.g., 'preview'). ### Request Example ```bash curl -X GET "https://www.replyagent.ai/api/products/prod_123/ai-comments?search=pricing&status=preview" \ -H "Authorization: Bearer sk_your_api_key" ``` ### Response #### Success Response (200) - **comments** (array) - A list of AI comments matching the search criteria. - **id** (string) - The unique identifier of the comment. - **content** (string) - The content of the comment. - **status** (string) - The status of the comment. #### Response Example ```json { "comments": [ { "id": "comment_abc", "content": "This pricing seems competitive.", "status": "preview" } ] } ``` ``` -------------------------------- ### Approve Comment API Request (Bash) Source: https://www.replyagent.ai/docs/api/approve Example of how to approve a comment using the ReplyAgent AI API via a cURL command. This demonstrates the POST request, endpoint, authentication header, and request body with schedule type. ```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" }' ``` -------------------------------- ### List AI Comments - Success Response (JSON) Source: https://www.replyagent.ai/docs/api/list Example of a successful response (200 OK) when retrieving AI-generated comments. It includes a list of comments and pagination details. ```json { "aiComments": [ { "id": "cm_abc123...", "productId": "prod_123", "postId": "post_456", "postTitle": "Best tools for SaaS startups?", "postUrl": "https://www.reddit.com/r/SaaS/comments/abc123/best_tools/", "subreddit": "SaaS", "postContent": "Looking for recommendations...", "suggestedReply": "I've been using MyProduct for this...", "isApproved": false, "isPosted": false, "isDeleted": false, "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z", "submittedAt": null, "commentId": null, "commentUrl": null, "redditAccount": null, "postMeta": { "upvotes": 45, "numComments": 23, "createdUtc": "2024-01-15T08:00:00.000Z", "source": "reddit" }, "extra": { "searchSource": "reddit" } } ], "availableExecutions": ["exec_001", "exec_002"], "pagination": { "page": 1, "pageSize": 5, "totalCount": 42, "totalPages": 9, "hasNext": true, "hasPrev": false } } ``` -------------------------------- ### List AI Comments - 401 Unauthorized Error (JSON) Source: https://www.replyagent.ai/docs/api/list Example of an error response when authentication fails due to an invalid or missing API key. ```json { "error": "Unauthorized" } ``` -------------------------------- ### List AI Comments - 403 Forbidden Error (JSON) Source: https://www.replyagent.ai/docs/api/list Example of an error response indicating that the authenticated user does not have permission to access comments for the specified product. ```json { "error": "Access denied to this product" } ``` -------------------------------- ### Approve Comment Error Responses (JSON) Source: https://www.replyagent.ai/docs/api/approve Examples of JSON error responses from the Approve Comment API, covering scenarios like bad requests, unauthorized access, insufficient balance, and not found errors. ```json { "error": "Comment not found or already processed", "success": false } ``` ```json { "error": "Unauthorized" } ``` ```json { "error": "Insufficient credit balance. Please add credits to enable comment posting.", "success": false, "reason": "INSUFFICIENT_BALANCE", "redirectUrl": "/dashboard/billing" } ``` ```json { "error": "Product not found" } ``` -------------------------------- ### POST /api/products/{productId}/ai-comments/manual-import Source: https://www.replyagent.ai/docs/api/import Imports Reddit posts or comments to generate AI replies or use custom text. Comments are created in a 'Preview' state and require subsequent approval. ```APIDOC ## POST /api/products/{productId}/ai-comments/manual-import ### Description Imports Reddit posts or comments to generate AI replies or use custom text. Comments are created in a 'Preview' state and require subsequent approval. ### Method POST ### Endpoint /api/products/{productId}/ai-comments/manual-import ### Parameters #### Path Parameters - **productId** (string) - Required - Your product ID #### Query Parameters None #### Request Body - **imports** (array) - Required - Array of import objects (max 10) - **url** (string) - Required - Reddit post or comment URL - **reply** (string) - Optional - Your custom reply text. If omitted, AI generates a reply. - **imageUrl** (string) - Optional - Image URL to include with the reply. - **accountStrategy** (string) - Conditional - Required if the post is your own. Values: `op` or `random`. ### Request Example ```json { "imports": [ { "url": "https://www.reddit.com/r/SaaS/comments/abc123/best_tools_for_startups/", "reply": "I have been using MyProduct for this exact use case. It handles X, Y, and Z really well." } ] } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A summary message of the import process. - **totalProcessed** (integer) - The total number of items processed. - **totalErrors** (integer) - The total number of items that resulted in an error. - **manualReplyCount** (integer) - The number of comments with manual replies. - **aiGeneratedCount** (integer) - The number of comments with AI-generated replies. - **results** (array) - An array of results for each processed item. - **success** (boolean) - Indicates if the specific item was processed successfully. - **commentId** (string) - The ID of the created comment. - **url** (string) - The original URL of the Reddit post or comment. - **subreddit** (string) - The subreddit where the comment was posted. - **aiGenerated** (boolean) - True if the reply was AI-generated, false otherwise. - **commentLength** (integer) - The length of the generated comment. - **errors** (array) - An array of errors if `totalErrors` > 0. - **url** (string) - The URL that caused the error. - **error** (string) - The error message. #### Response Example ```json { "success": true, "message": "Successfully imported 2 comment(s) (1 manual, 1 AI-generated)", "totalProcessed": 2, "totalErrors": 0, "manualReplyCount": 1, "aiGeneratedCount": 1, "results": [ { "success": true, "commentId": "cm_abc123...", "url": "https://www.reddit.com/r/SaaS/comments/abc123/post1/", "subreddit": "SaaS", "aiGenerated": true, "commentLength": 245 }, { "success": true, "commentId": "cm_def456...", "url": "https://www.reddit.com/r/startups/comments/def456/post2/", "subreddit": "startups", "aiGenerated": false, "commentLength": 89 } ] } ``` ### Error Responses #### 400 Bad Request - **error** (string) - "No imports provided. Please provide an array of { url, reply?, accountStrategy? }. " - **error** (string) - "Maximum 10 imports allowed per batch" - **error** (string) - "Invalid Reddit URLs: [list of invalid URLs]" #### 401 Unauthorized - **error** (string) - "Unauthorized" #### 403 Forbidden - **error** (string) - "Access denied to this product" #### 404 Not Found - **error** (string) - "Product not found" ### Credit Usage - AI-generated replies: 1 credit per import - Manual replies: No credit charged ``` -------------------------------- ### Import Reddit Posts and Create Comments Source: https://www.replyagent.ai/docs/api Imports Reddit posts and creates corresponding comments within the specified product. ```APIDOC ## POST /api/products/{productId}/ai-comments/manual-import ### Description Import Reddit posts and create comments. ### Method POST ### Endpoint `/api/products/{productId}/ai-comments/manual-import` ### Parameters #### Path Parameters - **productId** (string) - Required - The ID of the product to import comments into. #### Request Body - **redditPosts** (array) - Required - An array of Reddit post objects to import. - **url** (string) - Required - The URL of the Reddit post. - **subreddit** (string) - Required - The subreddit the post belongs to. ### Request Example ```json { "redditPosts": [ { "url": "https://www.reddit.com/r/example/comments/1abcde/example_post/", "subreddit": "example" } ] } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the outcome of the operation. - **data** (object) - Contains information about the imported comments. #### Response Example ```json { "success": true, "message": "Reddit posts imported successfully.", "data": { "importedCount": 1, "failedCount": 0 } } ``` ``` -------------------------------- ### Partial Success Response (JSON) Source: https://www.replyagent.ai/docs/api/import This JSON output illustrates a partial success scenario from the ReplyAgent AI manual import API. It shows that some imports were successful while others failed, providing details for the successful imports and listing the errors encountered for the failed ones. ```json { "success": true, "message": "Successfully imported 1 comment(s) (0 manual, 1 AI-generated)", "totalProcessed": 1, "totalErrors": 1, "results": [ { "success": true, "commentId": "cm_abc123...", "url": "https://www.reddit.com/r/SaaS/comments/abc123/post1/", "subreddit": "SaaS", "aiGenerated": true, "commentLength": 245 } ], "errors": [ { "url": "https://www.reddit.com/r/invalid/comments/xyz/", "error": "Failed to fetch Reddit data" } ] } ``` -------------------------------- ### Import Reddit Posts/Comments with Manual Reply (Bash) Source: https://www.replyagent.ai/docs/api/import This bash script illustrates how to use the ReplyAgent AI API to import Reddit content and provide a custom reply. It sends a POST request to the manual import endpoint with a JSON body that includes a specific reply text, bypassing AI generation for that import. ```bash curl -X POST https://www.replyagent.ai/api/products/prod_123/ai-comments/manual-import \ -H "Authorization: Bearer sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "imports": [ { "url": "https://www.reddit.com/r/SaaS/comments/abc123/best_tools_for_startups/", "reply": "I have been using MyProduct for this exact use case. It handles X, Y, and Z really well." } ] }' ``` -------------------------------- ### POST /api/products/{productId}/ai-comments/{commentId}/approve Source: https://www.replyagent.ai/docs/api/import Approves an AI-generated comment, scheduling it for posting based on the specified schedule type. ```APIDOC ## POST /api/products/{productId}/ai-comments/{commentId}/approve ### Description Approves an AI-generated comment, scheduling it for posting based on the specified schedule type. After importing, comments are in a 'Preview' state and require approval to be published. ### Method POST ### Endpoint `/api/products/{productId}/ai-comments/{commentId}/approve` ### Parameters #### Path Parameters - **productId** (string) - Required - The ID of the product associated with the comment. - **commentId** (string) - Required - The ID of the AI-generated comment to approve. #### Query Parameters None #### Request Body - **scheduleType** (string) - Required - Specifies when the comment should be posted. Accepted values: "immediate". ### Request Example ```json { "scheduleType": "immediate" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the approval operation. - **message** (string) - A confirmation message. #### Response Example ```json { "status": "approved", "message": "Comment scheduled for immediate posting." } ``` ``` -------------------------------- ### Approve Comment using ReplyAgent AI API (Bash) Source: https://www.replyagent.ai/docs/api/import This snippet demonstrates how to approve a comment using the ReplyAgent AI API. It requires the `commentId` obtained after importing comments and an API key for authentication. The request body specifies the scheduling type, such as 'immediate'. ```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": "immediate"}' ``` -------------------------------- ### Use Case: Sync Posted Comments (Bash) Source: https://www.replyagent.ai/docs/api/list Fetches all successfully posted comments for a product, typically used for syncing data with external systems or analytics platforms. It sets a higher page size to retrieve as many comments as possible in one request. ```bash curl -X GET "https://www.replyagent.ai/api/products/prod_123/ai-comments?status=posted&pageSize=100" \ -H "Authorization: Bearer sk_your_api_key" ``` -------------------------------- ### Import Comment API Source: https://www.replyagent.ai/docs/index Imports Reddit posts or comments to create preview comments within ReplyAgent. These comments are initially in a 'Preview' state, awaiting AI generation or manual input for replies. ```APIDOC ## POST /api/products/{productId}/ai-comments/manual-import ### Description Imports Reddit posts/comments and creates preview comments. ### Method POST ### Endpoint /api/products/{productId}/ai-comments/manual-import ### Parameters #### Path Parameters - **productId** (string) - Required - The ID of the product to import comments for. #### Query Parameters None #### Request Body - **imports** (array) - Required - A list of import objects. - **url** (string) - Required - The URL of the Reddit post or comment to import. ### Request Example ```json { "imports": [ {"url": "https://www.reddit.com/r/SaaS/comments/abc123/best_tools/"} ] } ``` ### Response #### Success Response (200) - **commentId** (string) - The ID of the created preview comment. #### Response Example ```json { "commentId": "cm_abc123" } ``` ``` -------------------------------- ### Find Product ID from URL Source: https://www.replyagent.ai/docs/index Demonstrates how to extract the Product ID from a given URL. The Product ID is a unique identifier for your product within the ReplyAgent dashboard and is required for API calls. ```text https://www.replyagent.ai/dashboard/products/cm5abc123xyz/setup Your Product ID is `cm5abc123xyz`. ``` -------------------------------- ### Authenticate API Requests with Bearer Token Source: https://www.replyagent.ai/docs/index All API requests must be authenticated using an API key. The key should be included in the `Authorization` header as a Bearer token. ```http Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` -------------------------------- ### List Comments Source: https://www.replyagent.ai/docs/api Lists comments for a specific product with filtering and pagination capabilities. ```APIDOC ## GET /api/products/{productId}/ai-comments ### Description Lists comments with filtering and pagination. ### Method GET ### Endpoint `/api/products/{productId}/ai-comments` ### Parameters #### Path Parameters - **productId** (string) - Required - The ID of the product to list comments for. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the outcome of the operation. - **data** (object) - Contains the list of comments and pagination details. #### Response Example ```json { "success": true, "message": "Operation completed", "data": { "comments": [ { "commentId": "comment123", "text": "This is a sample comment.", "author": "User A", "createdAt": "2023-10-27T10:00:00Z" } ], "pagination": { "currentPage": 1, "totalPages": 5, "pageSize": 10 } } } ``` ``` -------------------------------- ### Import Reddit Post/Comment using cURL Source: https://www.replyagent.ai/docs/index Imports a Reddit post or comment into ReplyAgent for AI reply generation or manual input. This uses the `manual-import` endpoint and requires the Product ID and API key for authentication. ```bash curl -X POST https://www.replyagent.ai/api/products/prod_123/ai-comments/manual-import \ -H "Authorization: Bearer sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "imports": [ {"url": "https://www.reddit.com/r/SaaS/comments/abc123/best_tools/"} ] }' ``` -------------------------------- ### Approve Comment for Posting using cURL Source: https://www.replyagent.ai/docs/index Approves a previously imported comment (in preview state) for immediate posting. This requires the `commentId` obtained from the import step and your API key. ```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": "immediate"}' ``` -------------------------------- ### List AI Comments - With Search (Bash) Source: https://www.replyagent.ai/docs/api/list Illustrates how to search for AI-generated comments based on keywords present in the post title, content, or reply. This helps in finding specific comments quickly. ```bash curl -X GET "https://www.replyagent.ai/api/products/prod_123/ai-comments?status=preview&search=startup" \ -H "Authorization: Bearer sk_your_api_key" ``` -------------------------------- ### Use Case: Monitor Pending Queue (Bash) Source: https://www.replyagent.ai/docs/api/list Retrieves comments that are in the 'queue' status, meaning they have been approved and are waiting to be posted. This is useful for monitoring the status of comments before they go live. ```bash curl -X GET "https://www.replyagent.ai/api/products/prod_123/ai-comments?status=queue" \ -H "Authorization: Bearer sk_your_api_key" ``` -------------------------------- ### Approve Comment for Posting Source: https://www.replyagent.ai/docs/api Approves a specific comment, marking it as ready for posting. ```APIDOC ## POST /api/products/{productId}/ai-comments/{commentId}/approve ### Description Approve a comment for posting. ### Method POST ### Endpoint `/api/products/{productId}/ai-comments/{commentId}/approve` ### Parameters #### Path Parameters - **productId** (string) - Required - The ID of the product associated with the comment. - **commentId** (string) - Required - The ID of the comment to approve. ### Request Example (No request body for this endpoint) ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the outcome of the operation. - **data** (object) - Contains details of the approved comment. #### Response Example ```json { "success": true, "message": "Comment approved successfully.", "data": { "commentId": "comment123", "status": "approved" } } ``` ``` -------------------------------- ### Error Response: Bad Request (No Imports) (JSON) Source: https://www.replyagent.ai/docs/api/import This JSON response indicates a '400 Bad Request' error from the ReplyAgent AI API, specifically when no import data is provided in the request body. It clearly states the expected format for the imports array. ```json { "error": "No imports provided. Please provide an array of { url, reply?, accountStrategy? }. " } ``` -------------------------------- ### POST /api/products/{productId}/ai-comments/{commentId}/approve Source: https://www.replyagent.ai/docs/api/approve Approves a preview comment and adds it to the posting queue. You can specify the scheduling type for when the comment should be posted. ```APIDOC ## POST /api/products/{productId}/ai-comments/{commentId}/approve ### Description Approves a preview comment and adds it to the posting queue. You can specify the scheduling type for when the comment should be posted. ### Method POST ### Endpoint /api/products/{productId}/ai-comments/{commentId}/approve ### Parameters #### Path Parameters - **productId** (string) - Required - Your product ID - **commentId** (string) - Required - The comment ID to approve #### Query Parameters None #### Request Body - **scheduleType** (string) - Optional - Default: `immediate`. One of: `immediate`, `peak_hours`, `custom`. - **customDateTime** (string) - Required if `scheduleType` is `custom` - ISO 8601 datetime. ### Schedule Types * **immediate** - Post as soon as possible * **peak_hours** - Post during peak Reddit hours (US timezone) * **custom** - Post at a specific time ### Request Example ```json { "scheduleType": "peak_hours" } ``` ### Response #### Success Response (200 OK) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the result of the operation. - **comment** (object) - Details of the approved comment. - **id** (string) - The ID of the comment. - **isApproved** (boolean) - Whether the comment is approved. - **scheduleType** (string) - The scheduling type used. - **scheduledTime** (string|null) - The time the comment is scheduled to be posted. - **scheduledTime** (string|null) - The time the comment is scheduled to be posted. #### Response Example ```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**: Returned if the comment is not found or has already been processed. ```json { "error": "Comment not found or already processed", "success": false } ``` - **401 Unauthorized**: Returned if the API key is invalid or missing. ```json { "error": "Unauthorized" } ``` - **403 Forbidden**: Returned if the user has insufficient credits. ```json { "error": "Insufficient credit balance. Please add credits to enable comment posting.", "success": false, "reason": "INSUFFICIENT_BALANCE", "redirectUrl": "/dashboard/billing" } ``` - **404 Not Found**: Returned if the product is not found. ```json { "error": "Product not found" } ``` ``` -------------------------------- ### List AI Comments - With Filters (Bash) Source: https://www.replyagent.ai/docs/api/list Shows how to filter AI-generated comments by status, page number, and items per page. This is useful for paginating through results or focusing on specific comment statuses. ```bash curl -X GET "https://www.replyagent.ai/api/products/prod_123/ai-comments?status=posted&page=1&pageSize=20" \ -H "Authorization: Bearer sk_your_api_key" ``` -------------------------------- ### Approve Comment API Source: https://www.replyagent.ai/docs/index Approves a preview comment, identified by its `commentId`, for posting. This action can schedule the comment for immediate posting or a future time. ```APIDOC ## POST /api/products/{productId}/ai-comments/{commentId}/approve ### Description Approves a preview comment for posting. ### Method POST ### Endpoint /api/products/{productId}/ai-comments/{commentId}/approve ### Parameters #### Path Parameters - **productId** (string) - Required - The ID of the product associated with the comment. - **commentId** (string) - Required - The ID of the preview comment to approve. #### Query Parameters None #### Request Body - **scheduleType** (string) - Required - The type of scheduling for the post. Accepted values: "immediate", "scheduled". - **scheduledTime** (string) - Optional - The ISO 8601 formatted date and time for scheduled posts. ### Request Example ```json { "scheduleType": "immediate" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the comment has been approved. #### Response Example ```json { "message": "Comment approved for posting." } ``` ``` -------------------------------- ### Error Response: Bad Request (Max Imports Exceeded) (JSON) Source: https://www.replyagent.ai/docs/api/import This JSON output shows a '400 Bad Request' error from the ReplyAgent AI API, triggered when the number of import items in a single request exceeds the maximum limit of 10. ```json { "error": "Maximum 10 imports allowed per batch" } ``` -------------------------------- ### Error Response: Bad Request (Invalid URLs) (JSON) Source: https://www.replyagent.ai/docs/api/import This JSON response signifies a '400 Bad Request' error from the ReplyAgent AI API, occurring when one or more of the provided URLs in the import request are invalid or cannot be processed. ```json { "error": "Invalid Reddit URLs: https://invalid-url.com" } ``` -------------------------------- ### Set Base URL for ReplyAgent API Source: https://www.replyagent.ai/docs/index The base URL for all ReplyAgent API requests. This is the primary endpoint for interacting with the API services. ```text https://www.replyagent.ai ``` -------------------------------- ### Successful Import Response (JSON) Source: https://www.replyagent.ai/docs/api/import This JSON structure represents a successful response from the ReplyAgent AI manual import API. It indicates the total number of processed and successful imports, counts of manual and AI-generated replies, and detailed results for each processed item, including comment IDs and URLs. ```json { "success": true, "message": "Successfully imported 2 comment(s) (1 manual, 1 AI-generated)", "totalProcessed": 2, "totalErrors": 0, "manualReplyCount": 1, "aiGeneratedCount": 1, "results": [ { "success": true, "commentId": "cm_abc123...", "url": "https://www.reddit.com/r/SaaS/comments/abc123/post1/", "subreddit": "SaaS", "aiGenerated": true, "commentLength": 245 }, { "success": true, "commentId": "cm_def456...", "url": "https://www.reddit.com/r/startups/comments/def456/post2/", "subreddit": "startups", "aiGenerated": false, "commentLength": 89 } ] } ``` -------------------------------- ### Common API Error Response Format (JSON) Source: https://www.replyagent.ai/docs/api This JSON structure details an error response from the API. It contains an 'error' string with the error message and a 'success' boolean set to false. This format helps in identifying and handling API errors. ```json { "error": "Error message", "success": false } ``` -------------------------------- ### Common API Response Format (JSON) Source: https://www.replyagent.ai/docs/api This JSON structure represents a successful API response. It includes a 'success' boolean, a 'message' string, and a 'data' object containing the actual payload. This format is consistent across most ReplyAgent AI API endpoints. ```json { "success": true, "message": "Operation completed", "data": { ... } } ``` -------------------------------- ### Approve Comment Success Response (JSON) Source: https://www.replyagent.ai/docs/api/approve The JSON structure returned upon successful approval of a comment. It includes a success flag, a message, and details about the approved comment and its scheduled time. ```json { "success": true, "message": "Comment approved for immediate posting", "comment": { "id": "cm_abc123...", "isApproved": true, "scheduleType": "immediate", "scheduledTime": null }, "scheduledTime": null } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.