The Context API lets you create and manage context IDs for your organization.
Create a context within your organization. Creating a context means issuing a new context ID and defining what it can access.
NOTE: products and resources cannot be present together.
Security
BearerAuth
- https://edge-platform-context-api.sitecorecloud.iohttps://edge-platform-context-api.sitecorecloud.io/api/context/user/v1/contexts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://edge-platform-context-api.sitecorecloud.io/api/context/user/v1/contexts \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"allowTracing": "false",
"products": [
{
"productCode": "XMCloud",
"tenantId": "g6c3b17d-1816-40ef-bbf3-ae670311452c",
"environment": "Live"
}
],
"resources": [
{
"id": "SitecorePesonalizeResource",
"name": "My Sitecore personalize resource",
"type": "personalize",
"tenantId": "g6c3b17d-1816-40ef-bbf3-ae670311452c",
"properties": [
{
"id": "POS",
"value": "playwebsite"
}
]
}
],
"name": "My Context",
"description": "This is my context"
}'Created
Response
{ "organizationId": "org_123ABC", "sitecoreContextId": "f9c3b17d181640efbbf3ae670311452d", "allowTracing": "false", "type": "custom", "accountId": "account001", "resources": [ [ … ] ], "name": "My Context", "description": "This is my context", "createdAt": "2025-09-22T01:00:00Z", "updatedAt": "2025-09-22T01:00:00Z" }