Admin & Security

Organization security, access control, and administration: the security overview, audit events and alerts, data-subject-access requests, consent and privacy controls, role-based access control (roles, permissions, policies, departments, and groups), alert rules, and the project-management surface (specs, tasks, categories, and phases).

69 endpoints. Generated from the OpenAPI 3.1 specification.

GET /v1/alert-rules

List alert rules for the authenticated user's organization

Returns all alert rules associated with the authenticated user's active organization. Standard bearer-token authentication.

Auth Session JWT (Bearer)

Responses

StatusDescription
200 Array of alert rule records.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/alert-rules

Create an alert rule

Creates a new alert rule in the authenticated user's active organization. Standard bearer-token authentication.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
name string yes Human-readable rule name (trimmed).
event_type string no
trigger_type string no
description string no
condition string no
conditions object no Structured condition (bounded JSON, max 64 KB).
channels array of object no

Responses

StatusDescription
201 Created alert rule.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
name string
event_type string
trigger_type string
description string
condition string
conditions object
channels array of object
created_at string<date-time>
PUT /v1/alert-rules/{alertRuleId}

Update an alert rule (not yet implemented)

This endpoint is not yet implemented and always returns `501 NOT_IMPLEMENTED`.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
alertRuleId path string<uuid> yes Alert rule identifier (UUID).

Request Body

JSON object.

Responses

StatusDescription
501 `NOT_IMPLEMENTED` — update is not yet available.
DELETE /v1/alert-rules/{alertRuleId}

Delete an alert rule (not yet implemented)

This endpoint is not yet implemented and always returns `501 NOT_IMPLEMENTED`.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
alertRuleId path string<uuid> yes Alert rule identifier (UUID).

Responses

StatusDescription
501 `NOT_IMPLEMENTED` — delete is not yet available.
POST /v1/mcp

MCP JSON-RPC 2.0 dispatch

Single endpoint that handles all MCP (Model Context Protocol) JSON-RPC 2.0 method calls. Every request body must be a valid JSON-RPC 2.0 object. Supported methods: `initialize`, `tools/list` (with optional `params.full=true`), `tools/call`, `resources/list`, `resources/read`, `ping`. Always returns HTTP `200` for well-formed JSON-RPC requests (including JSON-RPC-level errors per JSON-RPC 2.0 spec). Returns HTTP `401` for missing/invalid API keys, `429` for rate limit exceeded (fail-closed, returns 503 if the rate-limiter service itself is unavailable). OAuth-issued API keys with explicit scopes are supported; direct-mint (legacy) keys without explicit scopes receive a deprecation header in the response. API key format: `bb_live_<8-char-prefix>_<32-or-64-char-secret>` (hex or base64url).

Auth API key (Bearer bb_live_…)

Request Body

FieldTypeRequiredDescription
jsonrpc string (enum) 2.0 yes
id any no Request ID (string, integer, or null). Omit for notifications.
method string (enum) initializetools/listtools/callresources/listresources/readping yes MCP method name.
params object no Method-specific parameters.

Responses

StatusDescription
200 JSON-RPC 2.0 response (includes both successful results and JSON-RPC-level errors per the JSON-RPC 2.0 specification).
401 `AUTH_REQUIRED` — API key header is missing. Or `INVALID_API_KEY` — the key does not exist, is revoked, or has an invalid format.
429 `RATE_LIMIT_EXCEEDED` — per-key rate limit reached.
503 `SERVICE_UNAVAILABLE` — rate-limiter service is unavailable (fail-closed per security policy).
GET /v1/projects/{projectId}/categories

List task/spec categories for a project

Returns the list of category definitions for a project. Requires `project.view` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Responses

StatusDescription
200 Category list.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/projects/{projectId}/categories

Create a category for a project

Creates a new category. Requires `project.update` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Request Body

FieldTypeRequiredDescription
name string yes
description string no
parent_id string<uuid> no

Responses

StatusDescription
201 Created category.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
category_id string<uuid>
name string
color string
GET /v1/projects/{projectId}/phases

List project phases

Returns the ordered list of phase definitions for a project. Requires `project.view` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Responses

StatusDescription
200 Phase list.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/projects/{projectId}/phases

Create a phase for a project

Creates a new phase definition. Requires `project.update` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Request Body

FieldTypeRequiredDescription
name string yes
description string no
sort_order integer no

Responses

StatusDescription
201 Created phase.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
phase_id string<uuid>
name string
sort_order integer
GET /v1/projects/{projectId}/specs

List specs for a project

Returns all specification documents for the given project. Requires `project.view` permission on the project.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Responses

