Skip to main content
GET
/
tenants
/
{tenant_id}
/
users
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: 'My API Key',
});

const response = await client.tenants.listUsers('tenant_id');

console.log(response.has_more);
{
  "items": [
    {
      "user_id": "<string>",
      "type": "user",
      "tenant_id": "<string>",
      "profile": {}
    }
  ],
  "has_more": true,
  "url": "<string>",
  "next_url": "<string>",
  "cursor": "<string>",
  "type": "list"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenant_id
string
required

Id of the tenant for user membership.

Query Parameters

limit
integer | null

The number of accounts to return (defaults to 20, maximum value of 100)

cursor
string | null

Continue the pagination with the next cursor

Response

has_more
boolean
required

Set to true when there are more pages that can be retrieved.

url
string
required

A url that may be used to generate these results.

type
enum<string>
required

Always set to list. Represents the type of this object.

Available options:
list
items
UserTenantAssociation · object[] | null
next_url
string | null

A url that may be used to generate fetch the next set of results. Defined only when has_more is set to true

cursor
string | null

A pointer to the next page of results. Defined only when has_more is set to true