Skip to main content
POST
/
discount_codes
Create a discount code
curl --request POST \
  --url https://{your-workspace}.neetocal.com/api/external/v1/discount_codes \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '{
  "code": "OFF50",
  "value": 50,
  "kind": "percentage",
  "redeems_limit": 10,
  "redeems_limit_by_email": 5,
  "expires_at": "12-05-2025",
  "days_valid_after_first_use_per_client": 7,
  "allowed_emails": [
    "eve@bigbinary.com",
    "charlie@bigbinary.com"
  ],
  "meeting_ids": [
    "ktr8qu3",
    "xzfpwqg",
    "csesbjq",
    "c64h5yx"
  ]
}'
{
  "message": "Discount code creation successful",
  "discount_code": {
    "id": "d6ccef53-f369-4b54-a818-6e93e2a0455c",
    "code": "OFF_60",
    "value": 60,
    "kind": "fixed",
    "redeems_limit": 100,
    "redeems_limit_by_email": 10,
    "expires_at": "2025-08-12T00:00:00.000Z",
    "days_valid_after_first_use_per_client": 28,
    "meetings": [
      [
        "0b947f19-94a3-409b-ae3b-36d79a1b4969",
        "Meeting with consultation team"
      ]
    ]
  }
}
Replace {your-workspace} with your workspace’s subdomain.
Learn how to find your subdomain in Identifying your subdomain.

Headers

X-Api-Key
string
required

X-Api-Key is used to authenticate requests using an API key. Provide your API key in this header to access protected endpoints. Refer to Authentication for more information.

Body

application/json
code
string
required

Code of the new code. This value should be unique.

Example:

"OFF50"

value
integer
required

Value of the discount code. This value should be between 1-100 if kind is percentage.

Example:

50

kind
enum<string>
required

Type of the discount code. Either fixed or percentage.

Available options:
fixed,
percentage
Example:

"percentage"

redeems_limit
integer

Number of times the discount code can be redeemed. If left empty, the discount can be redeemed unlimited times.

Example:

10

redeems_limit_by_email
integer

Number of times the discount code can be redeemed by using a particular email. If left empty, the discount can be redeemed unlimited times.

Example:

5

expires_at
string

Date upto which the discount code can be used. If left empty, discount code can be used forever. It should be of the format "DD-MM-YYYY"

Example:

"12-05-2025"

days_valid_after_first_use_per_client
integer

Number of days upto which the discount code can be used by a particular client after their first use. If left empty, the discount code can be used forever.

Example:

7

allowed_emails
string<email>[]

Array of allowed email addresses that can redeem the discount code. If left empty, the discount code can be redeemed using any email address.

Valid email address

Example:
[
"eve@bigbinary.com",
"charlie@bigbinary.com"
]
meeting_ids
string<SID>[]

Array of meeting SIDs in which the discount code can be used in. You can get sid in different ways. Visit the scheduling link page and then click on "Settings" > "Show SID". That will give you sid. The other way you can get sid is by listing scheduling links using our List all scheduling links API. Here you will see sid for each scheduling link.

Example:
["ktr8qu3", "xzfpwqg", "csesbjq", "c64h5yx"]

Response

200 - application/json

OK - Request succeeded

message
string

Success message

Example:

"Discount code creation successful"

discount_code
object