Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nextjs/saas-starter/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/team
Retrieves the team data for the currently authenticated user, including team members, subscription status, and billing information.Authentication
This endpoint requires a valid session cookie. The user must be authenticated and a member of a team.Request
No request body or query parameters required.cURL
fetch
Response
Returns the team object with nested team members data, ornull if the user is not authenticated or not part of a team.
The unique identifier for the team
The name of the team
ISO 8601 timestamp of when the team was created
ISO 8601 timestamp of when the team was last updated
Stripe customer ID for billing
Stripe subscription ID for the active subscription
Stripe product ID for the subscribed plan
Human-readable name of the subscription plan
Current status of the subscription (e.g., “active”, “canceled”, “past_due”)
Array of team member objects with user details
Response Examples
Error Handling
The endpoint returnsnull in the following cases:
- User is not authenticated (no valid session cookie)
- User session has expired
- User is not a member of any team
null response.