> This page is for version API + Legacy Full.
> For other versions, use one of these documentation indexes:
> - API (default): https://docs.getthera.com/api/llms.txt
> - API + Legacy Read: https://docs.getthera.com/api-legacy-read/llms.txt
> - API + Legacy Full: https://docs.getthera.com/api-legacy-full/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getthera.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getthera.com/_mcp/server.

# Create Contractor (v1)

POST https://api.getthera.com/external/contractor
Content-Type: application/json

Deprecated, use Create Contractor V2 instead. Creates a Pay-As-You-Go contractor only: monthly wage type, flexible rate, zero rate, and no KYC or compliance checks.

Reference: https://docs.getthera.com/api-legacy-full/external-api-deprecated/external-api/create-contractor

## Authentication

- `X-Thera-API-Key` header (required) — API Key authentication via header

## Servers

- `https://api.getthera.com` (Production, default)
- `https://api.staging.getthera.com` (Staging)

## Request

### Body (application/json)

This endpoint expects an ExternalCreateContractorRequest.

- `email` (string, required)
- `firstName` (string, required)
- `lastName` (string, required)
- `country` (string, required)
- `currency` (string, required)

## Response

### 200

- `success` (boolean, required)

## Errors

### 401 Unauthorized Error

The X-Thera-API-Key header is missing, or the key does not exist.

- `message` (string, required)
- `displayMessage` (string, required) — Safe to show an end user. Conflicts return a generic message rather than the specific reason.
- `timestamp` (string, required) — Format dd-MM-yyyy hh:mm:ss.
- `type` (string, optional) — Present as GeneralError on 400, 401 and 404. Null on 409.
- `debugMessage` (string, optional)
- `subErrors` (list of any, optional)

### 400 Bad Request Error

A field failed validation, for example an invalid ISO 3166-1 alpha-2 country code.

- `message` (string, required)
- `displayMessage` (string, required) — Safe to show an end user. Conflicts return a generic message rather than the specific reason.
- `timestamp` (string, required) — Format dd-MM-yyyy hh:mm:ss.
- `type` (string, optional) — Present as GeneralError on 400, 401 and 404. Null on 409.
- `debugMessage` (string, optional)
- `subErrors` (list of any, optional)

### 409 Conflict Error

That contractor already has an active API-created contract with your company.

- `message` (string, required)
- `displayMessage` (string, required) — Safe to show an end user. Conflicts return a generic message rather than the specific reason.
- `timestamp` (string, required) — Format dd-MM-yyyy hh:mm:ss.
- `type` (string, optional) — Present as GeneralError on 400, 401 and 404. Null on 409.
- `debugMessage` (string, optional)
- `subErrors` (list of any, optional)

## Examples

**Request**

```json
{
  "email": "email",
  "firstName": "firstName",
  "lastName": "lastName",
  "country": "country",
  "currency": "currency"
}
```

**Response**

```json
{
  "success": true
}
```

**SDK Code**

```python
import requests

url = "https://api.getthera.com/external/contractor"

payload = {
    "email": "email",
    "firstName": "firstName",
    "lastName": "lastName",
    "country": "country",
    "currency": "currency"
}
headers = {
    "X-Thera-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.getthera.com/external/contractor';
const options = {
  method: 'POST',
  headers: {'X-Thera-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"email":"email","firstName":"firstName","lastName":"lastName","country":"country","currency":"currency"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getthera.com/external/contractor"

	payload := strings.NewReader("{\n  \"email\": \"email\",\n  \"firstName\": \"firstName\",\n  \"lastName\": \"lastName\",\n  \"country\": \"country\",\n  \"currency\": \"currency\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Thera-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getthera.com/external/contractor")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Thera-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"email\": \"email\",\n  \"firstName\": \"firstName\",\n  \"lastName\": \"lastName\",\n  \"country\": \"country\",\n  \"currency\": \"currency\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getthera.com/external/contractor")
  .header("X-Thera-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"email\": \"email\",\n  \"firstName\": \"firstName\",\n  \"lastName\": \"lastName\",\n  \"country\": \"country\",\n  \"currency\": \"currency\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getthera.com/external/contractor', [
  'body' => '{
  "email": "email",
  "firstName": "firstName",
  "lastName": "lastName",
  "country": "country",
  "currency": "currency"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Thera-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getthera.com/external/contractor");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Thera-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"email\": \"email\",\n  \"firstName\": \"firstName\",\n  \"lastName\": \"lastName\",\n  \"country\": \"country\",\n  \"currency\": \"currency\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Thera-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "email": "email",
  "firstName": "firstName",
  "lastName": "lastName",
  "country": "country",
  "currency": "currency"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getthera.com/external/contractor")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```