POST

/user/v1/flows/{flowId}:cancel

Cancel a flow

Cancels specified flow. This cancels the flow and hides it from the user.

path parameters

  • flowId

    string

    Required

    The identifier of the flow or the flow secret.

Returns

  • id

    string

    The system-assigned identifier of the flow.

  • state

    enum

    The current state of the flow.

    Possible values:
    START_PENDINGSTARTEDCOMPLETEDCANCELEDEXPIRED
  • stateReason

    string

    The code that best describes the reason for the state.

  • type

    enum

    The flow type.

    Possible values:
    JOIN_ORGANIZATIONSIGNUP
  • organization

    Organization

    The target organization for the flow.

  • user

    User

    The target user for the flow.

  • creator

    User

    The user who created the flow.

  • expireTime

    date-time

    The time the flow will expire.

  • createTime

    date-time

    The creation time of the flow.

  • joinOrganization

    JoinOrganizationFlow

    The join organization flow type specific data.

  • signup

    SignupFlow

    The signup flow type specific data.

curl https://api.userhub.com/user/v1/flows/flow_3on5rHNG5aMGao:cancel \
  -H "UserHub-Api-Key: $USER_API_KEY" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -X POST
Response bodyJSON
{
  "id": "flow_3on5rHNG5aMGao",
  "state": "CANCELED",
  "stateReason": "DECLINED",
  "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"
  },
  "expireTime": "2024-06-15T13:00:00Z",
  "createTime": "2024-06-15T13:00:00Z",
  "joinOrganization": {
    "email": "[email protected]",
    "role": null
  }
}
PreviousConsume a flow
NextInvoices

Turn users intorevenue
$

Subscribe to monthly product updates

© 2024 UserHub

Integrations

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