GuidesAPI ReferenceChangelog
Guides

Create a contract

Learn how to create a contract and start hiring independent contractors

Create a contract

Creating a contract is the first step to hiring an independent contractor through Deel. Contracts are created using the Create contract endpoint, with a shared payload structure and type-specific variations.

This guide explains the endpoints involved in the process and the high-level data structure, and will prepare you to create the various contract types available.

Before you begin

Before preparing the payload, make sure to retrieve:

👍

Other endpoints will be used to retrieve additional information needed to create a contract

We recommend becoming familiar with them:

Request payload structure

Use the Create contract endpoint to set up any contract. The difference between them is in the parameters that you pass in the request payload.

The request payload includes the contract details in the data object. The following sections explain each object in the payload, followed by a full sample request.

curl --request POST \
     --url 'https://api.letsdeel.com/rest/v2/contracts' \
     --header 'authorization: Bearer TOKEN' \
     --header 'content-type: application/json' \
     --data-raw '
{
  "data": {
    …
  }
}'

👍

Creating a contract with a custom PDF

You can also create a contract with a custom PDF. To do so, you must use form-data for the request body and attach the file. For example:

curl --request POST \
     --url 'https://api.letsdeel.com/rest/v2/contracts' \
     --header 'authorization: Bearer TOKEN' \
     --header 'content-type: multipart/form-data' \
     --form 'param1="value1"' \
     --form 'param2="value2"' \
     --form 'parent_param[child_param]="value3"' \
     --form 'custom_contract_file=@"{path_to_pdf_file}"'

Where {path_to_pdf_file} is the path to the PDF file on your local machine.


What’s Next

Now that you know how to structure your requests to create a contract, let's look at the various contract type available: