Update a promo code
US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com
Renaming to a code already used in the program returns 409. PUT and PATCH behave the same: send only the fields you are changing. Requires the write:awards scope.
Request example
curl --request PUT \ --url 'https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}' \ --header 'x-access-token: <api-token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "<string>", "type": "percentage", "amount": 0, "starts_at": "2026-01-15T09:30:00Z", "ends_at": "2026-01-15T09:30:00Z"}'const response = await fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}', { method: 'PUT', headers: { "x-access-token": "<api-token>", "Content-Type": "application/json" }, body: JSON.stringify({ "code": "<string>", "type": "percentage", "amount": 0, "starts_at": "2026-01-15T09:30:00Z", "ends_at": "2026-01-15T09:30:00Z" }),});
const data = await response.json();console.log(data);import requests
response = requests.request( "PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}", headers={ "x-access-token": "<api-token>", "Content-Type": "application/json" }, json={ "code": "<string>", "type": "percentage", "amount": 0, "starts_at": "2026-01-15T09:30:00Z", "ends_at": "2026-01-15T09:30:00Z" },)
print(response.json())<?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_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => '{ "code": "<string>", "type": "percentage", "amount": 0, "starts_at": "2026-01-15T09:30:00Z", "ends_at": "2026-01-15T09:30:00Z"}', CURLOPT_HTTPHEADER => [ "x-access-token: <api-token>", "Content-Type: application/json", ],]);
$response = curl_exec($curl);curl_close($curl);
echo $response;package main
import ( "fmt" "io" "net/http" "strings")
func main() { req, _ := http.NewRequest("PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}", strings.NewReader(`{ "code": "<string>", "type": "percentage", "amount": 0, "starts_at": "2026-01-15T09:30:00Z", "ends_at": "2026-01-15T09:30:00Z"}`)) req.Header.Add("x-access-token", "<api-token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}")) .header("x-access-token", "<api-token>") .header("Content-Type", "application/json") .method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"code\": \"<string>\",\n \"type\": \"percentage\",\n \"amount\": 0,\n \"starts_at\": \"2026-01-15T09:30:00Z\",\n \"ends_at\": \"2026-01-15T09:30:00Z\"\n}")) .build();
HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Try it
Response headers
Authorizations
x-access-tokenstringheaderOrganization API token. Generate from Organization Settings → API Tokens.
AuthorizationBearer <token>headerorOAuth 2.1 access token. Obtained via the OAuth PKCE flow at
/oauth/token.
Send one of these. See Authentication.
Path parameters
orgIdstringpathrequiredYour organization ID. Any other organization returns
404.programIdstring<uuid>pathrequiredThe Awards program ID.
promoCodeIdstring<uuid>pathrequiredThe promo code ID.
Request body
codestringLetters and digits; stored upper-case.
- Max length
255- Pattern
^[A-Za-z0-9]+$
typestring- Allowed values
"percentage", "flat"
amountnumberPercent off (at most 100) or a flat amount in the program's currency.
- Minimum
0
starts_atstring<date-time> | nullends_atstring<date-time> | null
{ "code": "<string>", "type": "percentage", "amount": 0, "starts_at": "2026-01-15T09:30:00Z", "ends_at": "2026-01-15T09:30:00Z"}Responses
200application/json
Promo code updated
dataAwardsPromoCodeShow child attributes
idstring<uuid>program_idstring<uuid>codestringtypestring- Allowed values
"percentage", "flat"
amountnumberstarts_atstring<date-time> | nullends_atstring<date-time> | nullredemption_countintegerSubmissions the code has been applied to. Returned by the single-code GET only.
created_atstring<date-time>updated_atstring<date-time>
400application/json
Invalid body or id
errorstring- Allowed values
"VALIDATION_ERROR", "SCOPE_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT"
messagestring
401
Missing or invalid token
403application/json
Token lacks write:awards
errorstring- Allowed values
"VALIDATION_ERROR", "SCOPE_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT"
messagestring
404application/json
Not found — also returned for any id belonging to another organization
errorstring- Allowed values
"VALIDATION_ERROR", "SCOPE_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT"
messagestring
409application/json
Promo code SAVE20 already exists in this program
errorstring- Allowed values
"VALIDATION_ERROR", "SCOPE_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT"
messagestring
Response examples
{ "data": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "program_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "code": "SAVE20", "type": "percentage", "amount": 20, "starts_at": "2026-01-15T09:30:00Z", "ends_at": "2026-01-15T09:30:00Z", "redemption_count": 123, "created_at": "2026-01-15T09:30:00Z", "updated_at": "2026-01-15T09:30:00Z" }}{ "error": "VALIDATION_ERROR", "message": "\"name\" is not allowed to be empty"}{ "error": "SCOPE_REQUIRED", "message": "Token missing required scope: write:awards"}{ "error": "NOT_FOUND", "message": "Not found"}{ "error": "CONFLICT", "message": "Promo code SAVE20 already exists in this program"}