StatusDescription
200 Array of spec records.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/projects/{projectId}/specs

Create a spec in a project

Creates a new specification document within a project. Requires `project.update` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Request Body

FieldTypeRequiredDescription
title string yes
content string no

Responses

StatusDescription
201 Created spec record.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
spec_id string<uuid>
project_id string<uuid>
title string
content string
created_at string<date-time>
updated_at string<date-time>
GET /v1/projects/{projectId}/task-statuses

List task statuses for a project

Returns the ordered list of task status definitions for a project. Requires `project.view` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Responses

StatusDescription
200 Task status list.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/projects/{projectId}/task-statuses

Create a task status for a project

Creates a new task status definition. Requires `project.update` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Request Body

FieldTypeRequiredDescription
name string yes
key string yes Unique status key. Must start with a lowercase letter and contain only lowercase letters, digits, and underscores.
color string no
sort_order integer no

Responses

StatusDescription
201 Created task status.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
status_id string<uuid>
name string
color string
sort_order integer
GET /v1/projects/{projectId}/tasks

List tasks for a project

Returns tasks for the given project, with optional filters. Requires `project.view` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).
spec_id query string<uuid> no
status query string no
assignee_id query string<uuid> no
limit query integer no
offset query integer no

Responses

StatusDescription
200 Array of task records.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/projects/{projectId}/tasks

Create a task in a project

Creates a new task in the project. Requires `project.update` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
projectId path string<uuid> yes Project identifier (UUIDv7).

Request Body

FieldTypeRequiredDescription
title string yes
description string no
spec_id string<uuid> no
assignee_id string<uuid> no
priority string (enum) lowmediumhighcritical no
depends_on array of string no

Responses

StatusDescription
201 Created task.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
task_id string<uuid>
spec_id string<uuid>
project_id string<uuid>
title string
status string
phase string
category string
created_at string<date-time>
updated_at string<date-time>
GET /v1/rbac/departments

List departments

Lists departments in the organization. Departments are logical groupings of members and projects for RBAC/policy assignment.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
search query string no Filter by department name substring.
limit query integer no Maximum departments to return (1–100, default 100).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 Department list.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
departments array of object
total_count integer
POST /v1/rbac/departments

Create a department

Creates a new department in the organization. The body uses `.strict()` validation.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
name string yes
description string no

Responses

StatusDescription
201 Department created.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
409 409 Conflict — the request conflicts with an existing resource or current state (unique constraint, optimistic-lock, duplicate).
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
name string
description string | null
created_at string<date-time>
updated_at string | null
PUT /v1/rbac/departments/{departmentId}

Update a department

Updates an existing department's name or description. The body uses `.strict()` validation.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
departmentId path string<uuid> yes Department UUID.

Request Body

FieldTypeRequiredDescription
name string no
description string | null no

Responses

StatusDescription
200 Updated department.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string<uuid>
name string
description string | null
created_at string<date-time>
updated_at string | null
DELETE /v1/rbac/departments/{departmentId}

Delete a department

Permanently deletes a department by UUID. Members and projects are unlinked from the department.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
departmentId path string<uuid> yes Department UUID.

Responses

StatusDescription
200 Department deleted.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
deleted boolean (enum) true
GET /v1/rbac/effective-permissions

Get effective permissions

Returns the resolved permission set for the target user in the caller's organization, optionally scoped to a specific project. By default queries the authenticated caller's own permissions. Only organization owners, admins, and super-admins may query another user's permissions (returns `403 FORBIDDEN` otherwise).

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
user_id query string<uuid> no Target user UUID. Omit to query the caller's own permissions.
project_id query string<uuid> no Project UUID. When supplied, permissions are further scoped to the given project.

Responses

StatusDescription
200 Resolved effective permissions for the target user.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `FORBIDDEN` — caller is not an owner/admin/super-admin and is querying another user's permissions.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/rbac/groups

List groups

Lists groups in the organization. Groups are sets of members for policy assignment.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
search query string no Filter by group name substring.
limit query integer no Maximum groups to return (1–100, default 100).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 Group list.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
groups array of object
total_count integer
POST /v1/rbac/groups

Create a group

Creates a new group in the organization. The body uses `.strict()` validation.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
name string yes
description string no

Responses

StatusDescription
201 Group created.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
409 409 Conflict — the request conflicts with an existing resource or current state (unique constraint, optimistic-lock, duplicate).
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
name string
description string | null
created_at string<date-time>
updated_at string | null
PUT /v1/rbac/groups/{groupId}

Update a group

Updates an existing group's name or description. The body uses `.strict()` validation.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
groupId path string<uuid> yes Group UUID.

