v1

latestOpenAPI 3.0.02026-07-144431.2 KB
Session

Edit session

Edits information from a previously created sesssion.

This endpoint works the same way as the Create new session endpoint, but when the request is sent with a vtex_session and the vtex_segment cookies in the header, it retrieves the session first and then applies the changes instead of generating a new one.

Only keys inside the public namespace in the request body are considered, and query parameters are automatically added to the public namespace.

⚠️ The Session Manager API uses the vtex_session and vtex_segment cookies to store the data required to identify the user and the session. These cookies are stored in the user's browser when the session is created and sent automatically in every request to that domain. You will have to reproduce that by sending these cookies as headers to Session Manager API in order for it to work outside of a browser environment.

Permissions

This endpoint does not require authentication or permissions.

patch/api/sessions

Request body

Example request

{
  "public": {
    "variable2": {
      "value": "value2"
    },
    "variable3": {
      "value": "value3"
    }
  }
}

Response

OK

sessionTokenstring

Token that identifies the user's individual session.

segmentTokenstring

Token that identifies the user's segment, shared with other users with similar navigation parameters.