> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # BulkMarkSubmissionsAsSeen # Package: forms # Namespace: FormSubmissionService # Method link: https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/bulk-mark-submissions-as-seen.md ## Permission Scopes: Read Submissions: SCOPE.DC-FORMS.READ-SUBMISSIONS ## Introduction > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance.md) to confirm that the app named `wix_forms` is installed on the site.
Marks form submissions with `ids` as "seen". If `ids` are empty, all unseen form submissions are marked as "seen".
This endpoint marks the submissions as if they were seen by the site owner. Only site collaborators with the [Manage Submission](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) permissions can mark submissions. --- ## REST API ### Schema ``` Method: bulkMarkSubmissionsAsSeen Description: > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance.md) to confirm that the app named `wix_forms` is installed on the site.
Marks form submissions with `ids` as "seen". If `ids` are empty, all unseen form submissions are marked as "seen".
This endpoint marks the submissions as if they were seen by the site owner. Only site collaborators with the [Manage Submission](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) permissions can mark submissions. URL: https://www.wixapis.com/v4/bulk/submissions/mark-as-seen Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: formId Method parameters: param name: formId | type: formId | description: GUID of the form which the submissions belongs to. | required: true param name: ids | type: array | description: Submission GUIDs to mark as seen. Return type: BulkMarkSubmissionsAsSeenResponse - name: jobId | type: string | description: Job id for the bulk update operation ``` ### Examples ### BulkMarkSubmissionsAsSeen ```curl ~~~cURL curl -X POST \ 'http://www.wixapis.com/form-submission/v4/bulk/submissions/mark-as-seen' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "ids":["e62e3011-55cf-4de3-a497-e097b52d86b7"], "formId": "e62e3011-55cf-4de3-a497-e097b52d86b8" }' ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.forms.FormSubmissionService.bulkMarkSubmissionsAsSeen(ids, formId) Description: > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance.md) to confirm that the app named `wix_forms` is installed on the site.
Marks form submissions with `ids` as "seen". If `ids` are empty, all unseen form submissions are marked as "seen".
This endpoint marks the submissions as if they were seen by the site owner. Only site collaborators with the [Manage Submission](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) permissions can mark submissions. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: formId, ids Method parameters: param name: formId | type: string | description: GUID of the form which the submissions belong to. | required: true param name: ids | type: array | description: IDs of submissions to mark as seen. | required: true Return type: PROMISE - name: jobId | type: string | description: Job id for the bulk update operation ``` ### Examples ### Bulk mark submissions as "seen" (with elevated permissions) ```javascript import { submissions } from '@wix/forms'; import { auth } from '@wix/essentials'; /* Sample ids value: ["f8281b62-1b2f-45bf-ba7d-f041d7653d2d", "abb9b5c9-a881-467c-9c34-b9bea43ca5f0"] Sample formID value: "21bcb6c7-02b3-4ed1-b6db-7856094fac03" */ const elevatedBulkMarkSubmissionsAsSeen = auth.elevate(submissions.bulkMarkSubmissionsAsSeen); export async function myBulkMarkSubmissionsFunction(ids, formId) { try { const markedSubmissions = await elevatedBulkMarkSubmissionsAsSeen(ids, formId); console.log('Success! Marked submissions:', markedSubmissions); return markedSubmissions; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to void */ ``` ### Bulk mark submissions as "seen" ```javascript import { submissions } from '@wix/forms'; /* Sample ids value: ["f8281b62-1b2f-45bf-ba7d-f041d7653d2d", "abb9b5c9-a881-467c-9c34-b9bea43ca5f0"] Sample formID value: "21bcb6c7-02b3-4ed1-b6db-7856094fac03" */ export async function myBulkMarkSubmissionsFunction(ids, formId) { try { const markedSubmissions = await submissions.bulkMarkSubmissionsAsSeen(ids, formId); console.log('Success! Marked submissions:', markedSubmissions); return markedSubmissions; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to void */ ``` ### bulkMarkSubmissionsAsSeen (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { submissions } from '@wix/forms'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { submissions }, // Include the auth strategy and host as relevant }); async function bulkMarkSubmissionsAsSeen(ids,formId) { const response = await myWixClient.submissions.bulkMarkSubmissionsAsSeen(ids,formId); }; ``` ---