Skip to main content
Neon Docs

Search documentation

Type to search this documentation.

List organization members

GET/organizations/{org_id}/membersList organization members

Retrieves a paginated list of members for the specified organization.

Parameters

org_idstringpathrequired

The Neon organization ID

pattern ^[a-z0-9-]{1,60}$

sort_bystringquery

Sort the members by the specified field. Defaults to `joined_at`.

one of "email", "role", "joined_at"

one of "email", "role", "joined_at" · default "joined_at"

cursorstringquery

A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list.

sort_orderstringquery

Defines the sorting order of entities.

one of "asc", "desc"

one of "asc", "desc" · default "desc"

limitintegerquery

The maximum number of members to return in the response

maximum 500 · minimum 1

Responses

200Returned information about organization membersapplication/json
value
allOf · 2 options
Option 1objectOrganizationMembersResponse
membersarray of objectrequired

Members of the organization, each combining membership details (role, status) with the associated user's identity.

Show child attributes
Show array items
memberobjectrequired
Show child attributes
idstring · uuidrequired

The organization member's ID.

joined_atstring · date-time

Timestamp when the user joined the organization.

org_idstringrequired

The Neon organization ID. Returned as `id` from `GET /users/me/organizations`.

pattern ^[a-z0-9-]{1,60}$

rolestringrequired

Organization member's role. `admin`: full administrative access. `editor` (and its legacy alias `member`): standard access governed by project permissions. `viewer` and `collaborator`: additional scoped project roles. Some values may not be available for all organizations.

one of "admin", "member", "editor", "viewer", "collaborator"

user_idstring · uuidrequired

The Neon user ID.

userobjectrequired
Show child attributes
deactivated_atstring · date-time

Timestamp of when the user account was deactivated. Absent for active users. When present, the UI should render a "Deactivated" badge inline next to the member.

emailstring · emailrequired

Email address of the organization member's user account.

maxLength 256 · minLength 1

has_mfaboolean

Whether the member has MFA (TOTP) enabled

Option 2objectCursorPaginationResponse
paginationobject

To paginate the response, issue an initial request with `limit` value. Then, add the value returned in the response `.pagination.next` attribute into the request under the `cursor` query parameter to the subsequent request to retrieve next page in pagination. The contents on cursor `next` are opaque, clients are not expected to make any assumptions on the format of the data inside the cursor.

Show child attributes
nextstring

Cursor for the next page of results. Pass it as the `cursor` query parameter on the next request. Absent on the last page.

sort_bystring

Field by which the results were sorted, echoing the request's sort_by parameter.

sort_orderstring

Sort order active for this page. Pass back as `sort_order` in the next request to maintain consistent ordering. Valid values are `asc` and `desc`.

Example response
{
  "members": [
    {
      "member": {
        "id": "d57833f2-d308-4ede-9d2e-468d9d013d1b",
        "joined_at": "2024-02-23T17:42:25Z",
        "org_id": "my-organization-morning-bread-81040908",
        "role": "admin",
        "user_id": "b107d689-6dd2-4c9a-8b9e-0b25e457cf56"
      },
      "user": {
        "email": "user1@email.com"
      }
    },
    {
      "member": {
        "id": "5fee13ac-957b-40cd-8de0-4d494cc28e28",
        "joined_at": "2024-02-21T16:42:25Z",
        "org_id": "my-organization-morning-bread-81040908",
        "role": "member",
        "user_id": "6df052ac-ca9a-4321-8963-b6507b2d7dee"
      },
      "user": {
        "email": "user2@email.com"
      }
    }
  ],
  "pagination": {
    "next": "eyJtZW1iZXJfaWQiOiI1ZmVlMTNhYy05NTdiLTQwY2QtOGRlMC00ZDQ5NGNjMjhlMjgiLCJzb3J0X2J5Ijoiam9pbmVkX2F0In0=",
    "sort_by": "joined_at",
    "sort_order": "desc"
  }
}
defaultGeneral Error. The request may or may not be safe to retry, depending on the HTTP method, response status code, and whether a response was received. - If no response is returned from the API, a network error or timeout likely occurred. - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. Any request that returns a `503 Service Unavailable` response is always safe to retry. Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. application/json
objectGeneralError
codestringrequired

default ""

messagestringrequired

Error message

request_idstring

Unique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.

Example response
{
  "code": "",
  "message": "string",
  "request_id": "string"
}
Documentation menu