Additional request body

I want to pass additional data in the request body when calling a built-in API from Better Auth. For example, when a user deletes their account, I want to collect the deletion reason from the user and pass it along with the request.
// what I tried
await authClient.deleteUser(
  {
    password: "mypassword",
    reason: "I spend too much time on it",
    fetchOptions: {
      body: {
        reason: "I spend too much time on it",
      },
    },
  },
  {
    body: {
      reason: "I spend too much time on it",
    },
  }
);

However, I don’t receive this data in the user.delete before or after hooks.

How can I achieve this?
Was this page helpful?