unsubscribeFromForm
Unsubscribe from a form event by marker. 🔐 This method requires authorization.
Description
Removes the authenticated user's subscription to a form event, identified by its marker, for one form data record. Resolves to true on success.
With the default
errors.isShell: true, a failed request resolves to anIErrorobject, never tofalse. An error object is truthy, so checkresult === truerather thanif (result). Witherrors.isShell: falsethe method throws instead.
.unsubscribeFromForm(
,
);
Parameters schema
Schema
marker(required): string
Marker of the event.
example: "form_marker"
body(required): ISubscribeFormEvent
Subscription parameters.
example:
{ formDataId: 123 }
body.formDataId(required): number
Form data ID.
example: 123
body.status: string
Moderation status of the form record (sent, moderation, approved, banned, deleted). Accepted by the API but currently ignored.
Examples
Minimal example
const result = await Events.unsubscribeFromForm('form_marker', { formDataId: 123 });
if (result !== true) console.error(result); // IError
Example response
true