Invites

envless.invites.list()

List pending invitations in the workspace

ts
list(options?: SearchListOptions): Promise<Page<InviteResource>>

Returns one page of invitations that are still outstanding. An invite leaves this list the moment it is accepted, at which point it becomes a row in members.list, and a revoked invite is soft-deleted and never reappears, so an empty page means nothing is waiting rather than nothing was ever sent.

Expired invites are still returned, with status set to expired. That field is derived from expiresAt when the row is read, so the same invite can flip from pending to expired between two calls without any write happening in between. Treat an expired row as dead: revoke it and send a fresh invitation through members.invite.

search matches the invited email address only, and it will not match role names. Ordering is fixed to newest sent first, so passing options.order changes nothing.

Example

ts
const page = await envless.invites.list({ search: 'api', limit: 50 })

console.log(page.items.map((invite) => [invite.email, invite.status]))
console.log(page.pagination.totalCount)

Parameters

ParameterTypeRequiredDescription
options.limitnumberNoRows per page, a whole number from 1 to 100.
options.offsetnumberNoWhole number of rows to skip before the page starts.
options.searchstringNoCase insensitive substring match on the invited email address.
options.signalAbortSignalNoCancels the request.

Returns

Page<InviteResource> with items and a pagination envelope counting every pending invite.

Reads the invites collection. list returns one page as { items, pagination }, listAll collects every page into an array, and iterate streams one item at a time without buffering the whole set.

Worth knowing

  • role is null when the role the invite was created against has since been deleted.
  • A 400 with request.invalid_pagination names the offending parameter in error.field.

Required scopes

members:read

Underlying endpoint

GET /invites

Request and response schema, every error code, and a live playground.

In Python

envless.invites.list()

The same method in envless-sdk, the Python SDK, with the same request, retries and errors.

In Ruby

Envless.invites.list

The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.

In PHP

$envless->invites->list()

The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.