Request Body

FieldTypeRequiredDescription
name string no
description string | null no

Responses

StatusDescription
200 Updated group.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string<uuid>
name string
description string | null
created_at string<date-time>
updated_at string | null
DELETE /v1/rbac/groups/{groupId}

Delete a group

Permanently deletes a group by UUID.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
groupId path string<uuid> yes Group UUID.

Responses

StatusDescription
200 Group deleted.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
deleted boolean (enum) true
GET /v1/rbac/permissions

List permissions

Returns the permission catalog for the organization. Permissions are referenced by dot-notation slug (e.g. `project.view`, `org.manage_roles`). The response payload is `{ permissions: [...], total_count: N }`.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
search query string no Filter by name substring.
limit query integer no Maximum permissions to return (1–100, default 100).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 Permission list.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
permissions array of object
total_count integer
POST /v1/rbac/permissions

Create a permission

Creates a custom permission in the organization's permission catalog. `resource` and `action` define the access dimension. The body is strict (`.strict()`): any unknown field returns `400 VALIDATION_ERROR`.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
name string yes Dot-notation permission slug. Must be unique.
description string no Optional description.
resource string yes
action string yes

Responses

StatusDescription
201 Permission created.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
409 `CONFLICT` — a permission with the same name or resource/action combination already exists.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
name string Dot-notation permission slug.
description string | null
resource string Resource dimension (e.g. `project`, `org`).
action string Action dimension (e.g. `view`, `manage_roles`).
is_system boolean
created_at string<date-time>
DELETE /v1/rbac/permissions/{permissionId}

Delete a permission

Deletes a permission from the organization's permission catalog by UUID. Roles that reference this permission will have it removed.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
permissionId path string<uuid> yes Permission UUID.

Responses

StatusDescription
200 Permission deleted.
400 `INVALID_ID_FORMAT` — permissionId is not a valid UUID.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
deleted boolean (enum) true
GET /v1/rbac/policies

List RBAC policies

Returns RBAC access policies for the organization with limit/offset pagination. Supports filtering by resource type, search string, and active/inactive status.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
search query string no Filter by policy name substring.
resource_type query string no Filter by resource type.
status query string (enum) no Filter by active/inactive status. Omit for all.
limit query integer no Maximum policies to return (1–100, default 100).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 Paginated policy list.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
policies array of object
total_count integer
POST /v1/rbac/policies

Create an RBAC policy

Creates a new RBAC policy. Either `policy_name` or `name` must be supplied. Either `resource_type` or `resource_pattern` must be supplied. Either `operation` or `action_pattern` must be supplied. The body is strict (`additionalProperties: false`).

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
policy_name string no
name string no Alias for `policy_name`.
description string no
effect string (enum) allowdeny no
resource_type string no
resource_pattern string no
operation string no
action_pattern string no
conditions object no
is_active boolean no

Responses

StatusDescription
201 Policy created.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
409 409 Conflict — the request conflicts with an existing resource or current state (unique constraint, optimistic-lock, duplicate).
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
name string Policy display name.
description string | null
effect string (enum) allowdeny Policy effect.
resource_type string | null
resource_pattern string | null
operation string | null
action_pattern string | null
conditions object | null
is_active boolean
created_at string<date-time>
updated_at string | null
GET /v1/rbac/policies/{policyId}

Get a policy

Returns a single RBAC policy by UUID.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
policyId path string<uuid> yes Policy UUID.

Responses

StatusDescription
200 Policy record.
400 `INVALID_ID_FORMAT` — policyId is not a valid UUID.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string<uuid>
name string Policy display name.
description string | null
effect string (enum) allowdeny Policy effect.
resource_type string | null
resource_pattern string | null
operation string | null
action_pattern string | null
conditions object | null
is_active boolean
created_at string<date-time>
updated_at string | null
PUT /v1/rbac/policies/{policyId}

Update a policy

Updates fields on an existing RBAC policy. All fields are optional; the body is strict (`additionalProperties: false`).

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
policyId path string<uuid> yes Policy UUID.

Request Body

FieldTypeRequiredDescription
name string no
description string | null no
effect string (enum) allowdeny no
resource_type string | null no
resource_pattern string | null no
operation string | null no
action_pattern string | null no
conditions object | null no
is_active boolean no

Responses

StatusDescription
200 Updated policy record.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string<uuid>
name string Policy display name.
description string | null
effect string (enum) allowdeny Policy effect.
resource_type string | null
resource_pattern string | null
operation string | null
action_pattern string | null
conditions object | null
is_active boolean
created_at string<date-time>
updated_at string | null
DELETE /v1/rbac/policies/{policyId}

