Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api-reference/admins/content-slack-tags.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'List Content Agent Slack Tags (Admin)'
openapi: 'GET /api/admins/content/slack'
---
147 changes: 142 additions & 5 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4163,7 +4163,7 @@
},
"/api/admins/coding/slack": {
"get": {
"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.",
"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.",
"parameters": [
{
"name": "period",
Expand All @@ -4188,7 +4188,7 @@
"application/json": {
"schema": {
"type": "object",
"required": ["status", "total", "tags"],
"required": ["status", "total", "total_pull_requests", "tags_with_pull_requests", "tags"],
"properties": {
"status": {
"type": "string",
Expand All @@ -4198,7 +4198,17 @@
"total": {
"type": "integer",
"description": "Total number of times the Coding Agent was tagged in the requested period",
"example": 42
"example": 134
},
"total_pull_requests": {
"type": "integer",
"description": "Total number of pull requests opened by the Coding Agent across all tags in the requested period",
"example": 121
},
"tags_with_pull_requests": {
"type": "integer",
"description": "Number of tags that resulted in at least one pull request being opened",
"example": 84
},
"tags": {
"type": "array",
Expand Down Expand Up @@ -4249,9 +4259,136 @@
"items": {
"type": "string",
"format": "uri",
"example": "https://github.com/recoupable-com/api/pull/42"
"example": "https://github.com/recoupable/api/pull/42"
},
"example": ["https://github.com/recoupable/api/pull/42"]
}
}
}
}
}
}
}
}
},
"401": {
"description": "Unauthorized - missing or invalid credentials",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/AccountErrorResponse" }
}
}
},
"403": {
"description": "Forbidden - authenticated account is not a Recoup admin",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/AccountErrorResponse" }
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/AccountErrorResponse" }
}
}
}
}
}
},
"/api/admins/content/slack": {
"get": {
"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.",
"parameters": [
{
"name": "period",
"in": "query",
"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.",
"required": false,
"schema": {
"type": "string",
"enum": ["all", "daily", "weekly", "monthly"],
"default": "all"
}
}
],
"security": [
{ "apiKeyAuth": [] },
{ "bearerAuth": [] }
],
"responses": {
"200": {
"description": "Slack tag analytics retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["status", "total", "tags"],
"properties": {
"status": {
"type": "string",
"enum": ["success"],
"description": "Status of the request"
},
"total": {
"type": "integer",
"description": "Total number of times the Content Agent was tagged in the requested period",
"example": 18
},
"tags": {
"type": "array",
"description": "List of Slack tag events",
"items": {
"type": "object",
"required": ["user_id", "user_name", "prompt", "timestamp", "channel_id", "channel_name"],
"properties": {
"user_id": {
"type": "string",
"description": "Slack ID of the person who tagged the agent",
"example": "U012AB3CD"
},
"user_name": {
"type": "string",
"description": "Display name of the person who tagged the agent",
"example": "Jane Smith"
},
"user_avatar": {
"type": ["string", "null"],
"description": "URL of the Slack avatar",
"example": "https://avatars.slack-edge.com/..."
},
"prompt": {
"type": "string",
"description": "The text of the message sent to the agent",
"example": "create a highlight reel for the new single release"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of the tag event",
"example": "2024-01-15T10:30:00.000Z"
},
"channel_id": {
"type": "string",
"description": "Slack channel ID where the tag occurred",
"example": "C012AB3CD"
},
"channel_name": {
"type": "string",
"description": "Human-readable name of the Slack channel",
"example": "content-team"
},
"video_links": {
"type": "array",
"description": "Video URLs generated by the Content Agent in response to this prompt, parsed from bot replies in the Slack thread",
"items": {
"type": "string",
"format": "uri",
"example": "https://recoupable.com/v/abc123"
},
"example": ["https://github.com/recoupable-com/api/pull/42"]
"example": ["https://recoupable.com/v/abc123"]
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
"api-reference/admins/emails",
"api-reference/admins/privy",
"api-reference/admins/coding-agent-slack-tags",
"api-reference/admins/coding-pr"
"api-reference/admins/coding-pr",
"api-reference/admins/content-slack-tags"
]
},
{
Expand Down