POST
/
v1
/
sessions
curl --request POST \
  --url https://api.salesnip.com/v1/sessions \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "projectId": "project_abcdefghjijklmnop",
  "currency": "USD",
  "callbacks": {
    "success": "https://example.com/salesnip/success?sessionId={SESSION_ID}",
    "cancel": "https://example.com/salesnip/cancel?sessionId={SESSION_ID}"
  },
  "products": [
    {
      "id": "your_product_id",
      "name": "Product Name",
      "description": "Product Description",
      "image": "https://example.com/product.png",
      "price": {
        "initial": 100,
        "minimum": 80
      },
      "quantity": {
        "initial": 1,
        "maximum": 10,
        "minimum": 1
      },
      "recurring": {
        "unit": "MONTH",
        "count": 6
      },
      "trial": {
        "unit": "MONTH",
        "count": 6
      },
      "metadata": {
        "description": "This is a description of the product"
      },
      "upsellProduct": {
        "id": "your_product_id",
        "name": "Product Name",
        "description": "Product Description",
        "image": "https://example.com/product.png",
        "price": {
          "initial": 100,
          "minimum": 80
        },
        "quantity": {
          "initial": 1,
          "maximum": 10,
          "minimum": 1
        },
        "recurring": {
          "unit": "MONTH",
          "count": 6
        },
        "trial": {
          "unit": "MONTH",
          "count": 6
        },
        "metadata": {
          "description": "This is a description of the product"
        }
      }
    }
  ],
  "crossSellProducts": [
    {
      "id": "your_product_id",
      "name": "Product Name",
      "description": "Product Description",
      "image": "https://example.com/product.png",
      "price": {
        "initial": 100,
        "minimum": 80
      },
      "quantity": {
        "initial": 1,
        "maximum": 10,
        "minimum": 1
      },
      "recurring": {
        "unit": "MONTH",
        "count": 6
      },
      "trial": {
        "unit": "MONTH",
        "count": 6
      },
      "metadata": {
        "description": "This is a description of the product"
      }
    }
  ],
  "metadata": {
    "some_important_info": "SaleSnip is awesome!"
  }
}'
{
  "id": "session_abcdefghjijklmnop",
  "url": "https://chat.salesnip.com/#abcdefghjijklmnop"
}

Authorizations

X-Api-Key
string
header
required

Body

application/json

Response

201
application/json

Created

The response is of type object.