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

# Update document



## OpenAPI

````yaml patch /v1/documents/{id}
openapi: 3.0.0
info:
  title: Document APIs Specification
  description: Section for description
  version: '1.0'
  contact: {}
servers:
  - url: https://staging.api.us.aptlydone.com/document
  - url: https://staging.api.eu.aptlydone.com/document
  - url: https://api.us.aptlydone.com/document
  - url: https://api.eu.aptlydone.com/document
security: []
tags: []
paths:
  /v1/documents/{id}:
    patch:
      tags:
        - documents
      summary: Update document
      operationId: DocumentController_updateDocument_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentUpdateDto'
      responses:
        '200':
          description: Document updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResponseDto'
      security:
        - accessToken: []
components:
  schemas:
    DocumentUpdateDto:
      type: object
      properties:
        documentName:
          type: string
          maxLength: 150
          description: Name of the document
          example: Global Delegation of Authority Policy - ProxyComm Inc.
        documentDescription:
          type: string
          maxLength: 250
          description: Description of the document
          example: >-
            Defines the framework for delegating authority across ProxyComm's
            global operations, outlining roles, responsibilities, and
            decision-making limits.
        documentMetadata:
          type: object
          description: Metadata of the document in JSON format
          example: '{ "code": "GOV-DFA-2", "version": "2024.2" }'
        fileId:
          type: string
          format: uuid
          description: Unique identifier for the associated file for UPLOADED documents
          example: 550e8400-e29b-41d4-a716-446655440001
        documentTypeId:
          type: string
          format: uuid
          description: Optional identifier for document type
          example: 550e8400-e29b-41d4-a716-446655440002
        documentTypeName:
          type: string
          maxLength: 255
          description: Document type name
          example: Policy
        documentStatus:
          type: string
          default: DRAFT
          description: Status of the document
          enum:
            - DRAFT
            - PUBLISHED
          example: DRAFT
        documentSharingType:
          type: string
          description: Sharing type of the document
          enum:
            - PUBLIC
            - RESTRICTED
            - SHARED
          example: RESTRICTED
        documentIcon:
          type: string
          maxLength: 20
          description: Icon representing the document
          example: link-outlined
        documentOwnerId:
          type: string
          format: uuid
          description: Unique identifier of the document owner
          example: 550e8400-e29b-41d4-a716-446655440003
        documentOwnerUsername:
          type: string
          maxLength: 100
          description: Document owner username
          example: John Doe
        documentUploadType:
          type: string
          description: Type of document upload
          enum:
            - LINKED
            - UPLOADED
          example: LINKED
        documentUrl:
          type: string
          description: Url for the LINKED document
          example: intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy
        documentSharingGroups:
          description: Document Sharing Groups
          example:
            - groupId: 550e8400-e29b-41d4-a716-446655440013
              tenantGroupTypeId: 550e8400-e29b-41d4-a716-446655440023
          type: array
          items:
            $ref: '#/components/schemas/DocumentSharingGroupDto'
        documentSharingUsers:
          description: Document Sharing Users
          example:
            - userId: 550e8400-e29b-41d4-a716-446655440033
          type: array
          items:
            $ref: '#/components/schemas/DocumentSharingUserDto'
        documentOversights:
          description: Document Sharing Groups
          example:
            documentId: 550e8400-e29b-41d4-a716-446655440013
            responsibleUsername: Neha Patel
            responsibleUserId: 550e8400-e29b-41d4-a716-446655440023
          allOf:
            - $ref: '#/components/schemas/DocumentOversightDto'
        documentLinking:
          description: Document Linking with decisions and delegations
          example:
            decisionLinkAllowed: true
            delegationLinkAllowed: true
          allOf:
            - $ref: '#/components/schemas/DocumentSettingsLinking'
      required:
        - documentName
        - documentDescription
        - documentIcon
        - documentOwnerId
        - documentOwnerUsername
    DocumentResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
          example: 550e8400-e29b-41d4-a716-446655440100
        tenantId:
          type: string
          description: Unique identifier for the tenant
          example: 550e8400-e29b-41d4-a716-446655440000
        documentName:
          type: string
          description: Name of the document
          example: Global Delegation of Authority Policy - ProxyComm Inc.
        documentDescription:
          type: string
          description: Description of the document
          example: >-
            Defines the framework for delegating authority across ProxyComm's
            global operations, outlining roles, responsibilities, and
            decision-making limits to ensure compliance, accountability, and
            operational consistency.
        documentMetadata:
          type: object
          description: Metadata of the document in JSON format
          example: '{ "code": "GOV-DFA-2", "version": "2024.2" }'
        fileId:
          type: string
          nullable: true
          description: Unique identifier for the associated file
          example: 550e8400-e29b-41d4-a716-446655440001
        documentTypeId:
          type: string
          nullable: true
          description: Optional identifier for document type
          example: 550e8400-e29b-41d4-a716-446655440002
        documentStatus:
          type: string
          description: Status of the document
          enum:
            - DRAFT
            - PUBLISHED
            - ARCHIVED
            - DELETED
          example: DRAFT
        documentSharingType:
          type: string
          description: Sharing type of the document
          enum:
            - PUBLIC
            - RESTRICTED
            - SHARED
          example: RESTRICTED
        documentIcon:
          type: string
          description: Icon representing the document
          example: link-outlined
        documentOwnerId:
          type: string
          description: Unique identifier of the document owner
          example: 550e8400-e29b-41d4-a716-446655440003
        documentUploadType:
          type: string
          description: Type of document upload
          enum:
            - LINKED
            - UPLOADED
          example: LINKED
        documentUrl:
          type: string
          nullable: true
          description: Url for the LINKED document
          example: intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy
        uploadedOn:
          format: date-time
          type: string
          description: Date when the document was uploaded
          example: '2025-02-13T12:00:00Z'
        lastUpdatedBy:
          type: string
          nullable: true
          description: Unique identifier of the last user who updated the document
          example: 550e8400-e29b-41d4-a716-446655440004
        lastUpdatedOn:
          format: date-time
          type: string
          nullable: true
          description: Date when the document was last updated
          example: '2025-02-14T15:30:00Z'
        archivedOn:
          format: date-time
          type: string
          nullable: true
          description: Date when the document was archived
          example: '2025-03-01T10:00:00Z'
        deletedOn:
          format: date-time
          type: string
          nullable: true
          description: Date when the document was deleted
          example: '2025-04-01T12:00:00Z'
        documentDisplayId:
          type: string
          description: Document Display ID
          example: '10000'
        link:
          type: string
          example: >-
            /documents/view/eyJ0ZW5hbnRJZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsImRvY3VtZW50SWQiOiJjMDBjMGNkNy03ZmJjLTRmZTEtOWYxMy1lYzc5OTlmMjhjNDgifQ==
          description: Document Link
      required:
        - id
        - tenantId
        - documentName
        - documentDescription
        - documentMetadata
        - fileId
        - documentTypeId
        - documentStatus
        - documentSharingType
        - documentIcon
        - documentOwnerId
        - documentUploadType
        - documentUrl
        - uploadedOn
        - lastUpdatedBy
        - lastUpdatedOn
        - archivedOn
        - deletedOn
        - documentDisplayId
        - link
    DocumentSharingGroupDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the group
          example: 550e8400-e29b-41d4-a716-446655440012
        groupId:
          type: string
          format: uuid
          description: Unique identifier for the group
          example: 550e8400-e29b-41d4-a716-446655440012
        tenantGroupTypeId:
          type: string
          format: uuid
          description: Unique identifier for the tenant group type
          example: 550e8400-e29b-41d4-a716-446655440013
      required:
        - id
        - groupId
        - tenantGroupTypeId
    DocumentSharingUserDto:
      type: object
      properties:
        userId:
          type: string
          format: uuid
          description: Unique identifier for the user
          example: 550e8400-e29b-41d4-a716-446655440012
        id:
          type: string
          format: uuid
          description: Unique identifier for the group
          example: 550e8400-e29b-41d4-a716-446655440012
        documentId:
          type: string
          format: uuid
          description: Document ID associated with the detailed document
          example: 550e8400-e29b-41d4-a716-446655440100
      required:
        - userId
        - id
        - documentId
    DocumentOversightDto:
      type: object
      properties:
        responsibleUserId:
          type: string
          nullable: true
          description: User ID responsible for the document
          example: 550e8400-e29b-41d4-a716-446655440002
        responsibleUsername:
          type: string
          nullable: true
          description: Username of the responsible user
          example: John Doe
        reviewerUserId:
          type: string
          nullable: true
          description: User ID of the reviewer
          example: 550e8400-e29b-41d4-a716-446655440003
        reviewerUsername:
          type: string
          nullable: true
          description: Username of the reviewer
          example: John Doe
        reviewerPositionId:
          type: string
          nullable: true
          description: Position ID of the reviewer
          example: 550e8400-e29b-41d4-a716-446655440004
        reviewerPositionName:
          type: string
          nullable: true
          description: Position name of the reviewer
          example: Sr. Corporate Counsel
        approverUserId:
          type: string
          nullable: true
          description: User ID of the approver
          example: 550e8400-e29b-41d4-a716-446655440005
        approverUsername:
          type: string
          nullable: true
          description: Username of the approver
          example: John Doe
        approverPositionId:
          type: string
          nullable: true
          description: Position ID of the approver
          example: 550e8400-e29b-41d4-a716-446655440006
        approverPositionName:
          type: string
          nullable: true
          description: Position name of the approver
          example: Sr. Corporate Counsel
        responsibleUsers:
          description: Responsible users IDs
          example: '["fe001dc6-df57-48de-a5c7-e94106a3309b"]'
          nullable: true
          type: array
          items:
            type: string
        reviewers:
          description: reviewers users IDs
          example: '["fe001dc6-df57-48de-a5c7-e94106a3309b"]'
          nullable: true
          type: array
          items:
            type: string
        approvers:
          description: approvers users IDs
          example: '["fe001dc6-df57-48de-a5c7-e94106a3309b"]'
          nullable: true
          type: array
          items:
            type: string
    DocumentSettingsLinking:
      type: object
      properties:
        decisionLinkAllowed:
          type: boolean
          description: allow document link for decision
          example: 'true'
        delegationLinkAllowed:
          type: boolean
          description: allow document link for delegation
          example: 'true'
      required:
        - decisionLinkAllowed
        - delegationLinkAllowed
  securitySchemes:
    accessToken:
      scheme: bearer
      bearerFormat: JWT
      type: http

````