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

# Submit a redaction job

> Create a new redaction job with status `pending` and start the asynchronous redaction process.




## OpenAPI

````yaml /api-reference/files/openapi.yaml post /v1/redactions
openapi: 3.0.0
info:
  title: Files & Requests API
  version: 1.2.0
  description: >
    Manage evidence and claims requests, attach exhibits, fill state-specific
    templates, generate PDF files, run PDF redaction jobs, and store and
    retrieve a matter's files and media.
  contact:
    name: Slate API Support
    email: api-support@slate.inc
    url: https://slate.inc
servers:
  - url: https://api.slate.inc/files
    description: Production
  - url: https://api.uat.slate.inc/files
    description: UAT (staging)
security:
  - bearerAuth: []
tags:
  - name: Requests
    description: Create, read, update, and generate evidence and claims requests
  - name: Exhibits
    description: Upload, download, and delete exhibits
  - name: Files
    description: Files and media associated with a matter
  - name: Redactions
    description: Asynchronous PDF redaction jobs
  - name: Bulk Downloads
    description: Asynchronous bulk download jobs
paths:
  /v1/redactions:
    post:
      tags:
        - Redactions
      summary: Submit a redaction job
      description: >
        Create a new redaction job with status `pending` and start the
        asynchronous redaction process.
      operationId: submitRedaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedactionCreate'
      responses:
        '202':
          description: Redaction job accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedactionCreateResponse'
        '400':
          description: Invalid redaction parameters or label range out of bounds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized or invalid permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Matter or file not found, or you do not have permission to access it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Source file upload has not completed; retry after the upload is
            verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RedactionCreate:
      type: object
      required:
        - matterId
        - fileId
      properties:
        matterId:
          type: string
          format: uuid
          description: >
            Matter identifier the redaction job belongs to. You must have read
            access to the matter.
        fileId:
          type: string
          format: uuid
          description: Source file to redact (must already exist under the matter)
        rules:
          type: array
          description: >
            Custom-string rules. Default rules derived from the matter
            (account-number base, spaced, and hyphenated variants, plus SSN
            hyphenated and digits-only forms) are merged in when omitted;
            explicit rules append to those defaults.
          items:
            $ref: '#/components/schemas/RedactionRule'
        labeling:
          allOf:
            - $ref: '#/components/schemas/RedactionLabeling'
          description: >
            Optional exhibit labeling. Omit (or send `{mode: none, ranges: []}`)
            for no labels. Overlapping ranges or `none` with non-empty ranges
            return 400.
        configuration:
          allOf:
            - $ref: '#/components/schemas/RedactionConfiguration'
          description: >
            Optional per-job redaction settings (OCR). Omitted means text-only
            redaction with no OCR.
    RedactionCreateResponse:
      type: object
      required:
        - id
        - status
        - pollUrl
      properties:
        id:
          type: string
          format: uuid
          description: Identifier of the created redaction job
        status:
          $ref: '#/components/schemas/RedactionStatus'
        pollUrl:
          type: string
          description: Path to the detail endpoint for status polling
    Error:
      type: object
      required:
        - message
        - reason
      properties:
        message:
          type: string
          description: A human readable error message
        reason:
          $ref: '#/components/schemas/ErrorReason'
    RedactionRule:
      type: object
      required:
        - match
        - transform
      properties:
        match:
          $ref: '#/components/schemas/Match'
        transform:
          $ref: '#/components/schemas/Transform'
    RedactionLabeling:
      type: object
      required:
        - mode
        - ranges
      description: |
        Exhibit labeling configuration for a redaction job. `mode` is the
        labeling style applied across every range; per-range mode is not
        supported. When `mode` is `none`, `ranges` must be empty.
        Otherwise `ranges` must contain at least one non-overlapping range.
      properties:
        mode:
          $ref: '#/components/schemas/LabelingMode'
        ranges:
          type: array
          items:
            $ref: '#/components/schemas/RedactionLabelRange'
    RedactionConfiguration:
      type: object
      description: Per-job redaction settings.
      properties:
        ocr:
          $ref: '#/components/schemas/RedactionOcrOptions'
    RedactionStatus:
      type: string
      description: Current status of an asynchronous redaction job
      enum:
        - pending
        - processing
        - completed
        - failed
    ErrorReason:
      type: string
      enum:
        - MISSING_TOKEN_OR_PERMISSIONS
        - NO_MATCHING_TRIGGER
        - OWNER_REQUIRED
        - FILE_REQUEST_NOT_PENDING
        - DUPLICATE_FILE_REQUEST
        - TEMPLATE_TYPE_REQUIRED
        - TEMPLATE_INDEX_REQUIRED
        - INVALID_MATTER_ID
        - MATTER_ID_REQUIRED
        - MATTER_NOT_FOUND
        - FILES_LIST_EMPTY
        - TOO_MANY_FILES
        - FILE_NAME_REQUIRED
        - FILE_NAME_MUST_BE_PDF
        - INVALID_FILE_TYPE
        - INVALID_TEMPLATE_IDENTIFIER
        - GENERATION_FAILED
        - EXHIBIT_ORDER_REQUIRED
        - CRID_REQUIRED
        - INVALID_FILE_NAME
        - ARTIFACT_TAG_NOT_FOUND
        - INVALID_LIMIT
        - INVALID_CURSOR
        - INVALID_ORDER_BY
        - MISSING_FILTER_DEPENDENCY
        - INVALID_FILTER
        - REQUEST_BODY_REQUIRED
        - INVALID_LABEL_RANGE
        - INVALID_REDACTION_RULE
        - REDACTION_NOT_FOUND
        - REDACTION_NOT_READY
        - FILE_UPLOAD_PENDING
        - BULK_DOWNLOAD_NOT_FOUND
        - BULK_DOWNLOAD_NOT_READY
    Match:
      description: |
        What a redaction rule matches against. Discriminated by `type`.
        Only `literal` is supported today; detector and regex variants will
        be added in later revisions as additional `oneOf` members.
      oneOf:
        - $ref: '#/components/schemas/LiteralMatch'
      discriminator:
        propertyName: type
        mapping:
          literal:
            $ref: '#/components/schemas/LiteralMatch'
    Transform:
      description: |
        How a matched span is transformed. Discriminated by `type`.
        Only `mask` (with an optional keep window) is supported today;
        future transforms (replace, redact, hash, shift, …) will be added as
        additional `oneOf` members.
      oneOf:
        - $ref: '#/components/schemas/MaskTransform'
      discriminator:
        propertyName: type
        mapping:
          mask:
            $ref: '#/components/schemas/MaskTransform'
    LabelingMode:
      type: string
      enum:
        - numbers
        - letters
        - pageNumbers
        - none
    RedactionLabelRange:
      type: object
      required:
        - startPage
        - endPage
      properties:
        startPage:
          type: integer
          minimum: 1
          description: First page in the range (1-indexed, inclusive)
        endPage:
          type: integer
          minimum: 1
          description: Last page in the range (1-indexed, inclusive)
    RedactionOcrOptions:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: When true, scanned or image pages are OCR'd and redacted.
        engine:
          type: string
          description: >
            OCR engine to use. Supported values: `tesseract-cli` and
            `tesseract-jna`. Omit to use the default engine. Unsupported engines
            are rejected.
          example: tesseract-jna
    LiteralMatch:
      type: object
      required:
        - type
        - value
      description: Matches an exact literal string in the document text.
      properties:
        type:
          type: string
          enum:
            - literal
        value:
          type: string
          minLength: 1
          maxLength: 256
    MaskTransform:
      type: object
      required:
        - type
      description: |
        Masks the matched span with asterisks, optionally leaving a
        window of characters visible. Omit `keep` to mask everything.
      properties:
        type:
          type: string
          enum:
            - mask
        keep:
          $ref: '#/components/schemas/RedactionKeep'
    RedactionKeep:
      type: object
      required:
        - from
        - length
      description: |
        Window of maskable characters to leave untouched when applying a
        mask transform. Indexed over the maskable-char sequence
        (alphanumerics only; spaces and hyphens are skipped). Negative
        `from` counts back from the end of the maskable-char sequence.
          { from: 0,  length: 4 }   keep first 4
          { from: -4, length: 4 }   keep last 4
          { from: -8, length: 4 }   keep middle (e.g. PLL loan account)
      properties:
        from:
          type: integer
          minimum: -64
          maximum: 64
        length:
          type: integer
          minimum: 0
          maximum: 64
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Cognito-issued JWT access token. Send it as `Authorization: Bearer
        <token>`.

````