curl --request POST \
--url https://api.projectcor.com/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"role_id": 1,
"user_position_id": 2,
"phone": "123-456-7890",
"description": "Senior Developer",
"birthday": "1990-01-01",
"work_in": "Engineering",
"hourly_rate": 50,
"monthly_hours": 160,
"daily_hours": 8,
"salary": 4500
}
'import requests
url = "https://api.projectcor.com/v1/users"
payload = {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"role_id": 1,
"user_position_id": 2,
"phone": "123-456-7890",
"description": "Senior Developer",
"birthday": "1990-01-01",
"work_in": "Engineering",
"hourly_rate": 50,
"monthly_hours": 160,
"daily_hours": 8,
"salary": 4500
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com',
role_id: 1,
user_position_id: 2,
phone: '123-456-7890',
description: 'Senior Developer',
birthday: '1990-01-01',
work_in: 'Engineering',
hourly_rate: 50,
monthly_hours: 160,
daily_hours: 8,
salary: 4500
})
};
fetch('https://api.projectcor.com/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/users';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com',
role_id: 1,
user_position_id: 2,
phone: '123-456-7890',
description: 'Senior Developer',
birthday: '1990-01-01',
work_in: 'Engineering',
hourly_rate: 50,
monthly_hours: 160,
daily_hours: 8,
salary: 4500
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectcor.com/v1/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john.doe@example.com',
'role_id' => 1,
'user_position_id' => 2,
'phone' => '123-456-7890',
'description' => 'Senior Developer',
'birthday' => '1990-01-01',
'work_in' => 'Engineering',
'hourly_rate' => 50,
'monthly_hours' => 160,
'daily_hours' => 8,
'salary' => 4500
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.projectcor.com/v1/users"
payload := strings.NewReader("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"role_id\": 1,\n \"user_position_id\": 2,\n \"phone\": \"123-456-7890\",\n \"description\": \"Senior Developer\",\n \"birthday\": \"1990-01-01\",\n \"work_in\": \"Engineering\",\n \"hourly_rate\": 50,\n \"monthly_hours\": 160,\n \"daily_hours\": 8,\n \"salary\": 4500\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"picture": "<string>",
"email": "jsmith@example.com",
"cuil": "<string>",
"remaining_hours": 123,
"user_position_id": 123,
"role_id": 123,
"daily_hours": 123,
"plan_id": 123,
"plan_name": "<string>",
"hidden": true,
"position_name": "<string>",
"category_id": 123,
"category_name": "<string>",
"gmt": "-03:00",
"leaves": [
{
"id": 123,
"user_id": 123,
"company_id": 123,
"leave_type_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"all_day": true,
"leaveType": {
"id": 123,
"name": "<string>",
"type_code": "<string>",
"company_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"icon_name": "<string>"
}
}
],
"labels": [
{
"id": 123,
"hex": "<string>",
"hsl": "<string>",
"rgb": "<string>",
"lang": "<string>",
"name": "<string>",
"color_id": 123
}
]
}Create a user
Creates a user using a POST http method. The user will receive an invitation email.
Required properties:
first_name— User given namelast_name— User family nameemail— User emailrole_id— ID of the user’s role:- 1: C-Level
- 2: Director
- 3: Project Manager
- 4: Collaborator
- 5: Freelancer
- 6: Client
curl --request POST \
--url https://api.projectcor.com/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"role_id": 1,
"user_position_id": 2,
"phone": "123-456-7890",
"description": "Senior Developer",
"birthday": "1990-01-01",
"work_in": "Engineering",
"hourly_rate": 50,
"monthly_hours": 160,
"daily_hours": 8,
"salary": 4500
}
'import requests
url = "https://api.projectcor.com/v1/users"
payload = {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"role_id": 1,
"user_position_id": 2,
"phone": "123-456-7890",
"description": "Senior Developer",
"birthday": "1990-01-01",
"work_in": "Engineering",
"hourly_rate": 50,
"monthly_hours": 160,
"daily_hours": 8,
"salary": 4500
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com',
role_id: 1,
user_position_id: 2,
phone: '123-456-7890',
description: 'Senior Developer',
birthday: '1990-01-01',
work_in: 'Engineering',
hourly_rate: 50,
monthly_hours: 160,
daily_hours: 8,
salary: 4500
})
};
fetch('https://api.projectcor.com/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/users';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com',
role_id: 1,
user_position_id: 2,
phone: '123-456-7890',
description: 'Senior Developer',
birthday: '1990-01-01',
work_in: 'Engineering',
hourly_rate: 50,
monthly_hours: 160,
daily_hours: 8,
salary: 4500
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectcor.com/v1/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john.doe@example.com',
'role_id' => 1,
'user_position_id' => 2,
'phone' => '123-456-7890',
'description' => 'Senior Developer',
'birthday' => '1990-01-01',
'work_in' => 'Engineering',
'hourly_rate' => 50,
'monthly_hours' => 160,
'daily_hours' => 8,
'salary' => 4500
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.projectcor.com/v1/users"
payload := strings.NewReader("{\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"role_id\": 1,\n \"user_position_id\": 2,\n \"phone\": \"123-456-7890\",\n \"description\": \"Senior Developer\",\n \"birthday\": \"1990-01-01\",\n \"work_in\": \"Engineering\",\n \"hourly_rate\": 50,\n \"monthly_hours\": 160,\n \"daily_hours\": 8,\n \"salary\": 4500\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"picture": "<string>",
"email": "jsmith@example.com",
"cuil": "<string>",
"remaining_hours": 123,
"user_position_id": 123,
"role_id": 123,
"daily_hours": 123,
"plan_id": 123,
"plan_name": "<string>",
"hidden": true,
"position_name": "<string>",
"category_id": 123,
"category_name": "<string>",
"gmt": "-03:00",
"leaves": [
{
"id": 123,
"user_id": 123,
"company_id": 123,
"leave_type_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"all_day": true,
"leaveType": {
"id": 123,
"name": "<string>",
"type_code": "<string>",
"company_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"icon_name": "<string>"
}
}
],
"labels": [
{
"id": 123,
"hex": "<string>",
"hsl": "<string>",
"rgb": "<string>",
"lang": "<string>",
"name": "<string>",
"color_id": 123
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
User given name
User family name
User email
User Role: 1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator, 5=Freelancer, 6=Client
1, 2, 3, 4, 5, 6 ID of the user's position
User phone number
User description
User birthday (YYYY-MM-DD)
Department or area
Hourly rate
Monthly hours
Daily hours
Plan ID: 4=Project Management, 5=Capacity Planning
4, 5 Whether user is hidden
Whether to charge hours
Monthly salary amount
Response
User created successfully
URL to user's profile picture
1=C-Level, 2=Director, 3=Project Manager, 4=Collaborator, 5=Freelancer, 6=Client
4=Project Management, 5=Capacity Planning
UTC offset from the user's last login location. Indicates the timezone configured at their last login.
"-03:00"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

