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

# Invite User

POST https://api.coperniq.io/v1/users
Content-Type: application/json

Invite a member to your company, the same as **Invite Members** in Coperniq: name, email, seat, role, phone and labor cost.

- `seatType` is required. Field and Office seats must be on your plan with one free; the API does not buy seats.
- `roleIds` is required unless `seatType` is `READONLY`. A Viewer seat only takes `VIEW_AND_COMMENT` roles (see `roleType` on `GET /roles`).
- Inviting an email that already belongs to an active member changes nothing and returns `status: "exists"`.
- Use `GET /users?email=` to read the new member's `id`, `seatType` and `laborHourlyRate`.


Reference: https://docs.coperniq.io/api-reference/users/invite-user

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects an UserInvite.

- `email` (string, required) — Email address to send the invite to
- `firstName` (string, required) — Member's first name (up to 300 characters)
- `lastName` (string, required) — Member's last name (up to 300 characters)
- `seatType` (enum, required) — Seat to assign, the same as **Seat** in Coperniq's Invite Members: - `FIELD` (Field) and `OFFICE` (Office) are paid seats. Your plan must include that seat type and have one free. The API does not buy seats; buy more in Coperniq first. - `READONLY` (Viewer) is free, with view and comment access.
  - Allowed values: `FIELD`, `OFFICE`, `READONLY`
- `roleIds` (list of integer, optional) — Role IDs from `GET /roles`. Required unless `seatType` is `READONLY`. A `READONLY` seat only takes roles with `roleType: VIEW_AND_COMMENT`. Leave `roleIds` out to use the default Viewer role.
- `phone` (string, optional) — Member's phone number
- `laborHourlyRate` (double, optional) — Labor cost in dollars per hour (**Labour cost, $/hr** in Coperniq)

## Response

### 201

Invite sent (`success`), or the email is already an active member (`exists`)

- `email` (string, optional)
- `status` (enum, optional) — `success`: invite sent. `exists`: already an active member, nothing changed.
  - Allowed values: `success`, `exists`

## Errors

### 400 Bad Request Error

The invite was not sent. Reasons include an invalid body, a role that doesn't fit the seat, no free seat of that type, a seat type that isn't on your plan, or an unknown role ID.

- `error` (string, optional)

## Examples

### Field seat with labor cost

**Request**

```json
{
  "email": "anna.smith@example.com",
  "firstName": "Anna",
  "lastName": "Smith",
  "seatType": "FIELD",
  "roleIds": [
    3
  ],
  "phone": "(208) 555-0112",
  "laborHourlyRate": 40
}
```

**Response**

```json
{
  "email": "anna.smith@example.com",
  "status": "success"
}
```

**SDK Code**

```python Field seat with labor cost
import requests

url = "https://api.coperniq.io/v1/users"

payload = {
    "email": "anna.smith@example.com",
    "firstName": "Anna",
    "lastName": "Smith",
    "seatType": "FIELD",
    "roleIds": [3],
    "phone": "(208) 555-0112",
    "laborHourlyRate": 40
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Field seat with labor cost
const url = 'https://api.coperniq.io/v1/users';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"email":"anna.smith@example.com","firstName":"Anna","lastName":"Smith","seatType":"FIELD","roleIds":[3],"phone":"(208) 555-0112","laborHourlyRate":40}'
};

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

```go Field seat with labor cost
package main

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

func main() {

	url := "https://api.coperniq.io/v1/users"

	payload := strings.NewReader("{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}")

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

	req.Header.Add("x-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 Field seat with labor cost
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/users")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}"

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

```java Field seat with labor cost
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.coperniq.io/v1/users")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}")
  .asString();
```

```php Field seat with labor cost
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.coperniq.io/v1/users', [
  'body' => '{
  "email": "anna.smith@example.com",
  "firstName": "Anna",
  "lastName": "Smith",
  "seatType": "FIELD",
  "roleIds": [
    3
  ],
  "phone": "(208) 555-0112",
  "laborHourlyRate": 40
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Field seat with labor cost
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/users");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Field seat with labor cost
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "email": "anna.smith@example.com",
  "firstName": "Anna",
  "lastName": "Smith",
  "seatType": "FIELD",
  "roleIds": [3],
  "phone": "(208) 555-0112",
  "laborHourlyRate": 40
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/users")! 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()
```

### Viewer seat with the default Viewer role

**Request**

```json
{
  "email": "anna.smith@example.com",
  "firstName": "Anna",
  "lastName": "Smith",
  "seatType": "FIELD",
  "roleIds": [
    3
  ],
  "phone": "(208) 555-0112",
  "laborHourlyRate": 40
}
```

**Response**

```json
{
  "email": "anna.smith@example.com",
  "status": "success"
}
```

**SDK Code**

```python Viewer seat with the default Viewer role
import requests

url = "https://api.coperniq.io/v1/users"

payload = {
    "email": "anna.smith@example.com",
    "firstName": "Anna",
    "lastName": "Smith",
    "seatType": "FIELD",
    "roleIds": [3],
    "phone": "(208) 555-0112",
    "laborHourlyRate": 40
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Viewer seat with the default Viewer role
const url = 'https://api.coperniq.io/v1/users';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"email":"anna.smith@example.com","firstName":"Anna","lastName":"Smith","seatType":"FIELD","roleIds":[3],"phone":"(208) 555-0112","laborHourlyRate":40}'
};

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

```go Viewer seat with the default Viewer role
package main

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

func main() {

	url := "https://api.coperniq.io/v1/users"

	payload := strings.NewReader("{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}")

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

	req.Header.Add("x-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 Viewer seat with the default Viewer role
require 'uri'
require 'net/http'

url = URI("https://api.coperniq.io/v1/users")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}"

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

```java Viewer seat with the default Viewer role
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.coperniq.io/v1/users")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}")
  .asString();
```

```php Viewer seat with the default Viewer role
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.coperniq.io/v1/users', [
  'body' => '{
  "email": "anna.smith@example.com",
  "firstName": "Anna",
  "lastName": "Smith",
  "seatType": "FIELD",
  "roleIds": [
    3
  ],
  "phone": "(208) 555-0112",
  "laborHourlyRate": 40
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Viewer seat with the default Viewer role
using RestSharp;

var client = new RestClient("https://api.coperniq.io/v1/users");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"email\": \"anna.smith@example.com\",\n  \"firstName\": \"Anna\",\n  \"lastName\": \"Smith\",\n  \"seatType\": \"FIELD\",\n  \"roleIds\": [\n    3\n  ],\n  \"phone\": \"(208) 555-0112\",\n  \"laborHourlyRate\": 40\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Viewer seat with the default Viewer role
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "email": "anna.smith@example.com",
  "firstName": "Anna",
  "lastName": "Smith",
  "seatType": "FIELD",
  "roleIds": [3],
  "phone": "(208) 555-0112",
  "laborHourlyRate": 40
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.coperniq.io/v1/users")! 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()
```