---
title: "Redline a Contract with Playbook"
method: POST
path: "/jurist/redline-with-playbook"
tags: ["AI"]
---

# Redline a Contract with Playbook

`POST /jurist/redline-with-playbook`

## Request

- Base URL: `https://ironcladapp.com/public/api/v1`
- URL: `https://ironcladapp.com/public/api/v1/jurist/redline-with-playbook`
- Auth: API key in header `Authorization` and OAuth 2
  - Authorization code: `https://ironcladapp.com/oauth/authorize`
  - Client credentials
  - Token URL: `https://ironcladapp.com/oauth/token` scopes: `public.jurist.redlineWithPlaybook`

Run AI-generated redlines on a contract using a previously uploaded playbook. Returns suggested edits with risk scores and explanations.

**OAuth Scope required:** `public.jurist.redlineWithPlaybook`

## Request body

- object
  - `playbookToken` string, required: Token returned from the upload endpoint referencing the playbook file.
  - `contractToken` string, required: Token returned from the upload endpoint referencing the contract file.
  - `role` string: The negotiating role. Influences how redlines are suggested.
  - `negotiationPosture` string: The negotiation posture to apply.
  - `documentCategory` string: The category of the contract document.
  - `documentOrigin` string: The origin of the contract document.
  - `userContext` string: Additional context to provide to the AI when generating redlines.
  - `intent` 'redline' | 'respond_to_counterparty': The intent of the redlining operation.
  - `clauseImportanceMatrix` object: A map of clause names to their importance level. Influences how aggressively each clause is redlined.
  - `autoDetectMissingFields` boolean: When true, the AI will attempt to auto-detect and fill in missing negotiation parameters.

## Response `200`

200

- object
  - `redlines` JuristRedline[], required
    - `id` string, required: Unique identifier for the redline.
    - `analysisIds` string[], required: IDs of the analyses that contributed to this redline.
    - `sources` JuristRedlineSource[], required: Source references from the playbook that informed this redline.
      - `title` string: Title of the source reference.
      - `text` string: Text content of the source reference.
      - `variantType` string: Variant type of the source.
      - `extended_text` string: Extended text content of the source reference.
    - `edit` JuristRedlineEdit, required
      - `index` integer, required: Paragraph index in the contract where the edit applies.
      - `text` string, required: The suggested replacement text.
      - `originalText` string: The original text being replaced.
      - `title` string, required: Short title describing the edit.
      - `description` string, required: Explanation of why this edit is suggested.
      - `riskScore` string, required: Risk level of the original clause.
      - `riskDescription` string, required: Description of the risk associated with the original clause.
      - `variantType` string: Variant type of the edit.
  - `metadata` object, required
    - `workingDocument` string, required: The filename of the contract that was redlined.
    - `totalRedlines` integer, required: Total number of redlines generated.
    - `processingTime` integer, required: Time taken to process the redline request in milliseconds.
    - `model` string, required: The AI model used to generate the redlines.
  - `redlinedDocumentUrl` string: Signed URL to download the redlined DOCX with tracked changes applied. Valid for 7 days. Omitted if no redlines were generated.

## Other responses

- `400`: 400
- `401`: 401
- `403`: 403
- `404`: 404

## Changes

- **2026-11-03** `435da5a4396e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ironcladapp/apis/ironclad-public-api/changes/jurist/redline-with-playbook/post.md)

---

[API](https://skmtc.dev/ironcladapp/apis/ironclad-public-api.md) - [All operations](https://skmtc.dev/ironcladapp/apis/ironclad-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ironcladapp/apis/ironclad-public-api/revisions/435da5a4396e?raw)
