
REST APIEngagement Service
Reddit Engagement API
API for tracking Reddit posts and comments for brand engagement. Used by engagement services to monitor and manage Reddit presence for brand visibility.
Authentication
Engagement Service API Key
Pass your API key in the X-API-Key header:
X-API-Key: $ENGAGEMENT_SERVICE_TOKEN
API Key Restrictions:
- Write-only access (POST) - no read or delete operations
- Restricted to specific brands:
chatslide,klarity - Rate limit: 60 requests per minute
Reddit Posts API
POST
/api2/reddit-postsCreate or update Reddit posts (upsert by reddit_post_id).
Request Body
Single post object or array of posts:
| Field | Type | Required | Description |
|---|---|---|---|
reddit_post_id | string | Yes | Reddit post ID |
brand | string | Yes | Brand name (normalized to lowercase) |
title | string | No | Post title |
body | string | No | Post content (selftext) |
subreddit | string | No | Subreddit name |
url | string | No | Post URL or permalink |
author | string | No | Author username |
created_utc | datetime | No | Post creation time |
suggested_comment | object | No | Brand-keyed suggested comments |
archived | boolean | No | Whether post is archived |
locked | boolean | No | Whether post is locked |
is_potential | boolean | No | If true, add to potential_brands instead of brands |
Example Request
curl -X POST https://enception.ai/api2/reddit-posts \
-H "X-API-Key: $ENGAGEMENT_SERVICE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reddit_post_id": "abc123",
"brand": "chatslide",
"title": "Best AI presentation tools 2024",
"subreddit": "productivity",
"url": "https://reddit.com/r/productivity/comments/abc123/title"
}'Response (201 Created)
{
"data": [{ ... }],
"count": 1
}Behavior: If post already exists (by ID), it updates and merges the brands arrays. Multiple posts can be submitted in a single array.
Reddit Comments API
POST
/api2/reddit-commentsCreate or update Reddit comments (upsert by reddit_comment_id).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
reddit_comment_id | string | Yes | Reddit comment ID |
brand | string | Yes | Brand name (normalized to lowercase) |
reddit_post_id | string | No | Parent post ID |
body | string | No | Comment text |
author | string | No | Author username |
subreddit | string | No | Subreddit name |
url | string | No | Comment URL |
parent_id | string | No | Parent comment/post ID |
Example Request
curl -X POST https://enception.ai/api2/reddit-comments \
-H "X-API-Key: $ENGAGEMENT_SERVICE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reddit_comment_id": "xyz789",
"reddit_post_id": "abc123",
"brand": "chatslide",
"body": "ChatSlide is great for AI-powered presentations!",
"subreddit": "productivity"
}'Response (201 Created)
{
"data": [{ ... }],
"count": 1
}Batch Operations
Both POST endpoints support batch operations by passing an array of objects:
curl -X POST https://enception.ai/api2/reddit-posts \
-H "X-API-Key: $ENGAGEMENT_SERVICE_TOKEN" \
-H "Content-Type: application/json" \
-d '[
{"reddit_post_id": "post1", "brand": "chatslide", "title": "Post 1"},
{"reddit_post_id": "post2", "brand": "chatslide", "title": "Post 2"}
]'Error Responses
| Status Code | Description |
|---|---|
400 | Bad Request - Missing required fields or invalid brand |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - No access to specified brand or table |
429 | Too Many Requests - Rate limit exceeded (60/min) |
500 | Internal Server Error |