Docs

You are viewing an archived version of the docs.Go to latest version

getOrganizationList()

Retrieves a list of organizations.

const organizations = await clerkClient.organizations.getOrganizationList();
  • Name
    limit?
    Type
    number
    Description

    The number of results to return. Must be an integer greater than zero and less than 501.

  • Name
    offset?
    Type
    number
    Description

    The number of results to skip.

  • Name
    query?
    Type
    string
    Description

    A search query to filter organizations by.

Example

getOrganizationList({ limit })

Retrieves organization list that is filtered by the number of results.

const sessions = await clerkClient.organizations.getOrganizationList({
  // returns the first 10 results
  limit: 10,
});

getOrganizationList({ offset })

Retrieves organization list that is filtered by the number of results to skip.

const sessions = await clerkClient.organizations.getOrganizationList({
  // skips the first 10 results
  offset: 10,
});

getOrganizationList({ query })

Retrieves list of organizations that match the query.

const organizationsMatchingTest = await clerkClient.organizations.getOrganizationList({ query: 'test' })

Feedback

What did you think of this content?

Last updated on