Skip to main content
POST
/
contracts
Create a contract
curl --request POST \
  --url https://api.tomorro.com/v2/contracts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "contractTypeId": "550e8400-e29b-41d4-a716-446655440002",
  "counterparty": {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "name": "Acme Corporation"
  },
  "templateId": "550e8400-e29b-41d4-a716-446655440003",
  "name": "Service Agreement - Acme Corp",
  "signatories": {
    "internalSignatoryMemberIds": [
      "mem_550e8400-e29b-41d4-a716-446655440004"
    ],
    "externalSignatoryEmailList": [
      "signatory@example.com"
    ]
  },
  "fields": [
    {
      "fieldId": "550e8400-e29b-41d4-a716-446655440008",
      "value": "Technology"
    }
  ],
  "contractMembersIds": [
    {
      "memberId": "550e8400-e29b-41d4-a716-446655440004"
    }
  ],
  "integration": {
    "type": "salesforce",
    "externalId": "sf-123456",
    "externalEntity": "Opportunity",
    "externalUrl": "https://my-crm.example.com/opportunities/sf-123456"
  }
}
'
{
  "id": "ctr_550e8400-e29b-41d4-a716-446655440000",
  "name": "Service Agreement - Acme Corp",
  "status": "draft",
  "counterparty": {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "name": "Acme Corporation"
  },
  "contractType": {
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "name": "Service Agreement"
  },
  "templateId": "550e8400-e29b-41d4-a716-446655440003",
  "author": {
    "id": "550e8400-e29b-41d4-a716-446655440004",
    "email": "john.doe@example.com"
  },
  "fields": [
    {
      "attributeDefinitionId": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Department",
      "value": "John Doe"
    }
  ],
  "signatories": [
    {
      "id": "sig_550e8400-e29b-41d4-a716-446655440005",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "type": "member"
    }
  ],
  "createdAt": "2024-01-15T10:30:00.000Z",
  "contractMembers": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440004",
      "email": "john.doe@example.com"
    }
  ]
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get your key at https://app.tomorro.com/settings/integrations?integration=api-key

Body

application/json
contractTypeId
string
required

ID of the contract type

Example:

"550e8400-e29b-41d4-a716-446655440002"

counterparty
object
required

Counterparty for the contract. Can reference an existing counterparty by ID or create a new one.

Example:
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Acme Corporation"
}
templateId
string

ID of the template to create the document from

Example:

"550e8400-e29b-41d4-a716-446655440003"

name
string

Contract name. If omitted, auto-generated from the template name.

Example:

"Service Agreement - Acme Corp"

signatories
object

List of internal and external signatories for the contract

Example:
{
"internalSignatoryMemberIds": ["mem_550e8400-e29b-41d4-a716-446655440004"],
"externalSignatoryEmailList": ["signatory@example.com"]
}
fields
object[]

Field values to set on the contract. Use field IDs and values (option labels for select fields).

Example:
[
{
"fieldId": "550e8400-e29b-41d4-a716-446655440008",
"value": "Technology"
}
]
contractMembersIds
string[]

List of members to add to the contract

Example:
[
{
"memberId": "550e8400-e29b-41d4-a716-446655440004"
}
]
integration
object

Integration parameters to link the contract with an external system.

Example:
{
"type": "salesforce",
"externalId": "sf-123456",
"externalEntity": "Opportunity",
"externalUrl": "https://my-crm.example.com/opportunities/sf-123456"
}

Response

Contract created successfully Any non-signed status can transition to canceled

id
string
required

Unique identifier for the contract.

Example:

"ctr_550e8400-e29b-41d4-a716-446655440000"

name
string
required

The name or title of the contract.

Example:

"Service Agreement - Acme Corp"

status
string
required

The current status of the contract.

  • draft: The contract is being created or edited.
  • negotiating: The contract is being reviewed with counterparties.
  • signing: The contract is in the signature process.
  • signed: All parties have signed the contract.
  • canceled: The contract has been canceled.
Example:

"draft"

counterparty
object
required

The counterparty associated with this contract.

Example:
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Acme Corporation"
}
contractType
object
required

The type of the contract, it is composed of many templates.

Example:
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Service Agreement"
}
templateId
object
required

The template used to create this contract.

Example:

"550e8400-e29b-41d4-a716-446655440003"

author
object
required

The member who created this contract.

Example:
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"email": "john.doe@example.com"
}
fields
object[]
required

The fields associated with this contract.

Example:
[
{
"attributeDefinitionId": "123e4567-e89b-12d3-a456-426614174000",
"name": "Department",
"value": "John Doe"
}
]
signatories
object[]
required

The signatories associated with this contract.

Example:
[
{
"id": "sig_550e8400-e29b-41d4-a716-446655440005",
"name": "John Doe",
"email": "john.doe@example.com",
"type": "member"
}
]
createdAt
string<date-time>
required

Time at which the contract was created. Formatted as an ISO 8601 date-time string.

Example:

"2024-01-15T10:30:00.000Z"

contractMembers
object[]

The list of participants with this contract.

Example:
[
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"email": "john.doe@example.com"
}
]