> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mygigsters.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create worker

> This endpoint allows you to create a new worker with their personal and banking details.

> [!NOTE]
>
> Payouts are supported in 160+ countries. The `bsb` field applies to Australian bank accounts. For bank accounts in other countries, collect details with the hosted form from [Beneficiary URL](https://docs.mygigsters.com/api-reference/workers/beneficiary-url.md) or the [Beneficiary SDK](https://docs.mygigsters.com/sdks/beneficiary-sdk.md), which show the right fields for the worker's country.

### Headers

**X-API-Version** `string` *required* (default: 1.2)

The API version to use. Supported versions are `1.1` and `1.2`.

### Request Body Parameters

**full\_name** `string` *required*

The full name of the worker.

**email** `string` *required*

The email address of the worker.

**phone** `string` *required*

The phone number of the worker.

**abn** `string`

The Australian Business Number (11-digit identifier) for Australian workers.

**account\_name** `string`

The name of the worker's bank account.

**bsb** `string`

The Bank State Branch code (6 digits, 065163) for Sandbox Environment .

**account\_number** `string`

The account number of the SandBox Environment is 12345678.

**gst\_registered** `boolean`

Indicates whether the worker is registered for GST (Goods and Services Tax).

**is\_early\_pay\_enabled** `boolean` *required*

Indicates whether early pay (on-demand pay) is enabled for the worker.

**early\_pay\_rates** `number`

The percentage rate (e.g. 1.5) charged for early pay transactions, required if is\_early\_pay\_enabled is true.

### Response Body

**status** `number`

Indicates the status of the request.

**message** `string`

A message associated with the response.

**worker\_id** `string`

The ID of the newly created worker (prefixed with `wor_`).

### Response Codes

| Code | Description |
| - | - |
| 201 | Created. The worker was successfully created. |
| 400 | Bad Request. Invalid parameters or validation failure (e.g. invalid BSB format). |
| 401 | Unauthorized. Missing or invalid credentials. |
| 409 | Conflict. Duplicate idempotency key or worker already exists with the email/phone. |
| 500 | Internal Server Error. |

```bash cURL theme={null}
curl -X POST https://qa-payments.mygigsters.com.au/api/v1/worker-create \
  -u "YOUR_UUID:YOUR_SECRET" \
  -H "X-API-Version: 1.2" \
  -H "Content-Type: application/json" \
  -d '{
  "full_name": "Jane Smith",
  "abn": "12345678910",
  "account_name": "Jane Smith",
  "bsb": "065163",
  "account_number": "12345678",
  "email": "jane.smith@example.com",
  "phone": "9888888882",
  "gst_registered": false,
  "is_early_pay_enabled": true,
  "early_pay_rates": "3"
}'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-payments.mygigsters.com.au/api/v1/worker-create", {
  method: "POST",
  headers: {
    Authorization: "Basic " + Buffer.from("YOUR_UUID:YOUR_SECRET").toString("base64"),
    "X-API-Version": "1.2",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "full_name": "Jane Smith",
    "abn": "12345678910",
    "account_name": "Jane Smith",
    "bsb": "065163",
    "account_number": "12345678",
    "email": "jane.smith@example.com",
    "phone": "9888888882",
    "gst_registered": false,
    "is_early_pay_enabled": true,
    "early_pay_rates": "3"
  }),
});

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

response = requests.post(
    "https://qa-payments.mygigsters.com.au/api/v1/worker-create",
    auth=("YOUR_UUID", "YOUR_SECRET"),
    headers={
        "X-API-Version": "1.2",
    },
    json={
        "full_name": "Jane Smith",
        "abn": "12345678910",
        "account_name": "Jane Smith",
        "bsb": "065163",
        "account_number": "12345678",
        "email": "jane.smith@example.com",
        "phone": "9888888882",
        "gst_registered": False,
        "is_early_pay_enabled": True,
        "early_pay_rates": "3",
    },
)

print(response.json())
```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri = URI("https://qa-payments.mygigsters.com.au/api/v1/worker-create")
request = Net::HTTP::Post.new(uri)
request.basic_auth("YOUR_UUID", "YOUR_SECRET")
request["X-API-Version"] = "1.2"
request["Content-Type"] = "application/json"
request.body = <<~JSON
  {
    "full_name": "Jane Smith",
    "abn": "12345678910",
    "account_name": "Jane Smith",
    "bsb": "065163",
    "account_number": "12345678",
    "email": "jane.smith@example.com",
    "phone": "9888888882",
    "gst_registered": false,
    "is_early_pay_enabled": true,
    "early_pay_rates": "3"
  }
JSON

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$ch = curl_init("https://qa-payments.mygigsters.com.au/api/v1/worker-create");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_USERPWD => "YOUR_UUID:YOUR_SECRET",
    CURLOPT_HTTPHEADER => [
        "X-API-Version: 1.2",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "full_name": "Jane Smith",
  "abn": "12345678910",
  "account_name": "Jane Smith",
  "bsb": "065163",
  "account_number": "12345678",
  "email": "jane.smith@example.com",
  "phone": "9888888882",
  "gst_registered": false,
  "is_early_pay_enabled": true,
  "early_pay_rates": "3"
}
JSON,
]);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

