ContractsCreate a contract in a team (v2)

Create a contract in a team (v2)

Creates a contract using the v2 contract-creation payload. Use this when an existing integration depends on the v2 request shape.

Legacy note: this endpoint is maintained for existing V2 integrations. Prefer V3 for new API and agent workflows where an equivalent exists.

curl -X POST "https://api.textmine.com/v2/teams/example_string/contracts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "created_by_user_id": "6749541852262271",
  "name": "test contract",
  "fields": [
    {
      "id": 3010,
      "label": "Please specify the purpose of the Agreement",
      "name": "contract_purpose",
      "links": [
        {
          "rel": "self",
          "href": "/v1/terms/3010"
        }
      ],
      "value": "Testing purpose"
    },
    {
      "id": 3011,
      "label": "Coverage",
      "name": "contract_coverage",
      "options": [
        {
          "value": "mutual"
        },
        {
          "value": "one way"
        }
      ],
      "links": [
        {
          "rel": "self",
          "href": "/v1/terms/3011"
        }
      ],
      "value": "mutual"
    },
    {
      "id": 3012,
      "label": "Please specify the Confidentiality Term",
      "name": "contract_confidentialityTerm",
      "options": [
        {
          "value": "2"
        },
        {
          "value": "3"
        },
        {
          "value": "4"
        },
        {
          "value": "5"
        },
        {
          "value": "6"
        },
        {
          "value": "7"
        },
        {
          "value": "8"
        },
        {
          "value": "9"
        },
        {
          "value": "10"
        }
      ],
      "links": [
        {
          "rel": "self",
          "href": "/v1/terms/3012"
        }
      ],
      "value": "3"
    },
    {
      "id": 3013,
      "label": "Effective Date",
      "name": "contract_startDate",
      "links": [
        {
          "rel": "self",
          "href": "/v1/terms/3013"
        }
      ],
      "value": "10/10/2023"
    },
    {
      "id": 3014,
      "label": "Would the contract creator like to upload their logo to the agreement?",
      "name": "contract_logo",
      "options": [
        {
          "value": "logoYes",
          "nested_fields": [
            {
              "id": 3015,
              "label": "Please upload the logo",
              "name": "contract_logoDetails",
              "links": [
                {
                  "rel": "self",
                  "href": "/v1/terms/3015"
                }
              ]
            }
          ]
        },
        {
          "value": "logoNo"
        }
      ],
      "links": [
        {
          "rel": "self",
          "href": "/v1/terms/3014"
        }
      ],
      "value": "logoNo"
    }
  ],
  "template_id": 116
}'
{}
POST
/v2/teams/{teamId}/contracts
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Bearer token - just enter the token, "Bearer" prefix will be added automatically

Content-Typestring
Required

The media type of the request body

Options: application/json
No request body parameters defined
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Authentication token required.

Path Parameters

Body

application/json
dataobject
Required

Raw application/json data

Responses

Successful response