Folders vs. separate organizations
Creating a folder
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
Downtownprogram. Uniqueness is checked on create, rename, and move. - External IDs:
external_idis unique across the organization separately for folders and for programs, including archived resources.
Organizing programs in folders
A multi-brand business can model divisions, brands, and store-level programs as a tree:folder_id on POST /v1/programs:
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/assetslinks up to 1,000 programs viaprogram_ids; link additional programs withPOST /v1/programs/{program_id}/assets). - Attempts to redeem
COFFEEthrough a Bakery program fail with422 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
Passfolder_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:
folder_id to any supported reporting endpoint. See Scoping reports by folder.
Labels
Folders and programs both store custom key-value string pairs inmetadata (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 activeparent_folder_id (or null to promote to top level) on PATCH /v1/folders/{folder_id}:
- 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}:
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:- Clear the old program’s
external_idviaPATCH /v1/programs/{program_id}with{"external_id": null}so the new program can reuse it (archived programs retain theirexternal_id). - 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. - Archive the old program via
PATCH /v1/programs/{program_id}with{"status": "ARCHIVED"}.
Archiving and restoring folders
Folders cannot be deleted. Archive bottom-up: every subfolder and program under the folder (includingSUSPENDED programs) must be ARCHIVED before you can archive the folder itself.
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
ACTIVEorSUSPENDED(409 program_folder_archived). Restore the folder or move the program to an active folder first.
{"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.