GET/user/v1/flows

List flows

Lists flows.

query parameters

  • organizationId

    string

    The identifier of the organization.

    When not set the user's flows are returned.

    Otherwise if the user is an admin of the provided organization then the flows associated with that organization are returned.

  • type

    string

    Filter the results by the specified flow type.

  • active

    boolean

    Whether to filter out flows not in the START_PENDING or STARTED state.

  • creator

    boolean

    Whether to only return flows created by the authenticated user.

  • pageSize

    int32

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

    If unspecified, at most 20 flows 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 flows call. Provide this to retrieve the subsequent page.

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

  • orderBy

    string

    A comma-separated list of fields to order by.

    Supports:

    • createTime desc

Returns

  • flows

    Flow[]

    The list of flows.

  • 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/flows \
  -H "UserHub-Api-Key: $USERHUB_USER_KEY" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
Response bodyJSON
{
  "flows": [
    {
      "id": "flow_3on5rHNG5aMGao",
      "state": "START_PENDING",
      "type": "JOIN_ORGANIZATION",
      "organization": {
        "id": "org_28seyVGVL1got6",
        "displayName": "Acme Inc",
        "email": "[email protected]",
        "emailVerified": true,
        "imageUrl": "https://example.com/acme.jpg",
        "memberCount": 0
      },
      "user": {
        "id": "usr_MKFxzgJaAH8JQ4",
        "displayName": "Jane Doe",
        "email": "[email protected]",
        "emailVerified": true,
        "imageUrl": "https://example.com/jane.jpg"
      },
      "creator": {
        "id": "usr_EHTXpuz9rs8TCU",
        "displayName": "John Doe",
        "email": "[email protected]",
        "emailVerified": false,
        "imageUrl": "https://example.com/john.jpg"
      },
      "joinOrganization": {
        "role": null
      },
      "expireTime": "2024-11-15T13:00:00Z",
      "createTime": "2024-11-15T13:00:00Z"
    }
  ],
  "nextPageToken": ""
}
PreviousThe flow object
NextSend a join organization invitation

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

    UserHub & Auth0UserHub & Stripe BillingUserHub & Google CloudUserHub & FirebaseUserHub & custom auth