# PostIdentityVerificationSessionsSessionRedact

From **Stripe API**.

`POST /v1/identity/verification_sessions/{session}/redact`

<p>Redact a VerificationSession to remove all collected information from Stripe. This will redact
the VerificationSession and all objects related to it, including VerificationReports, Events,
request logs, etc.</p>

<p>A VerificationSession object can be redacted when it is in <code>requires_input</code> or <code>verified</code>
<a href="/docs/identity/how-sessions-work">status</a>. Redacting a VerificationSession in <code>requires_action</code>
state will automatically cancel it.</p>

<p>The redaction process may take up to four days. When the redaction process is in progress, the
VerificationSession’s <code>redaction.status</code> field will be set to <code>processing</code>; when the process is
finished, it will change to <code>redacted</code> and an <code>identity.verification_session.redacted</code> event
will be emitted.</p>

<p>Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
fields that contain personal data will be replaced by the string <code>[redacted]</code> or a similar
placeholder. The <code>metadata</code> field will also be erased. Redacted objects cannot be updated or
used for any purpose.</p>

<p><a href="/docs/identity/verification-sessions#redact">Learn more</a>.</p>

## Parameters

### `session`

- Location: path
- Required: true
- Type: `string`
- maxLength: `5000`

## Request body

- Required: false
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"properties":{"expand":{"description":"Specifies which fields in the response should be expanded.","items":{"maxLength":5000,"type":"string"},"type":"array"}},"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

A VerificationSession guides you through the process of collecting and verifying the identities
of your users. It contains details about the type of verification, such as what [verification
check](/docs/identity/verification-checks) to perform. Only create one VerificationSession for
each verification in your system.

A VerificationSession transitions through [multiple
statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through
the verification flow. The VerificationSession contains the user’s verified data after
verification checks are complete.

Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)

```json
{"description":"A VerificationSession guides you through the process of collecting and verifying the identities\nof your users. It contains details about the type of verification, such as what [verification\ncheck](/docs/identity/verification-checks) to perform. Only create one VerificationSession for\neach verification in your system.\n\nA VerificationSession transitions through [multiple\nstatuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through\nthe verification flow. The VerificationSession contains the user’s verified data after\nverification checks are complete.\n\nRelated guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)","properties":{"client_secret":{"description":"The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.","maxLength":5000,"nullable":true,"type":"string"},"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/gelato_session_last_error"}],"description":"If present, this property tells you the last error encountered when processing the verification.","nullable":true},"last_verification_report":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/identity.verification_report"}],"description":"ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/identity.verification_report"}]}},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.","type":"object"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["identity.verification_session"],"type":"string"},"options":{"$ref":"#/components/schemas/gelato_verification_session_options"},"redaction":{"anyOf":[{"$ref":"#/components/schemas/verification_session_redaction"}],"description":"Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.","nullable":true},"status":{"description":"Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).","enum":["canceled","processing","requires_input","verified"],"type":"string"},"type":{"description":"The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.","enum":["document","id_number"],"type":"string","x-stripeBypassValidation":true},"url":{"description":"The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web\u0026type=redirect) to learn how to redirect users to Stripe.","maxLength":5000,"nullable":true,"type":"string"},"verified_outputs":{"anyOf":[{"$ref":"#/components/schemas/gelato_verified_outputs"}],"description":"The user’s verified data.","nullable":true}},"required":["created","id","livemode","metadata","object","options","status","type"],"title":"GelatoVerificationSession","type":"object","x-expandableFields":["last_error","last_verification_report","options","redaction","verified_outputs"],"x-resourceId":"identity.verification_session"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url https://api.stripe.com/v1/identity/verification_sessions/{session}/redact \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{
  "expand": [
    "string"
  ]
}'
```
