Create a workspace and enable a domain
Most P6M APIs need a workspace and a domain installation.
Create a workspace
curl -X POST "$P6M_URL/v1/orgs/$ORG_ID/workspaces" \
-H "Authorization: Bearer $P6M_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"Production","slug":"production"}'
Save the returned workspace ID.
Enable a domain
curl -X POST "$P6M_URL/v1/orgs/$ORG_ID/enabled-services" \
-H "Authorization: Bearer $P6M_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"workspaceId": "'"$WORKSPACE_ID"'",
"domainCode": "metadata",
"externalTenantPolicy": "lazy",
"identityMatchPolicy": "external_id_preferred"
}'
Save the returned enabled-service ID. Customer API calls usually send this value as enabledServiceId.
Recommended first domains
- identity for users and service accounts.
- metadata for flexible application records.
- notifications for event delivery.
- knowledge for document search, citations, and Memory Graph.
- support if your app needs customer ticketing.