API reference
Workspaces
List and create workspaces, and manage their aliases.
A workspace is one store or brand, with its own profiles, segments and members. Aliases route events that use another name for it, such as a shop domain.
Create a workspace#
POST /v1/tenants/{tenant}/workspaces Tenant token
Creates a workspace. It is usable immediately: tenant-wide event types and metrics apply to it automatically.
Body
workspace_id string Required2–63 characters of
a-z 0-9 _ -. No dots: put domains in aliases.display_name string RequiredHuman-readable name.
aliases string[] Other names events may use for this workspace, such as a shop domain.
curl -X POST "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/workspaces" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN" -H "Content-Type: application/json" \
-d '{
"workspace_id": "my-store",
"display_name": "My Store",
"aliases": ["mystore.myshopify.com"]
}'{
"status": "created",
"tenant_id": "breeze",
"workspace_id": "my-store",
"display_name": "My Store",
"shard_id": 0,
"aliases": ["mystore.myshopify.com"]
}Returns 409 if the id or an alias is taken.
List workspaces#
GET /v1/tenants/{tenant}/workspaces Workspace token
Lists the tenant's workspaces. A workspace token only sees its own.
curl "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/workspaces" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN"{
"workspaces": [
{
"workspace_id": "my-store",
"display_name": "My Store",
"status": "active",
"shard_id": 0,
"aliases": ["mystore.myshopify.com"]
}
]
}Add an alias#
PUT /v1/tenants/{tenant}/workspaces/{ws}/aliases/{alias} Tenant token
Adds an alias, such as a shop domain. Events sent with the alias are stored under the workspace. Takes effect within about 30 seconds.
curl -X PUT "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/workspaces/my-store/aliases/mystore.myshopify.com" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN"Remove an alias#
DELETE /v1/tenants/{tenant}/workspaces/{ws}/aliases/{alias} Tenant token
Removes the alias from the workspace.
curl -X DELETE "https://api.breeze.in/cdp/control-plane/v1/tenants/breeze/workspaces/my-store/aliases/mystore.myshopify.com" \
-H "Authorization: Bearer $BREEZEIQ_TOKEN"