Redaction Job Preview

The Redaction Job object redacts Stripe objects. You can use it to coordinate the removal of personal information from selected objects, making them permanently inaccessible in the Stripe Dashboard and API.

Attributes

  • idstring

    Unique identifier for the object.

  • objectstring

    String representing the object’s type. Objects of the same type share the same value.

  • createdtimestamp

    Time at which the object was created. Measured in seconds since the Unix epoch.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • objectsnullable objectExpandable

    The objects to redact in this job.

  • statusenum

    The status of the job.

    Possible enum values
    canceled

    The job is canceled. No objects are redacted.

    canceling

    The job is canceling and no objects will be redacted.

    created

    This job is newly created and will begin validating shortly.

    failed

    The job failed to validate. View the job’s validation errors for more information.

    ready

    The job is ready to run or cancel.

    redacting

    The job is running. It is redacting the job’s specified objects.

    succeeded

    The job is complete. The job’s objects are redacted.

    validating

    The job is checking if the objects are eligible for redaction.

  • validation_behaviornullable enum

    Validation behavior determines how a job validates objects for redaction eligibility. Default is error.

    Possible enum values
    error

    The job will generate a validation error for every object that cannot be redacted. If there are any errors, all of them will need to be resolved before the job can run.

    fix

    The job will attempt to fix validation errors whenever possible. Some objects cannot be automatically fixed and will need to be resolved before the job can run.

The Redaction Job object
{
"id": "prj_123",
"object": "privacy.redaction_job",
"created": 1234567890,
"livemode": true,
"status": "validating",
"validation_behavior": "error"
}

Creates a redaction job. When a job is created, it will start to validate.

Parameters

  • objectsobjectRequired

    The objects to redact. These root objects and their related ones will be validated for redaction.

  • validation_behaviorenum

    Determines the validation behavior of the job. Default is error.

    Possible enum values
    error

    The job will generate a validation error for every object that cannot be redacted. If there are any errors, all of them will need to be resolved before the job can run.

    fix

    The job will attempt to fix validation errors whenever possible. Some objects cannot be automatically fixed and will need to be resolved before the job can run.

Returns

Returns the newly created RedactionJob object.

POST /v1/privacy/redaction_jobs
curl https://api.stripe.com/v1/privacy/redaction_jobs \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d validation_behavior=error \
-d "objects[customers][]"=cus_123
Response
{
"id": "prj_123",
"object": "privacy.redaction_job",
"created": 1234567890,
"livemode": true,
"status": "validating",
"validation_behavior": "error"
}

Updates the properties of a redaction job without running or canceling the job.

If the job to update is in a failed status, it will not automatically start to validate. Once you applied all of the changes, use the validate API to start validation again.

Parameters

  • jobstringRequired

    RedactionJob object identifier

  • validation_behaviorenum

    Determines the validation behavior of the job. Default is error.

    Possible enum values
    error

    The job will generate a validation error for every object that cannot be redacted. If there are any errors, all of them will need to be resolved before the job can run.

    fix

    The job will attempt to fix validation errors whenever possible. Some objects cannot be automatically fixed and will need to be resolved before the job can run.

Returns

Returns the RedactionJob object with the updated changes.

POST /v1/privacy/redaction_jobs/:id
curl https://api.stripe.com/v1/privacy/redaction_jobs/prj_123 \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d validation_behavior=error
Response
{
"id": "prj_123",
"object": "privacy.redaction_job",
"created": 1234567890,
"livemode": true,
"status": "failed",
"validation_behavior": "fix"
}

Retrieves the details of a previously created redaction job.

Parameters

  • jobstringRequired

    RedactionJob object identifier

Returns

Returns the RedactionJob object.

GET /v1/privacy/redaction_jobs/:id
curl https://api.stripe.com/v1/privacy/redaction_jobs/prj_123 \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "prj_123",
"object": "privacy.redaction_job",
"created": 1234567890,
"livemode": true,
"status": "ready",
"validation_behavior": "error"
}