Skip to main content
Folders organize programs and nested subfolders within a single organization, up to 8 levels deep. Use them to group programs by brand, region, franchise, or business line for filtering and folder-scoped reporting. Folders are optional organizational metadata. Programs without a folder live at the top level, and placing a program in a folder has no effect on its rules, linked assets, or participant balances.

Folders vs. separate organizations

Creating a folder

The API returns 201 Created with the folder:

Depth, names, and IDs

  • Depth: Folders nest up to 8 levels deep, with top-level folders at level 1.
  • Name uniqueness: Folder names are unique among siblings under the same parent (case-insensitive). Program names are unique within their folder or among top-level programs (case-insensitive), so two different brand folders can each contain a Downtown program. Uniqueness is checked on create, rename, and move.
  • External IDs: external_id is unique across the organization separately for folders and for programs, including archived resources.
See Limits for character and label size bounds.

Organizing programs in folders

A multi-brand business can model divisions, brands, and store-level programs as a tree:
Create a program inside an active folder by passing folder_id on POST /v1/programs:
When importing many programs, setting external_id makes reruns safe to resume: a duplicate returns 409 program_external_id_already_exists so your script can skip already-created programs. Folders control organization, list filtering, and report scoping, while asset linking controls where points can be earned and redeemed. To keep Coffee points and Bakery points separate while sharing participant counters across both brands:
  • Create one asset per brand (COFFEE, BAKERY) and link it only to that brand’s programs (POST /v1/assets links up to 1,000 programs via program_ids; link additional programs with POST /v1/programs/{program_id}/assets).
  • Attempts to redeem COFFEE through a Bakery program fail with 422 asset_not_linked.
  • Participant counters, tags, and attributes remain organization-scoped, so rules in any program can read cross-brand totals such as lifetime_spend. See Multi-program balances and State management.
Asset links cannot be removed once created. Verify a program’s linked assets with GET /v1/programs/{program_id}/assets before going live.

Filtering folders and programs

Pass folder_id to GET /v1/programs to list programs in a folder and all of its nested subfolders:
Use GET /v1/folders to list folders, filtered by parent_folder_id (pass null for top-level folders), kind, external_id, status, or search. Unlike GET /v1/programs, omitting status on GET /v1/folders returns both ACTIVE and ARCHIVED folders. GET /v1/folders/{folder_id} returns the folder with its ancestors array ordered from the top-level folder down to its immediate parent, useful for rendering breadcrumbs:
To aggregate liability, activity, or fulfillment reports across a folder’s programs, pass the same folder_id to any supported reporting endpoint. See Scoping reports by folder.

Labels

Folders and programs both store custom key-value string pairs in metadata (for example, {"region": "west"}). On PATCH, metadata replaces all existing labels, so include every key you want to keep. Send {} to clear all labels; sending null returns 400. See Limits for key and length caps.

Moving folders and programs

Moving a folder moves its entire subtree of subfolders and programs. Send the target active parent_folder_id (or null to promote to top level) on PATCH /v1/folders/{folder_id}:
A folder move is rejected when:
  • The target parent does not exist (404 folder_not_found) or is archived (409 folder_archived).
  • The target parent is the folder itself or one of its descendants (422 folder_cycle).
  • Any descendant would exceed the 8-level depth limit (422 folder_too_deep).
  • A sibling under the target parent already uses the same name (409 folder_name_already_exists).
parent_folder_id and status cannot be sent in the same PATCH /v1/folders/{folder_id} request. To move a program, send folder_id (or null for top level) on PATCH /v1/programs/{program_id}:
Moving a program updates only its folder assignment. Its linked assets, balances, and rules remain unchanged.

Reassigning a program that needs a different asset

Because asset links cannot be removed, do not move a program into a folder whose brand uses a different asset (for example, rebranding a Coffee store as a Bakery store). Instead, create a new program:
  1. Clear the old program’s external_id via PATCH /v1/programs/{program_id} with {"external_id": null} so the new program can reuse it (archived programs retain their external_id).
  2. Create the replacement program in the target folder with the store’s external_id, link it to the new brand’s asset, and add its rules.
  3. Archive the old program via PATCH /v1/programs/{program_id} with {"status": "ARCHIVED"}.
Existing participants retain their balances in the original asset and can continue redeeming them at other programs linked to that asset.

Archiving and restoring folders

Folders cannot be deleted. Archive bottom-up: every subfolder and program under the folder (including SUSPENDED programs) must be ARCHIVED before you can archive the folder itself.
If unarchived contents remain, the API returns 409 folder_has_unarchived_contents with unarchived_folders and unarchived_programs counts in details. While a folder is ARCHIVED:
  • It cannot accept new subfolders, moved folders, or programs (409 folder_archived).
  • Programs inside it cannot be set to ACTIVE or SUSPENDED (409 program_folder_archived). Restore the folder or move the program to an active folder first.
Send {"status": "ACTIVE"} to restore a folder. Restoring requires the folder to be top-level or its parent to be ACTIVE (409 folder_parent_archived otherwise), and does not automatically restore archived programs inside it.

Scoping reports by folder

Roll up liability, activity, and fulfillment cost across a folder tree.

Multi-program balances

Choose between pooled and partitioned balances when assets span programs.

Folders API reference

Endpoints, parameters, and response schemas for folders.