Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Clerk · Type Alias

ClerkPaginatedResponse

ClerkPaginatedResponse is the generic interface for a method response containing a paginated list of resources. Pass the resource type as its type parameter to keep returned items strongly typed.

How it works

ClerkPaginatedResponse is a generic TypeScript interface for results returned by methods that list resources in pages. Supply the resource type as its generic argument, then use the response's collection and pagination metadata to process the current page and decide whether more data should be requested.

Syntax

ClerkPaginatedResponse<T>

Parameters

NameTypeDescription
Ttype parameterThe resource type contained in the paginated response.

Returns

A paginated response interface for a list of resources.

Key points

  • It models the result envelope produced by a paginated resource-listing method.
  • The generic parameter should match the resource returned by the specific listing method.
  • Organization membership methods can use the type with OrganizationMembershipResource as the item type.
  • Organization suggestion methods can use the type with OrganizationSuggestionResource as the item type.

Common mistakes

  • This type describes a paginated response rather than an individual resource; use the generic argument for the item type.

Example: Typing a paginated result

import type { ClerkPaginatedResponse } from '@clerk/types'

type User = { id: string }

const page: ClerkPaginatedResponse<User> = {
  data: [{ id: 'user_123' }],
  totalCount: 1,
  offset: 0,
  limit: 10,
}

console.log(page.data, page.totalCount)

Creates a typed paginated result whose items are User values.

When to use it

Typed invitation pages

Typing a user method that returns organization invitations.

Typed membership pages

Representing pages of organization memberships in application code.

Typed suggestion pages

Handling organization suggestions returned in pages.

Interview questions

QWhat does ClerkPaginatedResponse represent?

ClerkPaginatedResponse is a generic interface used for the response from a method that returns a paginated list of resources. The generic parameter represents the resource type contained in that result.

Follow-up: How would you preserve type safety for organization memberships? Use ClerkPaginatedResponse<OrganizationMembershipResource> so the page items retain their resource type.

QHow is the type parameter used?

Use the type with the resource type as its generic argument, such as ClerkPaginatedResponse<User>. This lets TypeScript describe both the paginated result and the type of resources returned by the listing method.

Follow-up: What should change when the endpoint returns invitations instead? Replace User with UserOrganizationInvitationResource.

QWhen should this type be used instead of a resource type?

The type applies to methods that return lists, including user methods whose documentation says they return ClerkPaginatedResponse of a resource type. It should not be used as the type of one standalone resource.

Follow-up: How would you model a single user returned by a non-list method? Use that method's documented User resource return type instead of ClerkPaginatedResponse.

  • UserOrganizationInvitationResource
  • OrganizationMembershipResource
  • OrganizationSuggestionResource

Source: ClerkPaginatedResponse - Types | Clerk Docs. Checked 2026-10-15.