> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yorlet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a redaction

> Create a redaction for a customer. Personally identifiable fields on the customer and copied PII on invoices, applications, tenancies, payment methods and verification records are wiped asynchronously. IDs, amounts, dates, and relations are retained. The customer cannot be updated or deleted once redaction has started. Creating the same redaction again returns the existing object, or retries it if the previous attempt failed. Session users must be account admins.



## OpenAPI

````yaml openapi-core.json POST /v1/redactions
openapi: 3.1.0
info:
  title: Yorlet Core API
  description: Core platform APIs including buildings, customers, units, and tasks.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/redactions:
    post:
      tags:
        - Redactions
      summary: Create a redaction
      description: >-
        Create a redaction for a customer. Personally identifiable fields on the
        customer and copied PII on invoices, applications, tenancies, payment
        methods and verification records are wiped asynchronously. IDs, amounts,
        dates, and relations are retained. The customer cannot be updated or
        deleted once redaction has started. Creating the same redaction again
        returns the existing object, or retries it if the previous attempt
        failed. Session users must be account admins.
      operationId: redactions_create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: string
                  description: The ID of the customer to redact.
              required:
                - customer
      responses:
        '200':
          description: Returns the created redaction.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - redaction
                  customer:
                    type: string
                    description: The ID of the customer this redaction applies to.
                  error:
                    type:
                      - string
                      - 'null'
                    description: A human-readable error message when `status` is `failed`.
                  redacted_at:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      Time at which the redaction completed. Measured in seconds
                      since the Unix epoch.
                  redacted_objects:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: The ID of the redacted object.
                        object:
                          type: string
                          description: The object type that was redacted.
                      required:
                        - id
                        - object
                    description: >-
                      Objects whose personally identifiable information was
                      wiped, such as `customer`, `invoice`, `application`,
                      `tenancy`, `payment_method`, `verification_session`, and
                      `verification_report`.
                  status:
                    type: string
                    enum:
                      - processing
                      - redacted
                      - failed
                    description: >-
                      The status of the redaction. `processing` while PII is
                      being wiped, `redacted` when complete, and `failed` when
                      the job could not finish.
                required:
                  - id
                  - created
                  - object
                  - customer
                  - error
                  - redacted_at
                  - redacted_objects
                  - status
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````