Coupon Codes

Create a new coupon code

Changed on
post/coupon-codes

Request

  • Base URL: https://api.session.services
  • URL: https://api.session.services/coupon-codes
  • Auth: API key in header x-tenant-id

Request body

namestring required

The code string that customers enter to redeem the coupon.

activeboolean required

Whether this coupon code is currently enabled for use.

couponIdstring required

Identifier of the coupon to which this code belongs.

teamIdstring required

Team that created this coupon code.

Example request

{
  "name": "TEST50",
  "active": true,
  "couponId": "cpn_01jps5cgsfzs1ksqaet5hba8ac"
}

Response

OK

Example response

{
  "couponCode": {
    "id": "cod_01jps5cgsfzftw7hxcvr2wftk2",
    "createdAt": "2026-10-17T08:46:46.697Z",
    "updatedAt": "2026-10-17T08:46:46.697Z",
    "name": "TEST50",
    "active": true,
    "couponId": "cpn_01jps5cgsfzs1ksqaet5hba8ac"
  }
}

Changes

    • breaking

      the / response's property type changed from object to no type for status

    • breaking

      removed the required property // from the response with the status

    • info

      added subschema #1 subschema #2 to the / response property anyOf list for the response status

    • info

      added the non-success response with the status