Delete a policy

Permanently deletes an RBAC policy.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
policyId path string<uuid> yes Policy UUID.

Responses

StatusDescription
200 Policy deleted.
400 `INVALID_ID_FORMAT` — policyId is not a valid UUID.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
deleted boolean (enum) true
GET /v1/rbac/roles

List RBAC roles

Returns the system and custom roles available within the caller's organization, suitable for display in the IAM Roles UI. System catalog roles (`is_system=true`) are platform-defined and read-only. Custom roles are org-specific. The response payload is `{ roles: [...], total_count: N }`.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
search query string no Case-insensitive substring filter on role name.
limit query integer no Maximum roles to return (1–100, default 25).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 List of roles.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
roles array of object
total_count integer Total matching roles (for pagination).
POST /v1/rbac/roles

Create a custom role

Creates a new custom role in the caller's organization with an optional set of permission slugs. The role's `is_system` flag is always `false`; clients cannot create system roles. Permission slugs are validated against the platform's system-permission catalog — unknown slugs are rejected. The body uses `.strict()` validation: any unrecognized field (e.g. `is_super_admin`) returns `400 VALIDATION_ERROR`.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
name string yes Role display name. Must be unique within the organization.
description string no Optional description.
permissions array of string no Optional initial set of permission slugs. Unknown slugs are rejected.
metadata object no Arbitrary metadata.

Responses

StatusDescription
201 Role created.
400 `VALIDATION_ERROR` — body failed validation or a permission slug was unrecognized.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `FORBIDDEN` — caller lacks the `org.manage_roles` permission, or attempted to write to the system catalog (only the root org may do so).
409 `CONFLICT` — a role with that name already exists in the organization.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string Role slug key.
name string Display name.
description string | null Optional description.
is_system boolean True for platform-defined catalog roles. System roles cannot be modified by clients.
permissions array of string Permission slugs assigned to this role.
metadata object | null Arbitrary metadata.
created_at string<date-time>
updated_at string | null
GET /v1/rbac/roles/{roleId}

Get a role

Returns a single role by its slug key. Both system roles (e.g. `owner`, `admin`) and custom roles (lowercase slug) are addressed by their text slug, not a UUID.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
roleId path string yes Role slug key (lowercase alphanumeric with dots, underscores, and hyphens; 1–150 chars).

Responses

StatusDescription
200 Role record.
400 `INVALID_ID_FORMAT` — the roleId path param is not a valid role slug.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string Role slug key.
name string Display name.
description string | null Optional description.
is_system boolean True for platform-defined catalog roles. System roles cannot be modified by clients.
permissions array of string Permission slugs assigned to this role.
metadata object | null Arbitrary metadata.
created_at string<date-time>
updated_at string | null
PUT /v1/rbac/roles/{roleId}

Update a custom role

Updates a custom role's name, description, permission set, or metadata. System roles (`is_system=true`) cannot be updated via this endpoint. The body uses `.strict()` validation — unknown fields including `is_super_admin` and `is_system` return `400 VALIDATION_ERROR`.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
roleId path string yes Role slug key (1–150 chars, lowercase dot-notation slug).

Request Body

FieldTypeRequiredDescription
name string no
description string | null no
permissions array of string no Full replacement permission slug set.
metadata object | null no

Responses

StatusDescription
200 Updated role record.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `FORBIDDEN` — caller lacks `org.manage_roles`, the target is a system role, or a role-hierarchy gate was violated.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string Role slug key.
name string Display name.
description string | null Optional description.
is_system boolean True for platform-defined catalog roles. System roles cannot be modified by clients.
permissions array of string Permission slugs assigned to this role.
metadata object | null Arbitrary metadata.
created_at string<date-time>
updated_at string | null
DELETE /v1/rbac/roles/{roleId}

Delete a custom role

Deletes a custom role by slug. System roles cannot be deleted. Any members currently assigned only this role will lose that assignment.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
roleId path string yes Role slug key.

Responses

StatusDescription
200 Role deleted.
400 `INVALID_ID_FORMAT` — the roleId path param is not a valid role slug.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
deleted boolean (enum) true
POST /v1/rbac/sync

Sync RBAC state

Triggers a server-side reconciliation of the organization's RBAC state against the platform's system role-and-permission catalog. Requires organization admin privileges. Use this when role/permission drift is detected.

Auth Session JWT (Bearer)

Request Body

JSON object.

Responses

StatusDescription
200 Sync completed.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `FORBIDDEN` — caller is not an organization admin.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/security

Security overview dashboard

