docs.fusial

Create a contract

POST
/contracts
x-api-key<token>

Your workspace API key. Create and manage keys in your Fusial workspace settings. Keys carry scopes of the form resource:action.

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/contracts" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "type": "NDA",    "ourRole": "COUNTERPARTY",    "ownerId": "string"  }'
{
  "contract": {
    "id": "string",
    "title": "string",
    "type": "NDA",
    "ourRole": "COUNTERPARTY",
    "status": "DRAFT",
    "counterpartyId": "string",
    "counterparty": {
      "id": "string",
      "name": "string"
    },
    "ownerId": "string",
    "owner": {
      "id": "string",
      "name": "string",
      "email": "string"
    },
    "effectiveDate": "2019-08-24T14:15:22Z",
    "executedAt": "2019-08-24T14:15:22Z",
    "termMonths": 0,
    "autoRenews": true,
    "renewalMonths": 0,
    "valueCents": "1500000",
    "valueCurrency": "USD",
    "templateId": "string",
    "lastActivityAt": "2019-08-24T14:15:22Z",
    "statusChangedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "version": {
    "id": "string",
    "contractId": "string",
    "versionNumber": 0,
    "parentVersionId": "string",
    "source": "UPLOADED",
    "fileName": "string",
    "contentType": "string",
    "sizeBytes": 0,
    "sha256": "string",
    "uploadedById": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Resource not found."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Resource not found."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Resource not found."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Resource not found."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Resource not found."
  }
}
{
  "error": {
    "code": "validation_error",
    "message": "Invalid request input.",
    "details": {
      "issues": [
        {
          "path": "title",
          "message": "String must contain at least 1 character(s)"
        }
      ]
    }
  }
}