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

# Update the draft graph of the envelope under review

> Same contract as `PUT /v1/envelopes/{id}/draft`, scoped to the token's envelope: any subset of `participants`, `fields`, and `policy`, applied in one transaction (allowed in `draft` and `review` status only — envelopes are immutable after send). `participants` requires `fields` in the same call. `expectedVersion` is checked strictly when supplied.



## OpenAPI

````yaml /openapi.json put /api/review/draft
openapi: 3.0.0
info:
  title: Atlas API
  version: 0.0.0
servers:
  - url: https://api.atlaswork.ai
security: []
paths:
  /api/review/draft:
    put:
      tags:
        - review
      summary: Update the draft graph of the envelope under review
      description: >-
        Same contract as `PUT /v1/envelopes/{id}/draft`, scoped to the token's
        envelope: any subset of `participants`, `fields`, and `policy`, applied
        in one transaction (allowed in `draft` and `review` status only —
        envelopes are immutable after send). `participants` requires `fields` in
        the same call. `expectedVersion` is checked strictly when supplied.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                participants:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                      email:
                        type: string
                        format: email
                      company:
                        type: string
                        nullable: true
                        maxLength: 200
                      title:
                        type: string
                        nullable: true
                        maxLength: 200
                      detectedPartyIndex:
                        type: integer
                        nullable: true
                        minimum: 0
                    required:
                      - name
                      - email
                fields:
                  type: array
                  items:
                    type: object
                    properties:
                      participantIndex:
                        type: integer
                        minimum: 0
                      partyIndex:
                        type: integer
                        minimum: 0
                      type:
                        type: string
                        enum:
                          - signature
                          - initials
                          - date
                          - text
                          - checkbox
                      page:
                        type: integer
                        minimum: 1
                      x:
                        type: number
                        minimum: 0
                        maximum: 1
                      'y':
                        type: number
                        minimum: 0
                        maximum: 1
                      width:
                        type: number
                        minimum: 0
                        maximum: 1
                      height:
                        type: number
                        minimum: 0
                        maximum: 1
                      label:
                        type: string
                        nullable: true
                      required:
                        type: boolean
                      prefillValue:
                        type: string
                        nullable: true
                        description: >-
                          Static sender-supplied value for text or date fields.
                          Ignored on checkbox fields, which always remain
                          signer-controlled.
                      autoSource:
                        type: string
                        nullable: true
                        enum:
                          - signed_date
                          - participant_name
                          - participant_email
                          - participant_company
                          - participant_title
                          - sender_org_name
                          - null
                        description: >-
                          Derive this field's value server-side when the signer
                          signs: signed_date (date fields) or participant_name /
                          participant_email / participant_company /
                          participant_title / sender_org_name (text fields).
                          Mutually exclusive with prefillValue. The resolved
                          value is recorded in the envelope's audit trail.
                      proposedAutoSource:
                        type: string
                        nullable: true
                        enum:
                          - signed_date
                          - participant_name
                          - participant_email
                          - participant_company
                          - participant_title
                          - sender_org_name
                          - null
                        description: >-
                          Detection-proposal echo. On draft updates, echo the
                          proposedAutoSource you read to keep the suggestion;
                          omitting or nulling it dismisses it. Cannot introduce
                          or change a proposal (detection is the only origin);
                          ignored at envelope create.
                      source:
                        type: string
                        enum:
                          - detected
                          - manual
                          - template
                    required:
                      - type
                      - page
                      - x
                      - 'y'
                      - width
                      - height
                policy:
                  type: object
                  properties:
                    deliveryMode:
                      type: string
                      enum:
                        - review_first
                        - auto_send
                    legalFramework:
                      type: string
                      nullable: true
                    consumerDisclosure:
                      type: boolean
                    expiresAt:
                      type: string
                      format: date-time
                    reminderPolicy:
                      nullable: true
                sender:
                  nullable: true
                displayName:
                  type: string
                  nullable: true
                expectedVersion:
                  type: integer
                  minimum: 1
      responses:
        '200':
          description: The updated envelope graph (final version after all bumps)
          content:
            application/json:
              schema:
                type: object
                properties:
                  envelope:
                    type: object
                    properties:
                      id:
                        type: string
                      organizationId:
                        type: string
                      teamId:
                        type: string
                      templateId:
                        type: string
                        nullable: true
                      templateContentHash:
                        type: string
                        nullable: true
                      status:
                        type: string
                        enum:
                          - draft
                          - detecting
                          - review
                          - in_progress
                          - completed
                          - declined
                          - voided
                          - expired
                      detectionStatus:
                        type: string
                        enum:
                          - none
                          - running
                          - succeeded
                          - failed
                      version:
                        type: integer
                      originalFilename:
                        type: string
                        nullable: true
                      displayName:
                        type: string
                        nullable: true
                      sourceFormat:
                        type: string
                        nullable: true
                      contentHash:
                        type: string
                        nullable: true
                      sizeBytes:
                        type: number
                        nullable: true
                      deliveryMode:
                        type: string
                      legalFramework:
                        type: string
                        nullable: true
                      consumerDisclosure:
                        type: boolean
                      expiresAt:
                        type: string
                        nullable: true
                        format: date-time
                      scheduledSendAt:
                        type: string
                        nullable: true
                        format: date-time
                      reminderPolicy:
                        nullable: true
                      sentAt:
                        type: string
                        nullable: true
                        format: date-time
                      completedAt:
                        type: string
                        nullable: true
                        format: date-time
                      declinedAt:
                        type: string
                        nullable: true
                        format: date-time
                      voidedAt:
                        type: string
                        nullable: true
                        format: date-time
                      expiredAt:
                        type: string
                        nullable: true
                        format: date-time
                      metadata:
                        nullable: true
                      senderUserId:
                        type: string
                        nullable: true
                      senderName:
                        type: string
                        nullable: true
                      senderEmail:
                        type: string
                        nullable: true
                      detectedParties:
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - organizationId
                      - teamId
                      - templateId
                      - templateContentHash
                      - status
                      - detectionStatus
                      - version
                      - originalFilename
                      - displayName
                      - sourceFormat
                      - contentHash
                      - sizeBytes
                      - deliveryMode
                      - legalFramework
                      - consumerDisclosure
                      - expiresAt
                      - scheduledSendAt
                      - sentAt
                      - completedAt
                      - declinedAt
                      - voidedAt
                      - expiredAt
                      - createdAt
                      - updatedAt
                  participants:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        envelopeId:
                          type: string
                        organizationId:
                          type: string
                        orderIndex:
                          type: integer
                        name:
                          type: string
                        email:
                          type: string
                        company:
                          type: string
                          nullable: true
                        title:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - pending
                            - signed
                            - declined
                        detectedPartyIndex:
                          type: integer
                          nullable: true
                        consentedAt:
                          type: string
                          nullable: true
                          format: date-time
                        signedAt:
                          type: string
                          nullable: true
                          format: date-time
                        declinedAt:
                          type: string
                          nullable: true
                          format: date-time
                        declineReason:
                          type: string
                          nullable: true
                        lastViewedAt:
                          type: string
                          nullable: true
                          format: date-time
                        lastIpAddress:
                          type: string
                          nullable: true
                        lastUserAgent:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - envelopeId
                        - organizationId
                        - orderIndex
                        - name
                        - email
                        - status
                        - consentedAt
                        - signedAt
                        - declinedAt
                        - declineReason
                        - lastViewedAt
                        - lastIpAddress
                        - lastUserAgent
                        - createdAt
                        - updatedAt
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        envelopeId:
                          type: string
                        organizationId:
                          type: string
                        participantId:
                          type: string
                          nullable: true
                        partyIndex:
                          type: integer
                          nullable: true
                        type:
                          type: string
                          enum:
                            - signature
                            - initials
                            - date
                            - text
                            - checkbox
                        page:
                          type: integer
                        x:
                          type: number
                        'y':
                          type: number
                        width:
                          type: number
                        height:
                          type: number
                        label:
                          type: string
                          nullable: true
                        required:
                          type: boolean
                        source:
                          type: string
                          enum:
                            - detected
                            - manual
                            - template
                        prefillValue:
                          type: string
                          nullable: true
                        locked:
                          type: boolean
                        autoSource:
                          type: string
                          nullable: true
                          enum:
                            - signed_date
                            - participant_name
                            - participant_email
                            - participant_company
                            - participant_title
                            - sender_org_name
                            - null
                        proposedAutoSource:
                          type: string
                          nullable: true
                          enum:
                            - signed_date
                            - participant_name
                            - participant_email
                            - participant_company
                            - participant_title
                            - sender_org_name
                            - null
                        value:
                          type: string
                          nullable: true
                        filledAt:
                          type: string
                          nullable: true
                          format: date-time
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - envelopeId
                        - organizationId
                        - participantId
                        - type
                        - page
                        - x
                        - 'y'
                        - width
                        - height
                        - label
                        - required
                        - source
                        - prefillValue
                        - locked
                        - autoSource
                        - proposedAutoSource
                        - value
                        - filledAt
                        - createdAt
                        - updatedAt
                required:
                  - envelope
                  - participants
                  - fields
        '401':
          description: Missing or invalid review token
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
        '403':
          description: Token lacks read capability
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
        '404':
          description: The token's envelope no longer exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
        '409':
          description: Stale expectedVersion (concurrent modification)
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
        '422':
          description: >-
            Validation failed: envelope not in draft/review, participants
            without fields, duplicate emails, or out-of-bounds participantIndex
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - code
                  - message
      security:
        - reviewToken: []
components:
  securitySchemes:
    reviewToken:
      type: http
      scheme: bearer
      description: >-
        HMAC-signed review token (minted into the envelope's review URL at
        creation), as a bearer token or a `token` query param. Capabilities are
        split per token: a read token grants view + draft editing, a send token
        grants the dispatch action only — so a forwarded review link can be
        shared read-only. Scoped to exactly one envelope; never valid as a
        signer credential.

````