Returns the security posture dashboard for the caller's organization including alert counts, authentication metrics, violation stats, and an overall health score. Optionally includes platform-generated recommendations when `include_recommendations=true`.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
from_date query string<date-time> no ISO 8601 datetime. Start of the reporting window.
to_date query string<date-time> no ISO 8601 datetime. End of the reporting window.
include_recommendations query string (enum) no When `true`, the response includes up to 10 platform-generated remediation recommendations.

Responses

StatusDescription
200 Security overview payload.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/security/alerts

List security alerts

Returns security alerts for the organization. Supports filtering by alert type, severity, status, and time range. Limit is 1–100 (default 25).

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
alert_type query string no Filter by alert type string.
severity query string (enum) no Filter by severity.
status query string (enum) no Filter by status.
from_date query string<date-time> no ISO 8601 datetime lower bound.
to_date query string<date-time> no ISO 8601 datetime upper bound.
limit query integer no Maximum alerts to return (1–100, default 25).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 Alert list.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
alerts array of object
total_count integer
POST /v1/security/alerts

Create a security alert

Creates a new security alert for the organization. Alerts can reference threat indicators, affected resources, and recommended response actions.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
alert_type string yes
severity string (enum) lowmediumhighcritical yes
status string (enum) activeacknowledgedresolvedfalse_positive no
title string yes
description string no
pattern_id string no
risk_score number no
indicators array of object no
affected_resources array of object no
response_actions array of object no
recommendations array of object no
metadata object no
expires_at string<date-time> no

Responses

StatusDescription
201 Alert created.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
org_id string<uuid>
alert_type string
severity string (enum) lowmediumhighcritical
status string (enum) activeacknowledgedresolvedfalse_positive
title string
description string | null
pattern_id string | null
risk_score number | null
indicators array | null
affected_resources array | null
response_actions array | null
recommendations array | null
resolution_notes string | null
metadata object | null
expires_at string | null
created_at string<date-time>
updated_at string | null
PUT /v1/security/alerts/{alertId}

Update a security alert

Updates a security alert's status, resolution notes, or metadata. Status transitions: `active → acknowledged → resolved` (or `→ false_positive`). Returns `404` if not found.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
alertId path string<uuid> yes Alert UUID.

Request Body

FieldTypeRequiredDescription
status string (enum) activeacknowledgedresolvedfalse_positive no
resolution_notes string no
metadata object no

Responses

StatusDescription
200 Updated alert.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string<uuid>
org_id string<uuid>
alert_type string
severity string (enum) lowmediumhighcritical
status string (enum) activeacknowledgedresolvedfalse_positive
title string
description string | null
pattern_id string | null
risk_score number | null
indicators array | null
affected_resources array | null
response_actions array | null
recommendations array | null
resolution_notes string | null
metadata object | null
expires_at string | null
created_at string<date-time>
updated_at string | null
GET /v1/security/audit/events

List audit events

Returns audit events for the organization with limit/offset pagination. Can be filtered by event type, user, session, severity, and time range. Limit is 1–1000 (default 50).

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
event_type query string no Filter by event type string.
user_id query string<uuid> no Filter events generated by a specific user UUID.
session_id query string no Filter by session ID string.
severity query string (enum) no Filter by severity level.
from_date query string<date-time> no ISO 8601 datetime lower bound.
to_date query string<date-time> no ISO 8601 datetime upper bound.
limit query integer no Maximum events to return (1–1000, default 50).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 Paginated audit event list.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
events array of object
total_count integer
POST /v1/security/audit/events

Create an audit event

Manually records a custom audit event for the organization. Useful for recording actions that originate outside the Backbuild platform (e.g. off-platform admin actions) while maintaining a unified audit trail.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
event_type string yes
action string yes
outcome string yes
severity string (enum) lowmediumhighcritical yes
risk_score number no
target_user_id string<uuid> no
session_id string no
ip_address string no
user_agent string no
resource_type string no
resource_id string<uuid> no
details object no
metadata object no
expires_at string<date-time> no

Responses

StatusDescription
201 Audit event created.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
org_id string<uuid>
user_id string | null
event_type string
action string
outcome string
severity string (enum) lowmediumhighcritical
risk_score number | null
target_user_id string | null
session_id string | null
ip_address string | null
user_agent string | null
resource_type string | null
resource_id string | null
details object | null
metadata object | null
expires_at string | null
created_at string<date-time>
POST /v1/security/consent/cookie

Record cookie consent decision

