SapaganDocs sapagan.com

Concepts

Organisations and workspaces

How Sapagan separates companies, environments and, for marketplaces, stores.

Three levels hold everything in Sapagan.

LevelWhat it is
OrganisationA company. It owns operators (the people who use the console), organisation-wide secrets and templates.
WorkspaceOne environment of an organisation, usually Production and Dev. Keys, people, events, consent, campaigns and settings all belong to one workspace.
Store (scope)Marketplaces only. One seller's shop inside a workspace. See Stores.

A workspace is a hard boundary. A key opens one workspace, and nothing in it can see another workspace's people. Sapagan answers 404 not_found for anything a key cannot see, so a wrong id never reveals that it exists elsewhere.

Workspace type#

Every workspace has a type. Sapagan sets it when it creates the workspace, and only Sapagan can change it.

TypeForWhat you get
marketplaceA platform where sellers message buyers.Stores, store keys, store health, seller review, seller billing, and a tap that can open a product, store or catalog.
own_brandA company messaging its own users or members.No store pages. A tap opens a screen in your app or a link. The console speaks of your own word for people, for example "members".

In an own_brand workspace the marketplace routes (/v1/scopes, /v1/scope/..., /v1/billing/..., seller review and store appeals) answer 404 not_found, as if they did not exist. A campaign or template that points at a store, catalog, product or voucher is refused with own_brand_destination.

The audience name is the plural word the console uses for your people, in English and Indonesian. GET /v1/workspace/overview returns kind and audienceName.

Development and production#

A workspace is a development or a production environment. In development, only people on the test list receive messages. In production, the test list only limits test sends. See Quiet hours and caps.

Use separate workspaces for staging and production. They have separate keys, separate people and separate push credentials.

Operators and roles#

Operators are your team's console logins (Lark sign-in today). Each has a role in each workspace: viewer, reviewer, operator or owner. Owners manage keys, push credentials, identity keys and web origins. Reviewers decide on campaigns held for approval. Operator sessions are for the console. Your code uses API keys.

Archiving and suspension#

An organisation owner can archive a workspace. Its keys, tokens and sessions stop working and its sends stop, and an owner can restore it. Sapagan can suspend a whole organisation; calls then answer 403 organisation_suspended. An archived workspace answers 403 workspace_archived.