Skip to content

Process a $sensitive payload and check its input and output

POST
/api/v1/utils/process_sensitive_payload
curl --request POST \
--url https://app.prefactorai.com/api/v1/utils/process_sensitive_payload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": { "$sensitive": "string", "labels": [ "personal_identifiers" ], "value": "a@example.com" } }'

Runs the payload through the same $sensitive marker processing Prefactor uses when a span is ingested and read. Reports whether the markers are well-formed, whether the unwrapped payload matches the schema when one is sent, and the wire form a span read would return. Does not create a span.

JSON object in wire form; values marked with $sensitive are parsed as markers

object
key
additional properties
any
Example
{
"email": {
"$sensitive": "string",
"labels": [
"personal_identifiers"
],
"value": "a@example.com"
}
}

Success

Media typeapplication/json
object
markers_valid
required

True when every $sensitive marker in the payload is well-formed under the rules used at span ingest

boolean
output
required
One of:
object
key
additional properties
any
payload_valid
required
One of:
boolean
problems
required

Problems found. Fields start with payload for marker and payload problems, and with schema for schema document problems. Empty when every check passes

Array<object>
UtilsFieldProblem

A problem at a field path found by a schema, payload or marker check

object
field
required

Field path with the problem

string
message
required

Description of the problem

string
sensitive_encoding
required
One of:
boolean
status
required
string
Allowed values: success
Example
{
"markers_valid": true,
"output": {
"email": {
"$sensitive": "string",
"labels": [
"personal_identifiers"
],
"value": "a@example.com"
}
},
"payload_valid": true,
"problems": [],
"sensitive_encoding": true,
"status": "success"
}

Error

Media typeapplication/json
One of:
object
code
required
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action invalid_state alert_unknown alert_already_cleared invalid_value required_value idempotency_key_already_used temporarily_unavailable conflict
message
required
string
status
required
string
Allowed values: error
Example
{
"code": "bad_request",
"status": "error"
}