curl --request POST \
--url https://api.partoo.co/v2/user/{user_id} \
--header 'Content-Type: application/json' \
--header 'x-APIKey: <api-key>' \
--data '
{
"email": "perceval@kaamelott.com",
"first_name": "Perceval",
"last_name": "de Galles",
"org_id": 42,
"accesses": [
[
1,
2
],
[
1,
3
]
],
"business_ids": [
"<string>"
],
"role": "BUSINESS_MANAGER",
"custom_role": "my_custom_role",
"sidebar_pages": [],
"status": "active",
"disabled": true,
"password": "<string>",
"lang": "fr",
"sso_only": false,
"receive_reviews_email_notifications": true
}
'import requests
url = "https://api.partoo.co/v2/user/{user_id}"
payload = {
"email": "perceval@kaamelott.com",
"first_name": "Perceval",
"last_name": "de Galles",
"org_id": 42,
"accesses": [[1, 2], [1, 3]],
"business_ids": ["<string>"],
"role": "BUSINESS_MANAGER",
"custom_role": "my_custom_role",
"sidebar_pages": [],
"status": "active",
"disabled": True,
"password": "<string>",
"lang": "fr",
"sso_only": False,
"receive_reviews_email_notifications": True
}
headers = {
"x-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'perceval@kaamelott.com',
first_name: 'Perceval',
last_name: 'de Galles',
org_id: 42,
accesses: [[1, 2], [1, 3]],
business_ids: ['<string>'],
role: 'BUSINESS_MANAGER',
custom_role: 'my_custom_role',
sidebar_pages: [],
status: 'active',
disabled: true,
password: '<string>',
lang: 'fr',
sso_only: false,
receive_reviews_email_notifications: true
})
};
fetch('https://api.partoo.co/v2/user/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.partoo.co/v2/user/{user_id}",
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([
'email' => 'perceval@kaamelott.com',
'first_name' => 'Perceval',
'last_name' => 'de Galles',
'org_id' => 42,
'accesses' => [
[
1,
2
],
[
1,
3
]
],
'business_ids' => [
'<string>'
],
'role' => 'BUSINESS_MANAGER',
'custom_role' => 'my_custom_role',
'sidebar_pages' => [
],
'status' => 'active',
'disabled' => true,
'password' => '<string>',
'lang' => 'fr',
'sso_only' => false,
'receive_reviews_email_notifications' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-APIKey: <api-key>"
],
]);
$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.partoo.co/v2/user/{user_id}"
payload := strings.NewReader("{\n \"email\": \"perceval@kaamelott.com\",\n \"first_name\": \"Perceval\",\n \"last_name\": \"de Galles\",\n \"org_id\": 42,\n \"accesses\": [\n [\n 1,\n 2\n ],\n [\n 1,\n 3\n ]\n ],\n \"business_ids\": [\n \"<string>\"\n ],\n \"role\": \"BUSINESS_MANAGER\",\n \"custom_role\": \"my_custom_role\",\n \"sidebar_pages\": [],\n \"status\": \"active\",\n \"disabled\": true,\n \"password\": \"<string>\",\n \"lang\": \"fr\",\n \"sso_only\": false,\n \"receive_reviews_email_notifications\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-APIKey", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.partoo.co/v2/user/{user_id}")
.header("x-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"perceval@kaamelott.com\",\n \"first_name\": \"Perceval\",\n \"last_name\": \"de Galles\",\n \"org_id\": 42,\n \"accesses\": [\n [\n 1,\n 2\n ],\n [\n 1,\n 3\n ]\n ],\n \"business_ids\": [\n \"<string>\"\n ],\n \"role\": \"BUSINESS_MANAGER\",\n \"custom_role\": \"my_custom_role\",\n \"sidebar_pages\": [],\n \"status\": \"active\",\n \"disabled\": true,\n \"password\": \"<string>\",\n \"lang\": \"fr\",\n \"sso_only\": false,\n \"receive_reviews_email_notifications\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"perceval@kaamelott.com\",\n \"first_name\": \"Perceval\",\n \"last_name\": \"de Galles\",\n \"org_id\": 42,\n \"accesses\": [\n [\n 1,\n 2\n ],\n [\n 1,\n 3\n ]\n ],\n \"business_ids\": [\n \"<string>\"\n ],\n \"role\": \"BUSINESS_MANAGER\",\n \"custom_role\": \"my_custom_role\",\n \"sidebar_pages\": [],\n \"status\": \"active\",\n \"disabled\": true,\n \"password\": \"<string>\",\n \"lang\": \"fr\",\n \"sso_only\": false,\n \"receive_reviews_email_notifications\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "5309c3a237bbc544d8e26737",
"status": "success"
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Update user
This endpoint lets you update a user. You need to have WRITE access to this user. It has a patch behaviour which means that only indicated value will be changed.
curl --request POST \
--url https://api.partoo.co/v2/user/{user_id} \
--header 'Content-Type: application/json' \
--header 'x-APIKey: <api-key>' \
--data '
{
"email": "perceval@kaamelott.com",
"first_name": "Perceval",
"last_name": "de Galles",
"org_id": 42,
"accesses": [
[
1,
2
],
[
1,
3
]
],
"business_ids": [
"<string>"
],
"role": "BUSINESS_MANAGER",
"custom_role": "my_custom_role",
"sidebar_pages": [],
"status": "active",
"disabled": true,
"password": "<string>",
"lang": "fr",
"sso_only": false,
"receive_reviews_email_notifications": true
}
'import requests
url = "https://api.partoo.co/v2/user/{user_id}"
payload = {
"email": "perceval@kaamelott.com",
"first_name": "Perceval",
"last_name": "de Galles",
"org_id": 42,
"accesses": [[1, 2], [1, 3]],
"business_ids": ["<string>"],
"role": "BUSINESS_MANAGER",
"custom_role": "my_custom_role",
"sidebar_pages": [],
"status": "active",
"disabled": True,
"password": "<string>",
"lang": "fr",
"sso_only": False,
"receive_reviews_email_notifications": True
}
headers = {
"x-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'perceval@kaamelott.com',
first_name: 'Perceval',
last_name: 'de Galles',
org_id: 42,
accesses: [[1, 2], [1, 3]],
business_ids: ['<string>'],
role: 'BUSINESS_MANAGER',
custom_role: 'my_custom_role',
sidebar_pages: [],
status: 'active',
disabled: true,
password: '<string>',
lang: 'fr',
sso_only: false,
receive_reviews_email_notifications: true
})
};
fetch('https://api.partoo.co/v2/user/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.partoo.co/v2/user/{user_id}",
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([
'email' => 'perceval@kaamelott.com',
'first_name' => 'Perceval',
'last_name' => 'de Galles',
'org_id' => 42,
'accesses' => [
[
1,
2
],
[
1,
3
]
],
'business_ids' => [
'<string>'
],
'role' => 'BUSINESS_MANAGER',
'custom_role' => 'my_custom_role',
'sidebar_pages' => [
],
'status' => 'active',
'disabled' => true,
'password' => '<string>',
'lang' => 'fr',
'sso_only' => false,
'receive_reviews_email_notifications' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-APIKey: <api-key>"
],
]);
$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.partoo.co/v2/user/{user_id}"
payload := strings.NewReader("{\n \"email\": \"perceval@kaamelott.com\",\n \"first_name\": \"Perceval\",\n \"last_name\": \"de Galles\",\n \"org_id\": 42,\n \"accesses\": [\n [\n 1,\n 2\n ],\n [\n 1,\n 3\n ]\n ],\n \"business_ids\": [\n \"<string>\"\n ],\n \"role\": \"BUSINESS_MANAGER\",\n \"custom_role\": \"my_custom_role\",\n \"sidebar_pages\": [],\n \"status\": \"active\",\n \"disabled\": true,\n \"password\": \"<string>\",\n \"lang\": \"fr\",\n \"sso_only\": false,\n \"receive_reviews_email_notifications\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-APIKey", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.partoo.co/v2/user/{user_id}")
.header("x-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"perceval@kaamelott.com\",\n \"first_name\": \"Perceval\",\n \"last_name\": \"de Galles\",\n \"org_id\": 42,\n \"accesses\": [\n [\n 1,\n 2\n ],\n [\n 1,\n 3\n ]\n ],\n \"business_ids\": [\n \"<string>\"\n ],\n \"role\": \"BUSINESS_MANAGER\",\n \"custom_role\": \"my_custom_role\",\n \"sidebar_pages\": [],\n \"status\": \"active\",\n \"disabled\": true,\n \"password\": \"<string>\",\n \"lang\": \"fr\",\n \"sso_only\": false,\n \"receive_reviews_email_notifications\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/user/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"perceval@kaamelott.com\",\n \"first_name\": \"Perceval\",\n \"last_name\": \"de Galles\",\n \"org_id\": 42,\n \"accesses\": [\n [\n 1,\n 2\n ],\n [\n 1,\n 3\n ]\n ],\n \"business_ids\": [\n \"<string>\"\n ],\n \"role\": \"BUSINESS_MANAGER\",\n \"custom_role\": \"my_custom_role\",\n \"sidebar_pages\": [],\n \"status\": \"active\",\n \"disabled\": true,\n \"password\": \"<string>\",\n \"lang\": \"fr\",\n \"sso_only\": false,\n \"receive_reviews_email_notifications\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "5309c3a237bbc544d8e26737",
"status": "success"
}{
"errors": {
"json": {}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Authorizations
The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.
Path Parameters
User id
Body
Request body to update a user.
User email
"perceval@kaamelott.com"
User first name
"Perceval"
User last name
"de Galles"
Unique identifier of the organization to which the user should belong. Only PROVIDER users can set this field. If no org_id is given, or if you are not a PROVIDER, the user will have the same organization as you.
42
List of (list of Group ID).
Accesses of the users for the new groups system, only for GROUP_MANAGER users.
[[1, 2], [1, 3]]
The list of business to which the user has access to. Will be taken into account only if user has BUSINESS_MANAGER role.
User role in the application
ORG_ADMIN, ORG_MANAGER, GROUP_MANAGER, BUSINESS_MANAGER, PUBLISHER "BUSINESS_MANAGER"
Optional API identifier of a custom role to assign to the user. The value must match the api_id of one of the custom roles available to your organization.
If no custom role is given, users with the role GROUP_MANAGER or BUSINESS_MANAGER will automatically be assigned to the default built-in custom role associated with their role.
For more information about custom roles, see Managing User Permissions with Custom Roles
"my_custom_role"
DEPRECATED: This parameter is deprecated in favor of the new Custom Roles system. See the Custom Roles & Permissions guide for migration information.
List of features the user can access from the sidebar.
Sidebar page feature name
bulk_modification, diffusion, feedback_management, messages, posts, presence_analytics, review_analytics, review_invite, review_management User status in the application
active, invited "active"
The state of the User account.
The User password. It should comply with the following rules:
- should be at least 8 characters long
- should have one upper case letter and one lower case letter
- should have one special character
8Available language in the application
fr, en, es, it, pt-br, de, ar, nl, pl, cs, ca, sk, pt, lv, ro, bg, hu "fr"
Prevent the user from connecting directly from the Partoo connection page.
This field is available for users whose organization has defined an SSO configuration.
This field can be edited by a user with the role ORG_ADMIN or PROVIDER.
The parameter decides if the user subscribes to negative reviews email notifications
Was this page helpful?