curl --request PATCH \
--url https://{your-subdomain}.neetocal.com/api/external/v2/discount-codes/{id} \
--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": "2026-12-31",
"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: 'PATCH',
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: '2026-12-31',
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/v2/discount-codes/{id}', 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/v2/discount-codes/{id}"
payload = {
"code": "OFF50",
"value": 50,
"kind": "percentage",
"redeems_limit": 10,
"redeems_limit_by_email": 5,
"expires_at": "2026-12-31",
"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.patch(url, json=payload, headers=headers)
print(response.text){
"discount_code": {
"id": "d6ccef53-f369-4b54-a818-6e93e2a0455c",
"code": "OFF_60",
"value": 60,
"kind": "fixed",
"currency": "USD",
"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": [
{
"id": "3d4e5f6a-7b8c-4d9e-90f1-123456789abc",
"name": "Product Demo"
}
],
"packages": [
{
"id": "7c8d9e0f-1a2b-4c3d-8e4f-56789abcdef0",
"name": "Coaching Bundle"
}
]
}
}Update discount code
Update an existing discount code. Only the fields included in the request are updated.
curl --request PATCH \
--url https://{your-subdomain}.neetocal.com/api/external/v2/discount-codes/{id} \
--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": "2026-12-31",
"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: 'PATCH',
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: '2026-12-31',
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/v2/discount-codes/{id}', 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/v2/discount-codes/{id}"
payload = {
"code": "OFF50",
"value": 50,
"kind": "percentage",
"redeems_limit": 10,
"redeems_limit_by_email": 5,
"expires_at": "2026-12-31",
"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.patch(url, json=payload, headers=headers)
print(response.text){
"discount_code": {
"id": "d6ccef53-f369-4b54-a818-6e93e2a0455c",
"code": "OFF_60",
"value": 60,
"kind": "fixed",
"currency": "USD",
"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": [
{
"id": "3d4e5f6a-7b8c-4d9e-90f1-123456789abc",
"name": "Product Demo"
}
],
"packages": [
{
"id": "7c8d9e0f-1a2b-4c3d-8e4f-56789abcdef0",
"name": "Coaching Bundle"
}
]
}
}{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.
Path Parameters
ID of the discount code to update.
Body
Code of the discount code. This value should be unique.
"OFF50"
Value of the discount code. This value should be between 1-100 if kind is percentage, and at most 100000 if kind is fixed.
1 <= x <= 10000050
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 "YYYY-MM-DD"
"2026-12-31"
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. When provided, it replaces the existing list. 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. When provided, it replaces the existing list. 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 - Discount code updated successfully
Hide child attributes
Hide child attributes
Unique identifier for the discount code.
"d6ccef53-f369-4b54-a818-6e93e2a0455c"
The unique discount code.
"OFF_60"
Value of the discount.
60
Type of the discount (fixed or percentage).
fixed, percentage ISO 4217 code of the workspace default currency a fixed amount is charged in. Null for a percentage discount, which is not an amount of money.
"USD"
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