Skip to content

Replace a program's categories

PUT/v1/organization/{orgId}/awards/workspace/programs/{programId}/categories

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

Sends the program's full category list, in order (1 to 50). A category with an id is kept (renamed and moved as sent); one without an id is added; any existing category left out is removed. Send back the categories_revision you read as baseRevision and a list built from an out-of-date read is refused with 409 instead of undoing someone else's change. Sends nothing. Requires write:awards; the token's user needs the Awards update permission and must manage the program. Refused for a key restricted to particular events. Also at PUT /v1/awards/workspace/programs/{programId}/categories.

Request example

Terminal window
curl --request PUT \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/awards/workspace/programs/{programId}/categories' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"baseRevision": "<string>",
"source": {
"client": "<string>",
"version": "<string>",
"run_id": "<string>",
"prompt": "<string>"
}
}'

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
PUT

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.

Request body

application/jsonrequired

  • categoriesobject[]required
    Min items
    1
    Max items
    50
    Show child attributes
    • idstring<uuid>

      An existing category of this program. Omit to add a new one.

    • namestringrequired
      Min length
      1
      Max length
      120
  • baseRevisionstring

    The categories_revision the list was built from. Optional, but without it nothing guards against a stale read.

    Max length
    64
  • sourceAwardsWorkspaceSource

    Optional on every write: which assistant is calling and what the person asked it. Recorded with the change in the organization's activity and on any approval request; never stored on the program.

    Show child attributes
    • clientstring

      The assistant's client name (for example Claude or ChatGPT).

    • versionstring
    • run_idstring

      Your own id for the conversation.

    • promptstring

      What the person asked the assistant.

      Max length
      2000
{
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"baseRevision": "<string>",
"source": {
"client": "<string>",
"version": "<string>",
"run_id": "<string>",
"prompt": "<string>"
}
}

Responses

200application/json

OK

  • successboolean
  • payloadobject
    Show child attributes
    • categoriesAwardsWorkspaceCategory[]
      Show child attributes
      • idstring<uuid>
      • namestring
    • categories_revisionstring

      Send this as baseRevision with the next replacement.

400application/json

VALIDATION_ERROR: the body does not match the schema, or an id is not a category of this program (A category does not belong to this program.).

Error body for the Awards workspace operations.

  • errorstringrequired
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
  • messagestringrequired
  • codestring

    A more specific reason, when there is one (trial_ended, plan_ended).

401

Missing, invalid or expired token.

403application/json

  • SCOPE_REQUIRED: the token lacks write:awards. Legacy tokens with no scopes cannot write.
  • ORG_WIDE_TOKEN_REQUIRED: the key is restricted to particular events. The Awards workspace covers every awards program in the organization, so use a key without an event restriction.
  • FORBIDDEN with code: trial_ended or code: plan_ended: the organization's self-serve Awards plan is read-only (the trial ended, or the plan was canceled or is unpaid). Everything can still be read; choose a plan to make changes.
  • FORBIDDEN with no code: the token's user is not an active member of the organization, lacks the Awards permission the operation needs, does not manage the program, or (for the setup answers) is not an organization admin.

These operations do not return enterprise_only; the Enterprise-only items are listed by GET /v1/organization/{orgId}/awards/workspace/enterprise.

Error body for the Awards workspace operations.

  • errorstringrequired
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
  • messagestringrequired
  • codestring

    A more specific reason, when there is one (trial_ended, plan_ended).

404application/json

NOT_FOUND: orgId is not the token's organization, or the program is not in it.

Error body for the Awards workspace operations.

  • errorstringrequired
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
  • messagestringrequired
  • codestring

    A more specific reason, when there is one (trial_ended, plan_ended).

409application/json

CONFLICT: the categories changed since baseRevision was read. Read the program again and resend the full list.

Error body for the Awards workspace operations.

  • errorstringrequired
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
  • messagestringrequired
  • codestring

    A more specific reason, when there is one (trial_ended, plan_ended).

423application/json

A person has paused connected assistants for the organization, so writes from the API wait until they resume it in Sessionboard. code is AGENT_WRITES_PAUSED.

Error body for 423.

  • statusinteger
  • successboolean
  • messagestring
  • namestring
  • codestring
  • paused_atstring<date-time>

    When assistants were paused.

429application/json

  • The token's request limit (100 requests per 15 minutes by default, per bucket). Wait Retry-After seconds. The body is the TooManyRequestsError shape — see Rate Limiting.
  • Writes only: QUOTA_EXCEEDED, the token's daily write quota (10,000 writes a day). It resets at midnight UTC.
  • responseTooManyRequestsError | AwardsWorkspaceError
    name: TooManyRequestsError (TooManyRequestsError)

    Body of a 429 from the API's own request limits (per token, and per organization and user). Wait Retry-After seconds.

    • statusinteger
      Example
      429
    • successboolean
      Example
      false
    • messagestringrequired
      Example
      "Error while trying to reach the endpoint: Too many requests"
    • namestringrequired
      Allowed values
      "TooManyRequestsError"
    Option 2 (AwardsWorkspaceError)

    Error body for the Awards workspace operations.

    • errorstringrequired
      Allowed values
      "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
    • messagestringrequired
    • codestring

      A more specific reason, when there is one (trial_ended, plan_ended).

  • Retry-Afterintegerheader

    Seconds to wait before retrying.

Response examples

{
"success": true,
"payload": {
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"categories_revision": "<string>"
}
}