Delete a promo code
curl --request DELETE \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId} \
--header 'x-access-token: <api-key>'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}"
headers = {"x-access-token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-access-token': '<api-key>'}};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": "SCOPE_REQUIRED",
"message": "Token missing required scope: write:awards"
}{
"error": "NOT_FOUND",
"message": "Not found"
}{
"error": "CONFLICT",
"message": "Promo code has been redeemed 3 times; send force=true to delete it"
}Org — Awards
Delete a promo code
Soft-deletes the code. A code already applied to a submission returns 409 unless force=true is sent; those submissions keep their discount. Requires the write:awards scope.
DELETE
/
v1
/
organization
/
{orgId}
/
awards
/
programs
/
{programId}
/
promo-codes
/
{promoCodeId}
Delete a promo code
curl --request DELETE \
--url https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId} \
--header 'x-access-token: <api-key>'import requests
url = "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}"
headers = {"x-access-token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-access-token': '<api-key>'}};
fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": "SCOPE_REQUIRED",
"message": "Token missing required scope: write:awards"
}{
"error": "NOT_FOUND",
"message": "Not found"
}{
"error": "CONFLICT",
"message": "Promo code has been redeemed 3 times; send force=true to delete it"
}Authorizations
ApiKeyBearerToken
Organization API token. Generate from Organization Settings → API Tokens.
Path Parameters
Your organization ID. Any other organization returns 404.
The Awards program ID.
The promo code ID.
Query Parameters
Delete even though the record is in use (see the 409 response).
Response
Promo code deleted