Records the authenticated user's cookie consent decision (GDPR Art. 6-7, ePrivacy Directive). Accepted categories: `necessary`, `analytics`, `marketing`, `preferences`. Body is strict.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
consent_categories array of enum necessaryanalyticsmarketingpreferences yes Cookie categories included in this consent decision.
consent_given boolean yes Whether consent was given (`true`) or withdrawn (`false`).
consent_method string (enum) bannersettingsapi no How the consent was collected.

Responses

StatusDescription
201 Cookie consent recorded.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/security/consent/marketing

Record marketing tracking consent

Records whether the user consents to having conversion data shared with external ad platforms (Meta, Google, Reddit, Bing). For EEA/UK/CH users this consent is required before any PII transfer to US-based platforms occurs (GDPR Art. 49).

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
consent_given boolean yes
consent_method string (enum) bannersettingsapi no

Responses

StatusDescription
201 Marketing consent recorded.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/security/consent/status

Get current consent status

Returns the most recent consent records for the authenticated user by consent type.

Auth Session JWT (Bearer)

Responses

StatusDescription
200 Consent records list.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/security/csp-report

Receive a Content Security Policy report

Receives browser-generated CSP violation reports. Unauthenticated endpoint. Rate-limited to 100 requests per minute per IP address. Request body is capped at 16 KB (returns `413 PAYLOAD_TOO_LARGE` on oversize). Accepts `application/csp-report`, `application/reports+json`, and `application/json` content types. Returns `204 No Content` on success.

Public Public: no authentication

Request Body

JSON object.

Responses

StatusDescription
204 Report received (no content returned).
413 `PAYLOAD_TOO_LARGE` — request body exceeds the 16 KB limit.
415 Unsupported content type. Only `application/csp-report`, `application/reports+json`, and `application/json` are accepted.
429 429 Too Many Requests — a rate limit or usage quota was exceeded. Retry after the indicated window.
POST /v1/security/data-erasure-requests/{erasureRequestId}/execute

Execute an approved GDPR Art. 17 data erasure request

Performs an irreversible cascaded deletion of all personal data associated with the erasure request (GDPR Art. 17 — right to erasure). Requires `super_admin` privileges at the edge **and** `compliance.manage` permission at the SP level. Authorization is checked **before** any input validation to prevent enumeration by unauthorized callers — a non-super-admin always receives `403`, never `400` or `404`. The request body must be empty (`{}`); any additional fields return `400`. The request must be in `approved` state; other states return `422 INVALID_STATUS_TRANSITION`.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
erasureRequestId path string<uuid> yes Data erasure request UUID.

Request Body

JSON object.

Responses

StatusDescription
200 Erasure executed.
400 `INVALID_ID_FORMAT` — erasureRequestId is not a valid UUID (only returned to authorized callers). Or `VALIDATION_ERROR` — body contains unexpected fields.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `FORBIDDEN` — caller is not a `super_admin`. Returned before input validation to prevent enumeration by unauthorized callers.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
422 `INVALID_STATUS_TRANSITION` — the erasure request is not in `approved` state, the target user is missing, or the cascade failed mid-flight.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/security/dsar

List DSAR requests

Returns DSAR requests for the organization. Requires a **fresh MFA step-up**. Supports filtering by status and limit/offset pagination (limit 1–1000, default 50).

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
status query string no Filter by request status.
limit query integer no Maximum records to return (1–1000, default 50).
offset query integer no Offset for pagination (default 0).

Responses

StatusDescription
200 DSAR request list.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `MFA_STEPUP_REQUIRED` — fresh MFA step-up is required.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
requests array of object
total_count integer
POST /v1/security/dsar

Create a Data Subject Access Request

Opens a Data Subject Access Request (DSAR) for an identified data subject. Covers all GDPR Art. 15-20 right types. Requires a **fresh MFA step-up** (within the last 5 minutes) via `requireMfaStepUp()`. API-key sessions cannot call this endpoint. The body is strict — any unrecognized field returns `400`.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
request_type string (enum) accessrectificationerasureportabilityrestrictionobjection yes GDPR Art. 15-20 request type.
subject_email string<email> yes Email address of the data subject.
subject_name string no Full name of the data subject.
description string no
data_categories array of string no Specific data categories in scope.
urgency string (enum) normalurgent no

Responses

StatusDescription
201 DSAR request created.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `MFA_STEPUP_REQUIRED` — the session does not have a fresh MFA step-up (within the last 5 minutes), or is an API-key session.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
201 response body: data fields
FieldTypeDescription
id string<uuid>
org_id string<uuid>
request_type string (enum) accessrectificationerasureportabilityrestrictionobjection
subject_email string<email>
subject_name string | null
description string | null
data_categories array | null
urgency string (enum) normalurgent
status string Current status of the DSAR (e.g. `pending`, `in_progress`, `completed`, `rejected`).
created_at string<date-time>
updated_at string | null
GET /v1/security/dsar/{dsarId}