public class Example {
    public static void main(String[] args) throws Exception {
        String credentials = Base64.getEncoder()
            .encodeToString("YOUR_UUID:YOUR_SECRET".getBytes());

        String body = String.join("\n",
            "{",
            "  \"full_name\": \"Jane Smith\",",
            "  \"abn\": \"12345678910\",",
            "  \"account_name\": \"Jane Smith\",",
            "  \"bsb\": \"065163\",",
            "  \"account_number\": \"12345678\",",
            "  \"email\": \"jane.smith@example.com\",",
            "  \"phone\": \"9888888882\",",
            "  \"gst_registered\": false,",
            "  \"is_early_pay_enabled\": true,",
            "  \"early_pay_rates\": \"3\"",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-payments.mygigsters.com.au/api/v1/worker-create"))
            .header("Authorization", "Basic " + credentials)
            .header("X-API-Version", "1.2")
            .header("Content-Type", "application/json")
            .method("POST", HttpRequest.BodyPublishers.ofString(body))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

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

func main() {
	body := strings.NewReader(`{
  "full_name": "Jane Smith",
  "abn": "12345678910",
  "account_name": "Jane Smith",
  "bsb": "065163",
  "account_number": "12345678",
  "email": "jane.smith@example.com",
  "phone": "9888888882",
  "gst_registered": false,
  "is_early_pay_enabled": true,
  "early_pay_rates": "3"
}`)

	req, err := http.NewRequest("POST", "https://qa-payments.mygigsters.com.au/api/v1/worker-create", body)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("YOUR_UUID", "YOUR_SECRET")
	req.Header.Set("X-API-Version", "1.2")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```

```csharp .NET theme={null}
using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Post, "https://qa-payments.mygigsters.com.au/api/v1/worker-create");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("YOUR_UUID:YOUR_SECRET")));
request.Headers.Add("X-API-Version", "1.2");
request.Content = new StringContent(@"{
  ""full_name"": ""Jane Smith"",
  ""abn"": ""12345678910"",
  ""account_name"": ""Jane Smith"",
  ""bsb"": ""065163"",
  ""account_number"": ""12345678"",
  ""email"": ""jane.smith@example.com"",
  ""phone"": ""9888888882"",
  ""gst_registered"": false,
  ""is_early_pay_enabled"": true,
  ""early_pay_rates"": ""3""
}", Encoding.UTF8, "application/json");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```json 201 theme={null}
{
  "status": 201,
  "message": "Worker created successfully",
  "worker_id": "afd629c6-8e3d-4701-b168-dec8608130a5"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.