Skip to main content

GET /api/profile/activity

Fetches activity data for the authenticated user, supporting multiple activity types with pagination.

Authentication

Authorization
string
required
Valid NextAuth session token required

Query Parameters

type
string
default:"questions"
Type of activity to retrieve. Options:
  • questions - Questions created by the user
  • answers - Answers/messages posted by the user
  • debates - Debates initiated by the user
  • likes - Questions and answers the user has liked
  • favorites - Questions and answers the user has favorited
page
integer
default:"1"
Page number for pagination (min: 1, max: 1000)
limit
integer
default:"10"
Number of items per page (min: 1, max: 50)

Response

items
array
required
Array of activity items. Structure varies by activity type.
total
integer
required
Total count of items matching the query
hasMore
boolean
required
Indicates whether more items are available on subsequent pages

Response Structures by Type

Error Responses

Usage Example

curl "https://api.example.com/api/profile/activity?type=questions&page=1&limit=10" \
  -H "Cookie: next-auth.session-token=..."
Pagination parameters are automatically clamped to safe ranges: page (1-1000) and limit (1-50).

Build docs developers (and LLMs) love