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

# Create contract document

> Create a contract document in the contract library.



## OpenAPI

````yaml post /v1/contracts/documents
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/contracts/documents:
    post:
      tags:
        - Contracts > Documents
      summary: Create contract document
      description: Create a contract document in the contract library.
      operationId: createContractDocument
      requestBody:
        description: Contract document creation payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContractDocument'
      responses:
        '201':
          description: Contract document created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDocument'
        '400':
          description: Invalid contract document.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    CreateContractDocument:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Name of the contract document, displayed in the contract library.
          example: Data Processing Agreement
        invoicing_entity_ids:
          type: array
          items:
            type: string
          description: >-
            IDs of the invoicing entities for which the contract document is
            available when building a quote.
          example:
            - ive_jerrb484RHn
      required:
        - name
      additionalProperties: false
    ContractDocument:
      type: object
      properties:
        id:
          type: string
          description: Contract document ID.
          example: cot_8kTq3VdNcR1aLp
        name:
          type: string
          description: Name of the contract document, displayed in the contract library.
          example: Data Processing Agreement
        invoicing_entity_ids:
          type: array
          items:
            type: string
          description: >-
            IDs of the invoicing entities for which the contract document is
            available when building a quote.
          example:
            - ive_jerrb484RHn
        contents:
          type: array
          items:
            $ref: '#/components/schemas/ContractDocumentContent'
          description: >-
            Versions of the document per language and countries. The content
            matching the customer language and country is attached to the quote,
            falling back to the `default` language.
        created_at:
          type: string
          format: date-time
          description: >-
            Creation date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2024-06-03T12:32:22Z'
        updated_at:
          type: string
          format: date-time
          description: >-
            Last edition date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2024-06-07T18:13:25Z'
      required:
        - id
        - name
        - invoicing_entity_ids
        - contents
        - created_at
        - updated_at
    ContractDocumentContent:
      type: object
      properties:
        id:
          type: string
          description: Contract document content ID.
          example: ctc_Hn2Lq8VwRt5xKe
        language:
          type: string
          enum:
            - fr
            - en
            - de
            - it
            - lt
            - nl
            - es
            - pt
            - pl
            - default
          description: >-
            Language of the content. `default` is used when no content exists
            for the customer language.
          example: fr
        countries:
          type: array
          items:
            type: string
            enum:
              - AD
              - AE
              - AF
              - AG
              - AI
              - AL
              - AM
              - AO
              - AQ
              - AR
              - AS
              - AT
              - AU
              - AW
              - AX
              - AZ
              - BA
              - BB
              - BD
              - BE
              - BG
              - BH
              - BI
              - BJ
              - BL
              - BM
              - BN
              - BO
              - BQ
              - BR
              - BS
              - BT
              - BF
              - BV
              - BW
              - BY
              - BZ
              - CA
              - CC
              - CD
              - CF
              - CG
              - CH
              - CI
              - CK
              - CL
              - CM
              - CN
              - CO
              - CR
              - CU
              - CV
              - CW
              - CX
              - CY
              - CZ
              - DE
              - DJ
              - DK
              - DM
              - DO
              - DZ
              - EC
              - EE
              - EG
              - EH
              - ER
              - ES
              - ES-CE
              - ES-ML
              - ET
              - FI
              - FJ
              - FK
              - FM
              - FO
              - FR
              - GA
              - GB
              - GD
              - GE
              - GF
              - GG
              - GH
              - GI
              - GL
              - GM
              - GN
              - GP
              - GQ
              - GR
              - GS
              - GT
              - GU
              - GW
              - GY
              - HK
              - HM
              - HN
              - HR
              - HT
              - HU
              - IC
              - ID
              - IE
              - IL
              - IM
              - IN
              - IO
              - IQ
              - IR
              - IS
              - IT
              - JE
              - JM
              - JO
              - JP
              - KE
              - KG
              - KH
              - KI
              - KM
              - KN
              - KP
              - KR
              - KW
              - KY
              - KZ
              - LA
              - LB
              - LC
              - LI
              - LK
              - LR
              - LS
              - LT
              - LU
              - LV
              - LY
              - MA
              - MC
              - MD
              - ME
              - MF
              - MG
              - MH
              - MK
              - ML
              - MM
              - MN
              - MO
              - MP
              - MQ
              - MR
              - MS
              - MT
              - MU
              - MV
              - MW
              - MX
              - MY
              - MZ
              - NA
              - NC
              - NE
              - NF
              - NG
              - NI
              - NL
              - 'NO'
              - NP
              - NR
              - NU
              - NZ
              - OM
              - PA
              - PE
              - PF
              - PG
              - PH
              - PK
              - PL
              - PM
              - PN
              - PR
              - PS
              - PT
              - PT-20
              - PT-30
              - PW
              - PY
              - QA
              - RE
              - RO
              - RS
              - RU
              - RW
              - SA
              - SB
              - SC
              - SD
              - SE
              - SG
              - SH
              - SI
              - SJ
              - SK
              - SL
              - SM
              - SN
              - SO
              - SR
              - SS
              - ST
              - SV
              - SX
              - SY
              - SZ
              - TC
              - TD
              - TF
              - TG
              - TH
              - TJ
              - TK
              - TL
              - TM
              - TN
              - TO
              - TR
              - TT
              - TV
              - TW
              - TZ
              - UA
              - UG
              - UM
              - US
              - UY
              - UZ
              - VA
              - VC
              - VE
              - VG
              - VI
              - VN
              - VU
              - WF
              - WS
              - XK
              - YE
              - YT
              - ZA
              - ZM
              - ZW
            description: >-
              Two-letter country code in ISO format. See [ISO 3166-1
              alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
            example: FR
          description: >-
            Countries the content applies to, as ISO 3166-1 alpha-2 codes. Empty
            means all countries. In a multipart request, send a comma-separated
            list.
          example:
            - FR
            - BE
        files:
          type: array
          items:
            $ref: '#/components/schemas/ContractDocumentFile'
          description: >-
            Files of the content, in order. They are attached to quotes and
            merged into the signed PDF.
        created_at:
          type: string
          format: date-time
          description: >-
            Creation date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2024-06-03T12:32:22Z'
        updated_at:
          type: string
          format: date-time
          description: >-
            Last edition date. UTC date time string in the [ISO
            8601](https://en.wikipedia.org/wiki/ISO_8601) format.
          example: '2024-06-07T18:13:25Z'
      required:
        - id
        - language
        - countries
        - files
        - created_at
        - updated_at
    ContractDocumentFile:
      type: object
      properties:
        id:
          type: string
          description: File ID.
          example: fil_4Ykq9NcWpL2sTb
        name:
          type: string
          description: File name.
          example: dpa-v3.pdf
        mimetype:
          type: string
          description: File MIME type.
          example: application/pdf
      required:
        - id
        - name
        - mimetype
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.