Preview approval request
POST
/api/admin/approvals/preview
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/approvals/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "investigation_id": "case_123", "target_subject_type": "user", "target_subject_id": "user_123", "request_surface": "approvals", "requested_action": "detail_read", "resource_class": "approval_transport_detail", "resource_ids": [ "apreq_123" ], "detail_classes": [ "transport_evidence" ], "audience": "admin_api", "redaction_level": "masked", "reason_code": "support_case", "reason_note": "Investigating a support request.", "reference_id": "SUP-1234", "policy_preset": "support_case_default", "reuse_scope": "request", "partial_access_allowed": false, "expires_at": 1770086400000, "approvals": [ { "subject_type": "admin_user", "subject_id": "admin_approver", "relation_type": "owner", "method": "email_otp", "transport_channel": "[email protected]" } ] }'Validates an approval request payload and returns the workflow steps that would be created without persisting the request.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
investigation_id
string
requester_subject_type
string
requester_subject_id
string
target_subject_type
required
string
target_subject_id
required
string
request_surface
required
string
requested_action
required
string
resource_class
required
string
resource_ids
Array<string>
detail_classes
Array<string>
dataset
string
audience
string
redaction_level
string
attributes
object
key
additional properties
reason_code
required
string
reason_note
string
reference_id
string
reference
object
system
required
string
id
required
string
url
string format: uri
key
additional properties
ticket_reference
object
system
required
string
id
required
string
url
string format: uri
key
additional properties
policy_preset
required
string
reuse_scope
string
partial_access_allowed
boolean
expires_at
integer
approvals
required
Array<object>
object
step_key
required
string
side
required
string
subject_type
required
string
subject_id
string
relation_type
string
relation_source
string
method
string
transport_channel
string
expires_at
integer
key
additional properties
key
additional properties
Example
{ "investigation_id": "case_123", "target_subject_type": "user", "target_subject_id": "user_123", "request_surface": "approvals", "requested_action": "detail_read", "resource_class": "approval_transport_detail", "resource_ids": [ "apreq_123" ], "detail_classes": [ "transport_evidence" ], "audience": "admin_api", "redaction_level": "masked", "reason_code": "support_case", "reason_note": "Investigating a support request.", "reference_id": "SUP-1234", "policy_preset": "support_case_default", "reuse_scope": "request", "partial_access_allowed": false, "expires_at": 1770086400000, "approvals": [ { "subject_type": "admin_user", "subject_id": "admin_approver", "relation_type": "owner", "method": "email_otp", } ]}Responses
Section titled “ Responses ”Preview of the approval workflow that would be created.
Media type application/json
object
request
required
object
key
additional properties
steps
required
Array<object>
object
key
additional properties
key
additional properties
Example
{ "request": { "investigation_id": "case_123", "target_subject_type": "user", "target_subject_id": "user_123", "request_surface": "approvals", "requested_action": "detail_read", "resource_class": "approval_transport_detail", "resource_ids": [ "apreq_123" ], "detail_classes": [ "transport_evidence" ], "audience": "admin_api", "redaction_level": "masked", "reason_code": "support_case", "reason_note": "Investigating a support request.", "reference_id": "SUP-1234", "policy_preset": "support_case_default", "reuse_scope": "request", "partial_access_allowed": false, "expires_at": 1770086400000, "approvals": [ { "subject_type": "admin_user", "subject_id": "admin_approver", "relation_type": "owner", "method": "email_otp", } ], "requester_subject_type": "admin_user", "requester_subject_id": "admin_requester" }, "steps": [ { "subject_type": "admin_user", "subject_id": "admin_approver", "relation_type": "owner", "method": "email_otp", } ]}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}default
Section titled “default ”Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}