Skip to content

Commit 41ba213

Browse files
recoup-coding-agentRecoup CTO AgentPaperclip-Paperclipsweetmantechclaude
authored
docs: add Content Agent Slack tags admin endpoint (#81)
* docs: add Recoup Content Agent guide and API reference - Guide page covering @mention syntax, data flow, setup, and troubleshooting - OpenAPI spec entries for POST /api/content-agent/{platform} and POST /api/content-agent/callback - API reference pages for webhook and callback endpoints - Navigation updated with Agents group in Guides tab and Content Agent group in API reference Co-Authored-By: Paperclip <noreply@paperclip.ing> * docs: fix PR feedback — link callback endpoint and add RECOUP_API_KEY - Link POST /api/content-agent/callback to its API reference page in both the data flow section and endpoints table - Add missing RECOUP_API_KEY to environment variables table Co-Authored-By: Paperclip <noreply@paperclip.ing> * docs: add Content Agent Slack tags admin endpoint Add OpenAPI spec and MDX page for GET /api/admins/content/slack, following the existing coding/slack pattern. Response includes video_links instead of pull_requests. Co-Authored-By: Paperclip <noreply@paperclip.ing> * docs: update coding/slack endpoint with full response from prod Add total_pull_requests and tags_with_pull_requests fields to match the actual API response. Update description and examples accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Recoup CTO Agent <cto@recoupable.com> Co-authored-by: Paperclip <noreply@paperclip.ing> Co-authored-by: Sweets Sweetman <sweetmantech@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ded5c83 commit 41ba213

File tree

3 files changed

+148
-6
lines changed

3 files changed

+148
-6
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 'List Content Agent Slack Tags (Admin)'
3+
openapi: 'GET /api/admins/content/slack'
4+
---

api-reference/openapi.json

Lines changed: 142 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4163,7 +4163,7 @@
41634163
},
41644164
"/api/admins/coding/slack": {
41654165
"get": {
4166-
"description": "Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, and the channel. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token.",
4166+
"description": "Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any GitHub pull request URLs opened in response. Also returns aggregate pull request statistics. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token.",
41674167
"parameters": [
41684168
{
41694169
"name": "period",
@@ -4188,7 +4188,7 @@
41884188
"application/json": {
41894189
"schema": {
41904190
"type": "object",
4191-
"required": ["status", "total", "tags"],
4191+
"required": ["status", "total", "total_pull_requests", "tags_with_pull_requests", "tags"],
41924192
"properties": {
41934193
"status": {
41944194
"type": "string",
@@ -4198,7 +4198,17 @@
41984198
"total": {
41994199
"type": "integer",
42004200
"description": "Total number of times the Coding Agent was tagged in the requested period",
4201-
"example": 42
4201+
"example": 134
4202+
},
4203+
"total_pull_requests": {
4204+
"type": "integer",
4205+
"description": "Total number of pull requests opened by the Coding Agent across all tags in the requested period",
4206+
"example": 121
4207+
},
4208+
"tags_with_pull_requests": {
4209+
"type": "integer",
4210+
"description": "Number of tags that resulted in at least one pull request being opened",
4211+
"example": 84
42024212
},
42034213
"tags": {
42044214
"type": "array",
@@ -4249,9 +4259,136 @@
42494259
"items": {
42504260
"type": "string",
42514261
"format": "uri",
4252-
"example": "https://github.com/recoupable-com/api/pull/42"
4262+
"example": "https://github.com/recoupable/api/pull/42"
4263+
},
4264+
"example": ["https://github.com/recoupable/api/pull/42"]
4265+
}
4266+
}
4267+
}
4268+
}
4269+
}
4270+
}
4271+
}
4272+
}
4273+
},
4274+
"401": {
4275+
"description": "Unauthorized - missing or invalid credentials",
4276+
"content": {
4277+
"application/json": {
4278+
"schema": { "$ref": "#/components/schemas/AccountErrorResponse" }
4279+
}
4280+
}
4281+
},
4282+
"403": {
4283+
"description": "Forbidden - authenticated account is not a Recoup admin",
4284+
"content": {
4285+
"application/json": {
4286+
"schema": { "$ref": "#/components/schemas/AccountErrorResponse" }
4287+
}
4288+
}
4289+
},
4290+
"500": {
4291+
"description": "Internal server error",
4292+
"content": {
4293+
"application/json": {
4294+
"schema": { "$ref": "#/components/schemas/AccountErrorResponse" }
4295+
}
4296+
}
4297+
}
4298+
}
4299+
}
4300+
},
4301+
"/api/admins/content/slack": {
4302+
"get": {
4303+
"description": "Returns a list of Slack mentions of the Recoup Content Agent bot, pulled directly from the Slack API as the source of truth. Each entry includes the tagger's information, the prompt they sent, the timestamp, the channel, and any video link responses. Supports optional time-period filtering. Requires the authenticated account to be a Recoup admin. Authentication via x-api-key or Authorization Bearer token.",
4304+
"parameters": [
4305+
{
4306+
"name": "period",
4307+
"in": "query",
4308+
"description": "Time period to filter tags. One of: all (no date filter), daily (last 24 hours), weekly (last 7 days), monthly (last 30 days). Defaults to all.",
4309+
"required": false,
4310+
"schema": {
4311+
"type": "string",
4312+
"enum": ["all", "daily", "weekly", "monthly"],
4313+
"default": "all"
4314+
}
4315+
}
4316+
],
4317+
"security": [
4318+
{ "apiKeyAuth": [] },
4319+
{ "bearerAuth": [] }
4320+
],
4321+
"responses": {
4322+
"200": {
4323+
"description": "Slack tag analytics retrieved successfully",
4324+
"content": {
4325+
"application/json": {
4326+
"schema": {
4327+
"type": "object",
4328+
"required": ["status", "total", "tags"],
4329+
"properties": {
4330+
"status": {
4331+
"type": "string",
4332+
"enum": ["success"],
4333+
"description": "Status of the request"
4334+
},
4335+
"total": {
4336+
"type": "integer",
4337+
"description": "Total number of times the Content Agent was tagged in the requested period",
4338+
"example": 18
4339+
},
4340+
"tags": {
4341+
"type": "array",
4342+
"description": "List of Slack tag events",
4343+
"items": {
4344+
"type": "object",
4345+
"required": ["user_id", "user_name", "prompt", "timestamp", "channel_id", "channel_name"],
4346+
"properties": {
4347+
"user_id": {
4348+
"type": "string",
4349+
"description": "Slack ID of the person who tagged the agent",
4350+
"example": "U012AB3CD"
4351+
},
4352+
"user_name": {
4353+
"type": "string",
4354+
"description": "Display name of the person who tagged the agent",
4355+
"example": "Jane Smith"
4356+
},
4357+
"user_avatar": {
4358+
"type": ["string", "null"],
4359+
"description": "URL of the Slack avatar",
4360+
"example": "https://avatars.slack-edge.com/..."
4361+
},
4362+
"prompt": {
4363+
"type": "string",
4364+
"description": "The text of the message sent to the agent",
4365+
"example": "create a highlight reel for the new single release"
4366+
},
4367+
"timestamp": {
4368+
"type": "string",
4369+
"format": "date-time",
4370+
"description": "ISO 8601 timestamp of the tag event",
4371+
"example": "2024-01-15T10:30:00.000Z"
4372+
},
4373+
"channel_id": {
4374+
"type": "string",
4375+
"description": "Slack channel ID where the tag occurred",
4376+
"example": "C012AB3CD"
4377+
},
4378+
"channel_name": {
4379+
"type": "string",
4380+
"description": "Human-readable name of the Slack channel",
4381+
"example": "content-team"
4382+
},
4383+
"video_links": {
4384+
"type": "array",
4385+
"description": "Video URLs generated by the Content Agent in response to this prompt, parsed from bot replies in the Slack thread",
4386+
"items": {
4387+
"type": "string",
4388+
"format": "uri",
4389+
"example": "https://recoupable.com/v/abc123"
42534390
},
4254-
"example": ["https://github.com/recoupable-com/api/pull/42"]
4391+
"example": ["https://recoupable.com/v/abc123"]
42554392
}
42564393
}
42574394
}

docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
"api-reference/admins/emails",
8989
"api-reference/admins/privy",
9090
"api-reference/admins/coding-agent-slack-tags",
91-
"api-reference/admins/coding-pr"
91+
"api-reference/admins/coding-pr",
92+
"api-reference/admins/content-slack-tags"
9293
]
9394
},
9495
{

0 commit comments

Comments
 (0)