Skip to content

Update a promo code (PATCH)

PATCH/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}

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

Terminal window
curl --request PATCH \
--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"
}'

Try it

Authorization

Your token stays in this page. It is sent only to the region above and is never saved; it is gone when you leave or reload the page.

Path parameters
Body application/json
PATCH

Authorizations

  • x-access-tokenstringheader

    Organization API token. Generate from Organization Settings → API Tokens.

  • AuthorizationBearer <token>headeror

    OAuth 2.1 access token. Obtained via the OAuth PKCE flow at /oauth/token.

Send one of these. See Authentication.

Path parameters

  • orgIdstringpathrequired

    Your organization ID. Any other organization returns 404.

  • programIdstring<uuid>pathrequired

    The Awards program ID.

  • promoCodeIdstring<uuid>pathrequired

    The promo code ID.

Request body

application/jsonrequired

  • codestring

    Letters and digits; stored upper-case.

    Max length
    255
    Pattern
    ^[A-Za-z0-9]+$
  • typestring
    Allowed values
    "percentage", "flat"
  • amountnumber

    Percent off (at most 100) or a flat amount in the program's currency.

    Minimum
    0
  • starts_atstring<date-time> | null
  • ends_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

  • dataAwardsPromoCode
    Show child attributes
    • idstring<uuid>
    • program_idstring<uuid>
    • codestring
    • typestring
      Allowed values
      "percentage", "flat"
    • amountnumber
    • starts_atstring<date-time> | null
    • ends_atstring<date-time> | null
    • redemption_countinteger

      Submissions 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"
}
}

Get release notes by email

A short digest on the days something new goes live — each change with a link to its note in the release notes. No marketing, and one click to stop.

Company email addresses only. We’ll send one email to confirm it’s you. Already use Sessionboard? You can also turn this on under Community → What’s new.