Cancel a flow.
Cancel a flow
POST
/admin/v1/flows/{flowId}:cancelReturns
curl https://api.userhub.com/admin/v1/flows/flow_3on5rHNG5aMGao:cancel \
-H "Authorization: Bearer $USERHUB_ADMIN_KEY" \
-X POST
const res = await adminApi.flows.cancel(
"flow_3on5rHNG5aMGao",
);
res, err := adminApi.Flows().Cancel(
context.Background(),
"flow_3on5rHNG5aMGao",
nil,
)
$res = $adminApi->flows->cancel(
flowId: 'flow_3on5rHNG5aMGao',
);
res = admin_api.flows.cancel(
flow_id="flow_3on5rHNG5aMGao",
)
Response bodyJSON
{
"id": "flow_3on5rHNG5aMGao",
"state": "CANCELED",
"type": "JOIN_ORGANIZATION",
"organization": {
"id": "org_28seyVGVL1got6",
"state": "ACTIVE",
"displayName": "Acme Inc",
"email": "[email protected]",
"emailVerified": true,
"imageUrl": "https://example.com/acme.jpg",
"accountConnections": [],
"signupTime": "2025-05-15T13:00:00Z",
"memberCount": 0,
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"user": {
"id": "usr_MKFxzgJaAH8JQ4",
"state": "ACTIVE",
"displayName": "Jane Doe",
"email": "[email protected]",
"emailVerified": true,
"phoneNumber": "+12125550123",
"phoneNumberVerified": false,
"imageUrl": "https://example.com/jane.jpg",
"currencyCode": "USD",
"languageCode": "en",
"regionCode": "US",
"timeZone": "America/New_York",
"address": {
"lines": [
"42 West St"
],
"city": "Brooklyn",
"state": "NY",
"postalCode": "11222",
"country": "US"
},
"accountConnections": [],
"memberships": [],
"signupTime": "2025-05-15T13:00:00Z",
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"creator": {
"id": "usr_EHTXpuz9rs8TCU",
"state": "ACTIVE",
"displayName": "John Doe",
"email": "[email protected]",
"emailVerified": false,
"phoneNumber": "+12345678901",
"phoneNumberVerified": false,
"imageUrl": "https://example.com/john.jpg",
"accountConnections": [],
"memberships": [],
"signupTime": "2025-05-15T13:00:00Z",
"view": "BASIC",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
},
"expireTime": "2025-05-15T13:00:00Z",
"joinOrganization": {
"email": "[email protected]"
},
"view": "FULL",
"createTime": "2025-05-15T13:00:00Z",
"updateTime": "2025-05-15T13:00:00Z"
}