GET

/user/v1/organizations

List organizations

Lists organizations.

query parameters

  • pageSize

    int32

    The maximum number of organizations to return. The API may return fewer than this value.

    If unspecified, at most 20 organizations will be returned. The maximum value is 100; values above 100 will be coerced to 100.

  • pageToken

    string

    A page token, received from a previous list organizations call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to list organizations must match the call that provided the page token.

  • orderBy

    string

    A comma-separated list of fields to order by.

    Supports:

    • displayName asc
    • email asc

Returns

  • organizations

    Organization[]

    The list of organizations.

  • nextPageToken

    string

    A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

  • previousPageToken

    string

    A token, which can be sent as pageToken to retrieve the previous page. If this field is absent, there are no preceding pages. If this field is an empty string then the previous page is the first result.

curl https://api.userhub.com/user/v1/organizations \
  -H "UserHub-Api-Key: $USER_API_KEY" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
Response bodyJSON
{
  "organizations": [
    {
      "id": "org_28seyVGVL1got6",
      "displayName": "Acme Inc",
      "email": "[email protected]",
      "emailVerified": true,
      "imageUrl": "https://example.com/acme.jpg",
      "memberCount": 1
    },
    {
      "id": "org_32P6J2tQEaYQDV",
      "displayName": "Umbrella Corporation",
      "email": "[email protected]",
      "emailVerified": true,
      "imageUrl": "https://example.com/umbrella.jpg",
      "memberCount": 1
    }
  ],
  "nextPageToken": ""
}
PreviousThe organization object
NextCreate an organization

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & Custom Auth