SCIM Reference
Update User
Updates user
PUT
/
api
/
scim
/
v2
/
Users
/
{user_id}
Update User
curl --request PUT \
--url https://app.sendoso.com/api/scim/v2/Users/{user_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"active": true,
"userType": "<string>",
"division": "<string>"
}
'import requests
url = "https://app.sendoso.com/api/scim/v2/Users/{user_id}"
payload = {
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"active": True,
"userType": "<string>",
"division": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: {givenName: '<string>', familyName: '<string>'},
active: true,
userType: '<string>',
division: '<string>'
})
};
fetch('https://app.sendoso.com/api/scim/v2/Users/{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://app.sendoso.com/api/scim/v2/Users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => [
'givenName' => '<string>',
'familyName' => '<string>'
],
'active' => true,
'userType' => '<string>',
'division' => '<string>'
]),
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://app.sendoso.com/api/scim/v2/Users/{user_id}"
payload := strings.NewReader("{\n \"name\": {\n \"givenName\": \"<string>\",\n \"familyName\": \"<string>\"\n },\n \"active\": true,\n \"userType\": \"<string>\",\n \"division\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://app.sendoso.com/api/scim/v2/Users/{user_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": {\n \"givenName\": \"<string>\",\n \"familyName\": \"<string>\"\n },\n \"active\": true,\n \"userType\": \"<string>\",\n \"division\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sendoso.com/api/scim/v2/Users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": {\n \"givenName\": \"<string>\",\n \"familyName\": \"<string>\"\n },\n \"active\": true,\n \"userType\": \"<string>\",\n \"division\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"],
id: "1000",
userName: "john.doe@sendoso.com",
active: true,
name: {
givenName: "John",
familyName: "Doe",
},
emails: [
{ value: "john.doe@sendoso.com" },
],
userType: "sender",
division: "Marketing Ops",
}
Parameters
integer
required
The team group id to get the users from
Body
boolean
Wheter or not the user needs to be activated or deactivated from the Sendoso platform.
string
The user’s new role. Values can be
sender, manager, admin.string
The user’s new team. This value needs to match the exact team group name in Sendoso. See more information to get team group names.
Response
array
required
The SCIM RFC schema for the user resource - always
urn:ietf:params:scim:schemas:core:2.0:Userstring
required
The user’s identifier
string
required
The user’s email address
boolean
required
Whether or not the user is active or not in the Sendoso platform.
array
required
The user’s personal balance
string
required
The user’s role. Values can be
sender, manager, admin.string
required
The user’s team.
{
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"],
id: "1000",
userName: "john.doe@sendoso.com",
active: true,
name: {
givenName: "John",
familyName: "Doe",
},
emails: [
{ value: "john.doe@sendoso.com" },
],
userType: "sender",
division: "Marketing Ops",
}
⌘I
Update User
curl --request PUT \
--url https://app.sendoso.com/api/scim/v2/Users/{user_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"active": true,
"userType": "<string>",
"division": "<string>"
}
'import requests
url = "https://app.sendoso.com/api/scim/v2/Users/{user_id}"
payload = {
"name": {
"givenName": "<string>",
"familyName": "<string>"
},
"active": True,
"userType": "<string>",
"division": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: {givenName: '<string>', familyName: '<string>'},
active: true,
userType: '<string>',
division: '<string>'
})
};
fetch('https://app.sendoso.com/api/scim/v2/Users/{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://app.sendoso.com/api/scim/v2/Users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => [
'givenName' => '<string>',
'familyName' => '<string>'
],
'active' => true,
'userType' => '<string>',
'division' => '<string>'
]),
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://app.sendoso.com/api/scim/v2/Users/{user_id}"
payload := strings.NewReader("{\n \"name\": {\n \"givenName\": \"<string>\",\n \"familyName\": \"<string>\"\n },\n \"active\": true,\n \"userType\": \"<string>\",\n \"division\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://app.sendoso.com/api/scim/v2/Users/{user_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": {\n \"givenName\": \"<string>\",\n \"familyName\": \"<string>\"\n },\n \"active\": true,\n \"userType\": \"<string>\",\n \"division\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sendoso.com/api/scim/v2/Users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": {\n \"givenName\": \"<string>\",\n \"familyName\": \"<string>\"\n },\n \"active\": true,\n \"userType\": \"<string>\",\n \"division\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"],
id: "1000",
userName: "john.doe@sendoso.com",
active: true,
name: {
givenName: "John",
familyName: "Doe",
},
emails: [
{ value: "john.doe@sendoso.com" },
],
userType: "sender",
division: "Marketing Ops",
}