Browse Security Audit Privacy

stable · api · 0.1.0

Apply a Privacy Request correction

POST /api/v1/privacy-requests/{privacyRequestId}/correction

Capability Domain: Security Audit Privacy

Authentication

platformSession — Requires recent authentication.

Scope: None

Parameters and request body

  • X-Correlation-ID — header, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }
  • privacyRequestId — path, required
    privacyRequestId schema
    {
        "type": "string",
        "format": "uuid"
    }

Request schema

application/json

application/json request schema
{
    "oneOf": [
        {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "target",
                "value"
            ],
            "properties": {
                "target": {
                    "type": "string",
                    "enum": [
                        "platform_account.preferred_locale"
                    ]
                },
                "value": {
                    "type": "string",
                    "enum": [
                        "zh-TW",
                        "en"
                    ]
                }
            }
        },
        {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "target",
                "reference_id",
                "statement"
            ],
            "properties": {
                "target": {
                    "type": "string",
                    "enum": [
                        "terms_acceptance",
                        "privacy_notice_acknowledgement",
                        "platform_session",
                        "platform_audit"
                    ]
                },
                "reference_id": {
                    "type": "string",
                    "maxLength": 180
                },
                "statement": {
                    "type": "string",
                    "maxLength": 4000
                }
            }
        }
    ]
}

application/json request example

application/json request example
{
    "target": "platform_account.preferred_locale",
    "value": "zh-TW"
}

Responses and errors

StatusDescription
200Correction applied or recorded as an append-only correction
401Invalid or revoked Project Credential
403Project Credential lacks the required scope
422Request violates the public contract

200 schema

200 response schema
{
    "type": "object",
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "type": "object",
            "required": [
                "outcome",
                "evidence"
            ],
            "properties": {
                "outcome": {
                    "type": "string",
                    "enum": [
                        "corrected",
                        "append_only_correction"
                    ]
                },
                "evidence": {
                    "type": "object",
                    "required": [
                        "type",
                        "reference"
                    ],
                    "properties": {
                        "type": {
                            "type": "string",
                            "enum": [
                                "direct_change",
                                "append_only_correction"
                            ]
                        },
                        "reference": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}

401 schema

401 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

403 schema

403 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

422 schema

422 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

200 example

200 response example
{
    "data": {
        "outcome": "corrected",
        "evidence": {
            "type": "direct_change",
            "reference": "8d000000-0000-4000-8000-000000000001"
        }
    }
}

Idempotency

Reusing the correlation identifier with the same request replays the result; changing the payload is rejected.