> 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

# CreateFeedbackSession

# Package: feedback

# Namespace: FeedbackSessions

# Method link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/feedback-session-v1/create-feedback-session.md

## Permission Scopes:
Manage Site Feedback: SCOPE.PARTNERS.FEEDBACK_MANAGE

## Introduction

Creates a feedback session on a site.

The feedback session is attributed to the calling Wix user, who's notified by email about new comments left
through it. Must be called with a Wix user identity: apps, including calls made with an API key, can retrieve
and delete feedback sessions, but can't create them.

You can specify only `expirationDate`, which defaults to 14 days after creation. A feedback session can't be
updated once created.

To get the URL to share with reviewers, set `fields` to `SHARE_URL`.

Creating a feedback session publishes the site's latest saved version for reviewers, replacing the version
published for the site's previous feedback session. If the site has no URL, the call fails with
`SITE_URL_UNAVAILABLE` and no feedback session is created. Try again in a few minutes.

---

## REST API

### Schema

```
 Method: createFeedbackSession
 Description: Creates a feedback session on a site.  The feedback session is attributed to the calling Wix user, who's notified by email about new comments left through it. Must be called with a Wix user identity: apps, including calls made with an API key, can retrieve and delete feedback sessions, but can't create them.  You can specify only `expirationDate`, which defaults to 14 days after creation. A feedback session can't be updated once created.  To get the URL to share with reviewers, set `fields` to `SHARE_URL`.  Creating a feedback session publishes the site's latest saved version for reviewers, replacing the version published for the site's previous feedback session. If the site has no URL, the call fails with `SITE_URL_UNAVAILABLE` and no feedback session is created. Try again in a few minutes.
 URL: https://www.wixapis.com/partners/feedback/v1/feedback-sessions
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  feedbackSession
 Method parameters: 
   param name: feedbackSession | type: FeedbackSession | description: A feedback session is a shareable link through which anyone holding the link can review a site and leave comments on it.  A Wix user creates a feedback session on a site, shares its link with reviewers, and reads the comments left through it with the [Comments API](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/comment-v1/introduction.md). The user who created the session is notified by email about new comments left on it. A feedback session accepts new comments until its `expirationDate`. | required: true 
        - name: expirationDate | type: string | description: Date and time after which the feedback session stops accepting new comments.  Comments already left through the session stay readable, and can still be triaged and replied to. Can be set only when creating the feedback session.  Default: 14 days after creation  | validation: format date-time
   param name: fields | type: array<fields> | description: Additional fields to return in the response.  | validation: maxItems 1
                 - enum:
                 -     SHARE_URL: Returns `shareUrl`.
 Return type: CreateFeedbackSessionResponse
  - name: feedbackSession | type: FeedbackSession | description: Created feedback session.  
     - name: id | type: string | description: Feedback session GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number of the feedback session.  A feedback session can't be updated once created. Ignored when creating a feedback session.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the feedback session was created.  | read-only: true | validation: format date-time
     - name: expirationDate | type: string | description: Date and time after which the feedback session stops accepting new comments.  Comments already left through the session stay readable, and can still be triaged and replied to. Can be set only when creating the feedback session.  Default: 14 days after creation  | validation: format date-time
     - name: shareUrl | type: string | description: URL to share with reviewers. Anyone with the URL can review the site and leave comments through the feedback session.  Returned only when the request's `fields` includes `SHARE_URL`. Always returned by Create Feedback Session when requested. Other methods don't return it while the site has no URL, or when the site's URL can't be retrieved. To retry, call [Get Feedback Session](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/feedback-session-v1/get-feedback-session.md) with `fields` set to `SHARE_URL`.  | read-only: true | validation: format WEB_URL


```

### Examples

### Create Feedback Session
Creates a feedback session that expires at the end of a two-week review period, and returns the URL to share with reviewers

```curl
curl -X POST \
'https://www.wixapis.com/partners/feedback/v1/feedback-sessions' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "feedbackSession": {
    "expirationDate": "2026-10-12T00:00:00.000Z"
  },
  "fields": ["SHARE_URL"]
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.feedback.feedbackSessions.createFeedbackSession(feedbackSession, options)
 Description: Creates a feedback session on a site.  The feedback session is attributed to the calling Wix user, who's notified by email about new comments left through it. Must be called with a Wix user identity: apps, including calls made with an API key, can retrieve and delete feedback sessions, but can't create them.  You can specify only `expirationDate`, which defaults to 14 days after creation. A feedback session can't be updated once created.  To get the URL to share with reviewers, set `fields` to `SHARE_URL`.  Creating a feedback session publishes the site's latest saved version for reviewers, replacing the version published for the site's previous feedback session. If the site has no URL, the call fails with `SITE_URL_UNAVAILABLE` and no feedback session is created. Try again in a few minutes.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  feedbackSession
 Method parameters: 
   param name: feedbackSession | type: FeedbackSession | description: A feedback session is a shareable link through which anyone holding the link can review a site and leave comments on it.  A Wix user creates a feedback session on a site, shares its link with reviewers, and reads the comments left through it with the [Comments API](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/comment-v1/introduction.md). The user who created the session is notified by email about new comments left on it. A feedback session accepts new comments until its `expirationDate`. | required: true 
        - name: expirationDate | type: Date | description: Date and time after which the feedback session stops accepting new comments.  Comments already left through the session stay readable, and can still be triaged and replied to. Can be set only when creating the feedback session.  Default: 14 days after creation  
   param name: options | type: CreateFeedbackSessionOptions  none  
        - name: fields | type: array<RequestedFields> | description: Additional fields to return in the response.  | validation: maxItems 1
             - enum:
             -     SHARE_URL: Returns `shareUrl`.
 Return type: PROMISE<FeedbackSession>
  - name: _id | type: string | description: Feedback session GUID.  | read-only: true | validation: format GUID
  - name: revision | type: string | description: Revision number of the feedback session.  A feedback session can't be updated once created. Ignored when creating a feedback session.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the feedback session was created.  | read-only: true 
  - name: expirationDate | type: Date | description: Date and time after which the feedback session stops accepting new comments.  Comments already left through the session stay readable, and can still be triaged and replied to. Can be set only when creating the feedback session.  Default: 14 days after creation  
  - name: shareUrl | type: string | description: URL to share with reviewers. Anyone with the URL can review the site and leave comments through the feedback session.  Returned only when the request's `fields` includes `SHARE_URL`. Always returned by Create Feedback Session when requested. Other methods don't return it while the site has no URL, or when the site's URL can't be retrieved. To retry, call [Get Feedback Session](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/feedback/feedback-session-v1/get-feedback-session.md) with `fields` set to `SHARE_URL`.  | read-only: true | validation: format WEB_URL


```

### Examples

### Create a feedback session
Creates a feedback session that expires at the end of a two-week review period, and returns the URL to share with reviewers

```javascript
import { feedbackSessions } from "@wix/feedback";

async function createFeedbackSession() {
  const response = await feedbackSessions.createFeedbackSession(
    {
      expirationDate: new Date("2026-10-12T00:00:00.000Z"),
    },
    {
      fields: ["SHARE_URL"],
    },
  );
}

```

### createFeedbackSession (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 { feedbackSessions } from '@wix/feedback';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { feedbackSessions },
  // Include the auth strategy and host as relevant
});


async function createFeedbackSession(feedbackSession,options) {
  const response = await myWixClient.feedbackSessions.createFeedbackSession(feedbackSession,options);
};
```

---