Coupon Codes

Create a new coupon code

Changed on
post/coupon-codes

Request

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

Request body

object required
name, string required

The code string that customers enter to redeem the coupon.

active, boolean required

Whether this coupon code is currently enabled for use.

couponId, string required

Identifier of the coupon to which this code belongs.

teamId, string required

Team that created this coupon code.

Example request

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

Response

OK

object required
couponCode, CouponCode required

coupon-code

Example response

{
  "couponCode": {
    "id": "cod_01jps5cgsfzftw7hxcvr2wftk2",
    "createdAt": "2026-12-02T02:43:23.597Z",
    "updatedAt": "2026-12-02T02:43:23.597Z",
    "name": "TEST50",
    "active": true,
    "couponId": "cpn_01jps5cgsfzs1ksqaet5hba8ac"
  }
}

Changes

    • breaking

      the couponCode/createdAt response's property format changed from date-time to no format for status

    • breaking

      the couponCode/updatedAt response's property format changed from date-time to no format for status

    • breaking

      the couponCode/uses response's property type changed from integer to number for status