---
updatedAt: 2025-06-05T21:41:04.000Z
agentTools:
  projectIndex: https://apidocs.officient.io/llms.txt
---

# Add contract

file\_type can be any of the following:

* 'pdf' for regular PDF-based contracts,
* 'presigned\_pdf' for PDF-based contracts that are already signed
* 'private\_template' for contracts based on Officient templates available in your account

Tip:

* template\_id is only required when file\_type = private\_template
* pdf\_base64 is only required when file\_type is either pdf or presigned\_pdf

Scope required: contracts.write

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "officient-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.officient.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/1.0/contracts/add": {
      "post": {
        "summary": "Add contract",
        "description": "",
        "operationId": "add-contract",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data\": {\n        \"id\": \"11491\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "11491"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status_code\": 400,\n    \"reason_phrase\": \"Template for contract not found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status_code": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "reason_phrase": {
                      "type": "string",
                      "example": "Template for contract not found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "http",
              "code": "{  \n   \"person_id\":216570,\n   \"file_type\":\"pdf\",\n   \"contract_name\":\"Freelance contract\",\n   \"template_id\":\"\",\n   \"pdf_base64\":\"JVBERi0xLjMNCiX....FT0YNCg==\",\n\n}"
            }
          ],
          "samples-languages": [
            "http"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```