Threadlytics
FeaturesPricing
Developer Docs

API Reference

Integrate the analytical, scheduling, and generative tools of Threadlytics into your development pipelines.

Base URL/api
Authentication Reference
GET/api/auth/session

Retrieves the active session payload for the logged-in user. Returns session expiration details, user profile, and integrated Threads account parameters.

Authentication:Session required

Response Schema (TypeScript)

interface SessionResponse {
  user: {
    name: string;
    email: string;
    image?: string;
    threadsUserId?: string;
    threadsUsername?: string;
    isAdmin?: boolean;
  };
  expires: string; // ISO timestamp
}
Common Error Responses

Errors are consistently structured as JSON objects containing details about the code, message, and context description:

interface ErrorResponse {
  error: {
    code: string;     // e.g. "UNAUTHORIZED", "VALIDATION_ERROR"
    message: string;  // Human-readable message
    details?: Record<string, any>;
  };
}
HTTP Code
Error Code
Explanation
401
UNAUTHORIZED
Not signed in
400
VALIDATION_ERROR
Invalid params or payload
429
RATE_LIMITED
API usage limits hit