Skip to content

Social monitoring API endpoints #98

@arberx

Description

@arberx

Summary

Add API routes for social monitoring under /api/v1/projects/:name/social/.

Endpoints

Method Path Description
GET /social/mentions List mentions with filters: ?platform=&keyword=&sentiment=&since=&limit=
GET /social/summary Aggregated metrics: counts by platform, sentiment breakdown, engagement totals, top authors
GET /social/timeline Time-series mention counts + engagement, grouped by day/week
POST /social/connect Connect platform (store API key or initiate OAuth)
DELETE /social/connect/:platform Disconnect platform
GET /social/status Connection status per platform

Run trigger reuses existing POST /projects/:name/runs with { kind: 'social-monitor', platforms: ['reddit'] }.

Files

  • packages/api-routes/src/social.ts (new)
  • packages/api-routes/src/index.ts (register routes)
  • packages/api-routes/src/runs.ts (accept social-monitor kind)

Depends on

  • Social contracts issue
  • DB migration issue

Acceptance Criteria

  • All endpoints return correct response shapes
  • Mentions endpoint supports pagination and filtering
  • Summary endpoint aggregates across platforms
  • Timeline endpoint supports day/week grouping
  • Run trigger accepts social-monitor kind
  • Tests cover happy path and error cases
  • pnpm run typecheck passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase-aPhase A: Foundation + RedditsocialSocial platform monitoringswarm-readyIssue is ready for the automated swarm to pick up

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions