Search.../

deleteSubmission( )

Developer Preview

Deletes a submission by ID.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function deleteSubmission(submissionId: string): Promise<void>

deleteSubmission Parameters

NAME
TYPE
DESCRIPTION
submissionId
string

ID of the submission to delete.

Returns

Return Type:

Promise<
void
>

Was this helpful?

deleteSubmission example

Copy Code
1import { submissions } from 'wix-forms.v2';
2
3 async function deleteSubmission(submissionId) {
4 try {
5 const result = await submissions.deleteSubmission(submissionId);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13