Access
Preview

List organization members

Read model joined from Better Auth (people, teams, sign-in method, last activity) and Wardn

GET
/members
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

limit?integer

Page size. Defaults to 50, at most 200.

Range1 <= value <= 200
Default50
cursor?string

Opaque cursor from a previous page's nextCursor.

offset?integer

Start this many people into the list, for a numbered pager: the page is found by position instead of by cursor, and the answer carries total, how many people match the search and filters. Sending it with cursor answers 400.

Range0 <= value <= 100000
q?string

Text to find in a person's name, email or one of their team names, ignoring case. A person matches when the text appears anywhere in one of them.

Lengthlength <= 100
orgRole?array<>

Only people with one of these organization roles.

Itemsitems <= 4
teamId?array<string>

Only people in one of these teams.

Itemsitems <= 50
noTeam?boolean

Also include people who are in no team. With teamId it widens the match to either; alone it means only people in no team.

expiringGrant?boolean

Only people with a grant to them that expires within 60 days.

excludeMe?boolean

Leave out the caller's own row, as pickers do.

sort?string

What to order by. lastActive puts people who never signed in last, ascending.

Default"name"
Value in"name""role""joinedAt""lastActive"
order?string
Default"asc"
Value in"asc""desc"

Response Body

A page of members.

application/json
  1. response
items*array<>
nextCursor?string
total?integer

How many people match the search and filters. Only present when the request gave an offset.

Formatint64
Example Request
curl -X GET 'https://wardn.example.com/api/v1/members'
Example Response
{  "items": [    {      "id": "string",      "userId": "string",      "name": "string",      "email": "string",      "avatarUrl": "string",      "orgRole": "owner",      "teamIds": [        "string"      ],      "joinedAt": "2019-08-24T14:15:22Z",      "lastActiveAt": "2019-08-24T14:15:22Z",      "signsInWith": "string",      "extraAccess": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391",          "roleName": "string",          "scope": {            "kind": "org",            "id": "string",            "label": "string"          },          "subject": {            "kind": "team",            "id": "string",            "label": "string"          },          "expiresAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z",          "createdBy": "string"        }      ]    }  ],  "nextCursor": "string",  "total": 0}