---
title: "Generate User Session URL"
method: POST
path: "/urlgenerator/generateusersessionurl"
tags: ["URL Generator API"]
---

# Generate User Session URL

`POST /urlgenerator/generateusersessionurl`

Creates a session URL (SURL). Session URLs are either valid for one purchase, or for 72 hours after the last web hit for that session has been requested by the Cleverbridge web servers. Various marketing campaigns sometimes require the customer to make a purchase within a limited time or for a maximum quantity. This resource allows you to define those parameters.<br /> For XML examples and schemas, see the [Additional Examples - Generate User Session URL](https://dev.cleverbridge.com/page/additional-examples-generate-user-session-url).

## Headers

- `Accept` 'application/json' | 'application/xml'
- `Content-Type` 'application/json' | 'application/xml'

## Request body

- CleverbridgeBackEndRestApiUrlGeneratorClassesGenerateUserSessionUrlRequest
  - `CurrentSessionId` string — Unique ID of an existing session URL. If you use this parameter, the data from an existing session will be copied to the new session, directly behind the generated <code>Url</code>. As a result, the customer will not loose the settings associated with the existing session.
  - `TargetUrl` string, required — The destination URL for which you want to create a session URL. The <code>TargetURL</code> string must be [url-encoded](https://www.w3schools.com/tags/ref_urlencode.asp) only for XML requests. For an overview of all supported parameters, see [List of Checkout Process Parameters](https://docs.cleverbridge.com/public/all/using-the-platform/list-of-checkout-process-parameters.htm?utm_source=developer-docs&amp;utm_medium=api-reference).

## Response `200`

OK

- CleverbridgeBackEndRestApiUrlGeneratorClassesGenerateUserSessionUrlResponse
  - `Url` string — The generated session URL.
  - `ResultMessage` string — Optional result or error message.

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/cleverbridge/apis/backend-rest-apis.md) · [All operations](https://skmtc.net/cleverbridge/apis/backend-rest-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cleverbridge/backend-rest-apis/revisions/b7007b62f4c0/schema)
