Skip to content

Delete a promo code

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

US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com

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.

Request example

Terminal window
curl --request DELETE \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/awards/programs/{programId}/promo-codes/{promoCodeId}' \
--header 'x-access-token: <api-token>'

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
Query parameters
DELETE

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.

Query parameters

  • forcebooleanquery

    Delete even though the record is in use (see the 409 response).

    Default
    false

Responses

204

Promo code deleted

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 has been redeemed 3 times; send force=true to delete it

  • errorstring
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT"
  • messagestring

Response examples

{
"error": "SCOPE_REQUIRED",
"message": "Token missing required scope: write:awards"
}

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.