The Delete Member method wraps the delete member API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method cannot be used to delete Members in other Organizations.
Delete Member
Method parameters
member_id* string
Response fields
request_id string
status_code int
member_id string
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';
export const DeleteMember = () => {
const stytch = useStytchB2BClient();
const deleteMember = () => {
stytch.organization.members.delete('member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f');
};
return (
<View>
<TouchableOpacity onPress={deleteMember}>
<Text>Delete Member</Text>
</TouchableOpacity>
</View>
);
};
RESPONSE
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f"
}