Roles
Add an overview of the Admin - Roles API here. This block is preserved across regenerations.
Endpoints
GET /api/v1/permissions
List the platform RBAC permission resources catalog — what resources can be granted, which role types they apply to, and the permission levels available
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Filter by role type (admin, customer, csr, partner) to see resources applicable to that role
Permission resource catalog
GET /api/v1/permissions HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
Permission resource catalog
{
"data": [
{
"resource": "text",
"roles": [
"text"
],
"levels": [
"none"
],
"scopes": [
"all"
]
}
],
"meta": {
"total": 1,
"description": "text"
},
"requestId": "text"
}Notes, examples, or caveats for GET /permissions go here.
GET /api/v1/roles
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Max items to return (1–100, default 20)
20Number of items to skip (default 0)
0Filter by role type (admin, customer, csr, partner)
Paginated list of roles
A user profile/role defining a named set of permissions
Structured permission set for this role
GET /api/v1/roles HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
Paginated list of roles
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"role": "admin",
"isActive": true,
"isSystem": true,
"permissions": {},
"createdAt": "2026-01-01T00:00:00.000Z"
}Notes, examples, or caveats for GET /roles go here.
POST /api/v1/roles
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Role created
A user profile/role defining a named set of permissions
Structured permission set for this role
Validation error
POST /api/v1/roles HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 83
{
"name": "text",
"role": "text",
"description": "text",
"isActive": true,
"permissions": {}
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"role": "admin",
"isActive": true,
"isSystem": true,
"permissions": {},
"createdAt": "2026-01-01T00:00:00.000Z"
}Notes, examples, or caveats for POST /roles go here.
DELETE /api/v1/roles/{id}
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Role deleted
No content
System role — cannot delete
Not found
DELETE /api/v1/roles/{id} HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
No content
Notes, examples, or caveats for DELETE /roles/{id} go here.
GET /api/v1/roles/{id}
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Role details
A user profile/role defining a named set of permissions
Structured permission set for this role
Not found
GET /api/v1/roles/{id} HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"role": "admin",
"isActive": true,
"isSystem": true,
"permissions": {},
"createdAt": "2026-01-01T00:00:00.000Z"
}Notes, examples, or caveats for GET /roles/{id} go here.
PATCH /api/v1/roles/{id}
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Role updated
A user profile/role defining a named set of permissions
Structured permission set for this role
Not found
PATCH /api/v1/roles/{id} HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 69
{
"name": "text",
"description": "text",
"isActive": true,
"permissions": {}
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"role": "admin",
"isActive": true,
"isSystem": true,
"permissions": {},
"createdAt": "2026-01-01T00:00:00.000Z"
}Notes, examples, or caveats for PATCH /roles/{id} go here.
GET /api/v1/roles/{id}/permissions
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Permission object for this role
No content
Role not found
GET /api/v1/roles/{id}/permissions HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
No content
Notes, examples, or caveats for GET /roles/{id}/permissions go here.
PATCH /api/v1/roles/{id}/permissions
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Permissions updated
No content
Forbidden (system Administrator role)
Role not found
PATCH /api/v1/roles/{id}/permissions HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"resources": {},
"navigationGroups": {},
"catalogGrants": {}
}No content
Notes, examples, or caveats for PATCH /roles/{id}/permissions go here.
Last updated
Was this helpful?
