# List coding agent Slack tags (admin)

Source: https://docs.recoupable.dev/api-reference/admins/coding-agent-slack-tags

Returns a list of Slack mentions of the Recoup Coding Agent bot, pulled directly from the Slack API as the source of truth.

## GET /api/admins/coding/slack

Full OpenAPI specification: https://docs.recoupable.dev/spec/accounts.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://docs.recoupable.dev/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Recoup API - Accounts",
    "description": "API documentation for the Recoup platform - an AI agent platform for the music industry",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.recoupable.dev"
    }
  ],
  "paths": {
    "/api/admins/coding/slack": {
      "get": {
        "operationId": "getAdminsCodingSlack",
        "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. Optional tag filters by the exact, case-sensitive Slack author ID after trimming whitespace. Filtering happens after the existing period collection and before all totals are calculated; omission preserves the unfiltered report, and an unknown ID returns empty tags with zero totals. Empty or whitespace-only tag values return 400 after admin authentication. This is display filtering, not authorization or a reduction in Slack collection work. Collection retains its existing channel access, retention, history/thread pagination and partial-failure limits. No automatic caller, UI, polling, scheduled action or Slack send is added.",
        "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"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "Optional exact, case-sensitive Slack author ID. Leading/trailing whitespace is trimmed; blank values are rejected. This filters already collected mentions before the totals are computed and does not change access or collection work.",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            "example": "U2"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Slack tag analytics retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "total",
                    "total_pull_requests",
                    "tags_with_pull_requests",
                    "tags"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "success"
                      ],
                      "description": "Status of the request"
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of collected Coding Agent mentions after the requested period and optional author filter.",
                      "example": 134
                    },
                    "total_pull_requests": {
                      "type": "integer",
                      "description": "Number of pull request links across the filtered collected mentions.",
                      "example": 121
                    },
                    "tags_with_pull_requests": {
                      "type": "integer",
                      "description": "Number of filtered collected mentions with at least one pull request link.",
                      "example": 84
                    },
                    "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": "add dark mode support to the settings page"
                          },
                          "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": "dev-team"
                          },
                          "pull_requests": {
                            "type": "array",
                            "description": "GitHub pull request URLs opened by the Coding Agent in response to this prompt, parsed from bot replies in the Slack thread",
                            "items": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://github.com/recoupable/api/pull/42"
                            },
                            "example": [
                              "https://github.com/recoupable/api/pull/42"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid period or empty/whitespace-only tag; validation follows admin authentication and stops before Slack collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCodingSlackQueryError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, conflicting or invalid credentials; inspect error or message according to the returned authentication envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCodingSlackAuthenticationError"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdminCodingSlackQueryError": {
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "string",
            "description": "The first invalid query field or authentication-mechanism error."
          }
        }
      },
      "AdminCodingSlackAuthenticationError": {
        "description": "Missing or simultaneous authentication mechanisms return status/error. An invalid API key or Bearer credential returns status/message. Supply exactly one mechanism and authenticate a Recoup admin account.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/AdminCodingSlackQueryError"
          },
          {
            "$ref": "#/components/schemas/AccountErrorResponse"
          }
        ]
      },
      "AccountErrorResponse": {
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ],
            "description": "Status of the request"
          },
          "message": {
            "type": "string",
            "description": "Error message describing what went wrong"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your Recoup API key. [Learn more](/quickstart#api-keys)."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```