Get a DSAR request

Returns a specific DSAR request by UUID. Requires a fresh MFA step-up.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
dsarId path string<uuid> yes DSAR request UUID.

Responses

StatusDescription
200 DSAR request record.
400 `VALIDATION_ERROR` — dsarId is not a valid UUID.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `MFA_STEPUP_REQUIRED` — fresh MFA step-up required.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
id string<uuid>
org_id string<uuid>
request_type string (enum) accessrectificationerasureportabilityrestrictionobjection
subject_email string<email>
subject_name string | null
description string | null
data_categories array | null
urgency string (enum) normalurgent
status string Current status of the DSAR (e.g. `pending`, `in_progress`, `completed`, `rejected`).
created_at string<date-time>
updated_at string | null
GET /v1/security/dsar/{dsarId}/export

Export data for a DSAR request

Exports all personal data associated with the DSAR request in machine-readable format (GDPR Art. 20 — right to data portability). Requires a fresh MFA step-up.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
dsarId path string<uuid> yes DSAR request UUID.

Responses

StatusDescription
200 Exported personal data payload.
400 `VALIDATION_ERROR` — dsarId is not a valid UUID.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `MFA_STEPUP_REQUIRED` — fresh MFA step-up required.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/security/dsar/object

Register a GDPR Art. 21 processing objection

Records the authenticated data subject's objection to processing under a specific scope (or all scopes). Per-scope flags are stored on the user account; downstream handlers consult them and skip the processing. Requires a fresh MFA step-up. Compliance admins acting on behalf of third-party subjects must use the standard `POST /v1/security/dsar` workflow with `request_type='objection'`. Body is strict.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
scope string (enum) marketinganalyticsprofilingall yes Processing scope to object to. Use `all` to object to all scopes.
reason string no

Responses

StatusDescription
200 Objection recorded.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `MFA_STEPUP_REQUIRED` — fresh MFA step-up required.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/security/dsar/restrict

Activate GDPR Art. 18 processing restriction

Pauses mutation of the authenticated caller's personal data (GDPR Art. 18 — right to restriction of processing). Storage and Art. 15 read access remain permitted. Downstream write stored procedures will reject with `PROCESSING_RESTRICTED` until the flag is lifted. Requires a fresh MFA step-up. The body is strict — unknown fields return `400`.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
reason string no Optional reason for activating the processing restriction.

Responses

StatusDescription
201 Processing restriction activated.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `MFA_STEPUP_REQUIRED` — fresh MFA step-up required, or `FORBIDDEN` — caller lacks the required permission.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/security/dsar/unrestrict

Lift GDPR Art. 18 processing restriction

Lifts the processing restriction for the caller themselves (self-path, omit `user_id`) or for another user (admin-path, supply `user_id` with `compliance.manage` permission). Per GDPR Art. 18(3), the data subject must be notified before lifting — this obligation is operational; the audit trail records `lifted_by_self`/`lifted_by_admin` for verification. Requires a fresh MFA step-up. Body is strict.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
user_id string<uuid> no Target subject UUID. Omit to lift the restriction for the authenticated caller. Supply with `compliance.manage` to lift for another user.
reason string no

Responses

StatusDescription
200 Processing restriction lifted.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 `MFA_STEPUP_REQUIRED` or `FORBIDDEN` — caller lacks `compliance.manage` when targeting another user.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/security/emergency-access

Invoke break-glass emergency access

Grants time-limited emergency access to a specific resource (HIPAA 164.312(a)(2)(ii); SOC 2 CC6.1). A mandatory reason of at least 10 characters must be supplied. Creates an immutable critical-severity audit event. The grant is automatically revoked after `duration_minutes` (default 60, max 480). The body is strict — unknown fields are rejected.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
reason string yes Mandatory justification for the break-glass access (minimum 10 characters).
target_resource_type string yes Resource type being accessed under emergency.
target_resource_id string<uuid> yes UUID of the resource being accessed.
duration_minutes integer no Grant duration in minutes (default 60, max 480).

Responses

StatusDescription
201 Emergency access granted.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/security/metrics

Get security metrics summary

Returns aggregated security metrics (authentication success/failure rates, anomaly counts, policy violation counts) for the organization within the specified time window.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
from_date query string<date-time> no ISO 8601 datetime lower bound.
to_date query string<date-time> no ISO 8601 datetime upper bound.

Responses

StatusDescription
200 Security metrics payload.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
POST /v1/security/parental-consent

