curl --request POST \
--url https://{your-subdomain}.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"
]
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
})
};
fetch('https://{your-subdomain}.neetocal.com/api/external/v1/discount_codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v1/discount_codes"
payload = {
"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"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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"
]
]
}
}Create discount code
Create a discount code.
curl --request POST \
--url https://{your-subdomain}.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"
]
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
})
};
fetch('https://{your-subdomain}.neetocal.com/api/external/v1/discount_codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetocal.com/api/external/v1/discount_codes"
payload = {
"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"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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"
]
]
}
}{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Body
Code of the new code. This value should be unique.
"OFF50"
Value of the discount code. This value should be between 1-100 if kind is percentage.
50
Type of the discount code. Either fixed or percentage.
fixed, percentage "percentage"
Number of times the discount code can be redeemed. If left empty, the discount can be redeemed unlimited times.
10
Number of times the discount code can be redeemed by using a particular email. If left empty, the discount can be redeemed unlimited times.
5
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"
"12-05-2025"
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.
7
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
[
"eve@bigbinary.com",
"charlie@bigbinary.com"
]
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 scheduling links API. Here you will see sid for each scheduling link.
["ktr8qu3", "xzfpwqg", "csesbjq", "c64h5yx"]
Response
OK - Request succeeded
Success message
"Discount code creation successful"
Hide child attributes
Hide child attributes
Unique identifier for the created discount code.
"d6ccef53-f369-4b54-a818-6e93e2a0455c"
The unique discount code created.
"OFF_60"
Value of the discount.
60
Type of the discount (fixed or percentage).
fixed, percentage Number of times the discount code can be redeemed.
100
Number of times the discount code can be redeemed per email.
10
Expiration date and time of the discount code in ISO 8601 format.
"2025-08-12T00:00:00.000Z"
Number of days the discount code is valid for a client after their first use. If null, the discount code can be used indefinitely.
28
Array of meetings where the discount code can be used. Each meeting is represented as a tuple containing [meeting_id, meeting_name].
A tuple containing meeting ID and meeting name
2 elements[
[
"0b947f19-94a3-409b-ae3b-36d79a1b4969",
"Meeting with consultation team"
]
]