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

# Paste clause references

> Duplicates clause references during a paste operation by mapping old reference IDs to new IDs supplied in `oldToNewClauseReferenceIds`.

Verifies read access to all source documents and edit access to the destination `documentId`.

Returns the newly created `ClauseReference` array.



## OpenAPI

````yaml post /clause-reference/paste
openapi: 3.1.0
info:
  title: HERO API
  version: current
  description: |-
    The HERO REST API.

    See https://developers.myhero.so for the rendered docs.
servers:
  - url: https://app.myhero.so
security: []
paths:
  /clause-reference/paste:
    post:
      tags:
        - Clauses
      summary: Paste clause references
      description: >-
        Duplicates clause references during a paste operation by mapping old
        reference IDs to new IDs supplied in `oldToNewClauseReferenceIds`.


        Verifies read access to all source documents and edit access to the
        destination `documentId`.


        Returns the newly created `ClauseReference` array.
      operationId: createPastedClauseReferences
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                oldToNewClauseReferenceIds:
                  type: object
                  additionalProperties:
                    type: string
                documentId:
                  type: string
                  minLength: 1
              required:
                - oldToNewClauseReferenceIds
                - documentId
      responses:
        '201':
          description: 201 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                        originId:
                          type: string
                        blockId:
                          type: string
                        documentId:
                          type: string
                        workspaceId:
                          type: string
                        hierarchy:
                          type: string
                        createdAt:
                          type: number
                        updatedAt:
                          type: number
                        isDeleted:
                          type: boolean
                          example: false
                      required:
                        - _id
                        - blockId
                        - documentId
                        - workspaceId
                        - hierarchy
                        - createdAt
                        - updatedAt
                  version:
                    type: number
                    enum:
                      - 1
                required:
                  - data
                  - version
        '400':
          description: 400 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
        '403':
          description: 403 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: HERO personal access token

````