Record parental consent (COPPA)

Records parental consent for a child user account (COPPA 16 CFR Part 312). Accepted verification methods: `email_verification`, `credit_card`, `phone_call`, `video_conference`, `government_id`.

Auth Session JWT (Bearer)

Request Body

FieldTypeRequiredDescription
child_user_id string<uuid> yes UUID of the child user account requiring parental consent.
parent_email string<email> yes Email address of the consenting parent/guardian.
consent_method string (enum) email_verificationcredit_cardphone_callvideo_conferencegovernment_id yes COPPA-approved verification method used to obtain consent.
consent_given boolean yes

Responses

StatusDescription
201 Parental consent recorded.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/security/sbom.json

Get Software Bill of Materials

In production, returns a `302 Found` redirect to the canonical SBOM hosted at `trust.backbuild.ai`. In non-production environments, returns `202 Accepted` with a `Retry-After: 86400` header and `x-placeholder: true` indicating the artifact is not yet available.

Public Public: no authentication

Responses

StatusDescription
202 SBOM not yet available (non-production). Retry after `Retry-After` seconds.
302 Redirect to the canonical SBOM (production only).
202 response body: data fields
FieldTypeDescription
available boolean (enum) false
GET /v1/security/security.txt

RFC 9116 security.txt

Returns the `security.txt` file as per RFC 9116. Response content type is `text/plain; charset=utf-8`. Cached with `Cache-Control: public, max-age=3600`.

Public Public: no authentication

Responses

StatusDescription
200 Security contact disclosure file.
GET /v1/specs/{specId}

Get a spec

Returns a single specification document. Requires `project.view` permission on the parent project.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
specId path string<uuid> yes Specification identifier (UUID).

Responses

StatusDescription
200 Spec record.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
spec_id string<uuid>
project_id string<uuid>
title string
content string
created_at string<date-time>
updated_at string<date-time>
PUT /v1/specs/{specId}

Update a spec

Updates a specification document. Requires `project.update` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
specId path string<uuid> yes

Request Body

FieldTypeRequiredDescription
title string no
content string no

Responses

StatusDescription
200 Updated spec record.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
spec_id string<uuid>
project_id string<uuid>
title string
content string
created_at string<date-time>
updated_at string<date-time>
DELETE /v1/specs/{specId}

Delete a spec

Permanently deletes a specification document and all its tasks. Requires `project.delete` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
specId path string<uuid> yes

Responses

StatusDescription
200 Spec deleted.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
deleted boolean (enum) true
GET /v1/specs/{specId}/tasks

List tasks in a spec

Returns all tasks belonging to a specification. Requires `project.view` permission on the parent project.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
specId path string<uuid> yes

Responses

StatusDescription
200 Array of task records.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
GET /v1/tasks/{taskId}

Get a task

Returns a single task record. Requires `project.view` permission on the parent project.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
taskId path string<uuid> yes

Responses

StatusDescription
200 Task record.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
task_id string<uuid>
spec_id string<uuid>
project_id string<uuid>
title string
status string
phase string
category string
created_at string<date-time>
updated_at string<date-time>
PUT /v1/tasks/{taskId}

Update a task

Updates a task's fields. Requires `project.update` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
taskId path string<uuid> yes

Request Body

FieldTypeRequiredDescription
title string no
status string no
phase string no
category string no

Responses

StatusDescription
200 Updated task record.
400 400 Bad Request — a request parameter, body field, or the JSON body itself failed validation.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
task_id string<uuid>
spec_id string<uuid>
project_id string<uuid>
title string
status string
phase string
category string
created_at string<date-time>
updated_at string<date-time>
DELETE /v1/tasks/{taskId}

Delete a task

Permanently deletes a task and its activity log. Requires `project.delete` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
taskId path string<uuid> yes

Responses

StatusDescription
200 Task deleted.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.
200 response body: data fields
FieldTypeDescription
deleted boolean (enum) true
GET /v1/tasks/{taskId}/activity

List task activity log

Returns the ordered activity log for a task (status changes, assignments, comments). Requires `project.view` permission.

Auth Session JWT (Bearer)

Parameters

NameInTypeRequiredDescription
taskId path string<uuid> yes

Responses

StatusDescription
200 Activity log entries.
401 401 Unauthorized — missing, expired, malformed, or revoked credentials.
403 403 Forbidden — authenticated but lacking the required membership, role, permission, MFA step-up, or feature entitlement.
404 404 Not Found — the requested resource does not exist or is not visible to the caller.
500 500 Internal Server Error — an unexpected server-side error. The message is sanitized; the correlation id is logged server-side.