Update User
curl --request PATCH \
--url https://api.attention.tech/v2/organizations/users/{userId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "John",
"lastName": "Doe",
"password": "newPassword123",
"botName": "JohnBot4",
"dealsEnabled": false,
"teamUUIDsToRemove": [
"802a13d8-1ad0-4f4a-b880-9ace889fafa61"
],
"teamsToAdd": [
{
"uuid": "fe515723-fe2e-4959-a5fa-c4d3937fe7e4",
"primary": true
},
{
"uuid": "802a13d8-1ad0-4f4a-b880-9ace889fafa6",
"primary": false
}
],
"roleUUID": "84e67f54-5157-442b-a2b3-8b9c728b2fef1",
"seat_type": "recording"
}
'import requests
url = "https://api.attention.tech/v2/organizations/users/{userId}"
payload = {
"firstName": "John",
"lastName": "Doe",
"password": "newPassword123",
"botName": "JohnBot4",
"dealsEnabled": False,
"teamUUIDsToRemove": ["802a13d8-1ad0-4f4a-b880-9ace889fafa61"],
"teamsToAdd": [
{
"uuid": "fe515723-fe2e-4959-a5fa-c4d3937fe7e4",
"primary": True
},
{
"uuid": "802a13d8-1ad0-4f4a-b880-9ace889fafa6",
"primary": False
}
],
"roleUUID": "84e67f54-5157-442b-a2b3-8b9c728b2fef1",
"seat_type": "recording"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
password: 'newPassword123',
botName: 'JohnBot4',
dealsEnabled: false,
teamUUIDsToRemove: ['802a13d8-1ad0-4f4a-b880-9ace889fafa61'],
teamsToAdd: [
{uuid: 'fe515723-fe2e-4959-a5fa-c4d3937fe7e4', primary: true},
{uuid: '802a13d8-1ad0-4f4a-b880-9ace889fafa6', primary: false}
],
roleUUID: '84e67f54-5157-442b-a2b3-8b9c728b2fef1',
seat_type: 'recording'
})
};
fetch('https://api.attention.tech/v2/organizations/users/{userId}', 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.attention.tech/v2/organizations/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'lastName' => 'Doe',
'password' => 'newPassword123',
'botName' => 'JohnBot4',
'dealsEnabled' => false,
'teamUUIDsToRemove' => [
'802a13d8-1ad0-4f4a-b880-9ace889fafa61'
],
'teamsToAdd' => [
[
'uuid' => 'fe515723-fe2e-4959-a5fa-c4d3937fe7e4',
'primary' => true
],
[
'uuid' => '802a13d8-1ad0-4f4a-b880-9ace889fafa6',
'primary' => false
]
],
'roleUUID' => '84e67f54-5157-442b-a2b3-8b9c728b2fef1',
'seat_type' => 'recording'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/organizations/users/{userId}"
payload := strings.NewReader("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"password\": \"newPassword123\",\n \"botName\": \"JohnBot4\",\n \"dealsEnabled\": false,\n \"teamUUIDsToRemove\": [\n \"802a13d8-1ad0-4f4a-b880-9ace889fafa61\"\n ],\n \"teamsToAdd\": [\n {\n \"uuid\": \"fe515723-fe2e-4959-a5fa-c4d3937fe7e4\",\n \"primary\": true\n },\n {\n \"uuid\": \"802a13d8-1ad0-4f4a-b880-9ace889fafa6\",\n \"primary\": false\n }\n ],\n \"roleUUID\": \"84e67f54-5157-442b-a2b3-8b9c728b2fef1\",\n \"seat_type\": \"recording\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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.patch("https://api.attention.tech/v2/organizations/users/{userId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"password\": \"newPassword123\",\n \"botName\": \"JohnBot4\",\n \"dealsEnabled\": false,\n \"teamUUIDsToRemove\": [\n \"802a13d8-1ad0-4f4a-b880-9ace889fafa61\"\n ],\n \"teamsToAdd\": [\n {\n \"uuid\": \"fe515723-fe2e-4959-a5fa-c4d3937fe7e4\",\n \"primary\": true\n },\n {\n \"uuid\": \"802a13d8-1ad0-4f4a-b880-9ace889fafa6\",\n \"primary\": false\n }\n ],\n \"roleUUID\": \"84e67f54-5157-442b-a2b3-8b9c728b2fef1\",\n \"seat_type\": \"recording\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/organizations/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"password\": \"newPassword123\",\n \"botName\": \"JohnBot4\",\n \"dealsEnabled\": false,\n \"teamUUIDsToRemove\": [\n \"802a13d8-1ad0-4f4a-b880-9ace889fafa61\"\n ],\n \"teamsToAdd\": [\n {\n \"uuid\": \"fe515723-fe2e-4959-a5fa-c4d3937fe7e4\",\n \"primary\": true\n },\n {\n \"uuid\": \"802a13d8-1ad0-4f4a-b880-9ace889fafa6\",\n \"primary\": false\n }\n ],\n \"roleUUID\": \"84e67f54-5157-442b-a2b3-8b9c728b2fef1\",\n \"seat_type\": \"recording\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"botName": "John's Notetaker",
"email": "15john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"primaryTeamUUID": "fe515723-fe2e-4959-a5fa-c4d3937fe7e4",
"roles": [
{
"name": "Sales Rep",
"type": "SALES_REP",
"uuid": "55906d03-2849-4c3c-a67f-da07a6300de4"
}
],
"settings": {
"autoCalculateCRMFields": true,
"joinWhenIAmHostAndAlone": true,
"joinWhenIAmHostWithPeers": true,
"joinWhenUnlicensedPeerIsHost": true,
"realTimeCapabilitiesOFF": true,
"seat_type": "recording"
},
"transcriptLang": "en",
"uuid": "c74eb7bc-7b0e-45e2-843a-67305bfc4dce"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"code": 401,
"message": "unauthenticated for Invalid API key"
}{
"code": 422,
"message": "Missing required fields in body"
}{
"code": "500",
"detail": "An unexpected error occurred on the server. Please try again later or contact support if the problem persists.",
"id": "internal_server_error",
"title": "Internal Server Error"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Organization
Update User
Updates an existing user’s information in the organization. You can modify the user’s name, email, team assignment, and role. Requires proper permissions to update user details.
PATCH
/
organizations
/
users
/
{userId}
Update User
curl --request PATCH \
--url https://api.attention.tech/v2/organizations/users/{userId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "John",
"lastName": "Doe",
"password": "newPassword123",
"botName": "JohnBot4",
"dealsEnabled": false,
"teamUUIDsToRemove": [
"802a13d8-1ad0-4f4a-b880-9ace889fafa61"
],
"teamsToAdd": [
{
"uuid": "fe515723-fe2e-4959-a5fa-c4d3937fe7e4",
"primary": true
},
{
"uuid": "802a13d8-1ad0-4f4a-b880-9ace889fafa6",
"primary": false
}
],
"roleUUID": "84e67f54-5157-442b-a2b3-8b9c728b2fef1",
"seat_type": "recording"
}
'import requests
url = "https://api.attention.tech/v2/organizations/users/{userId}"
payload = {
"firstName": "John",
"lastName": "Doe",
"password": "newPassword123",
"botName": "JohnBot4",
"dealsEnabled": False,
"teamUUIDsToRemove": ["802a13d8-1ad0-4f4a-b880-9ace889fafa61"],
"teamsToAdd": [
{
"uuid": "fe515723-fe2e-4959-a5fa-c4d3937fe7e4",
"primary": True
},
{
"uuid": "802a13d8-1ad0-4f4a-b880-9ace889fafa6",
"primary": False
}
],
"roleUUID": "84e67f54-5157-442b-a2b3-8b9c728b2fef1",
"seat_type": "recording"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
password: 'newPassword123',
botName: 'JohnBot4',
dealsEnabled: false,
teamUUIDsToRemove: ['802a13d8-1ad0-4f4a-b880-9ace889fafa61'],
teamsToAdd: [
{uuid: 'fe515723-fe2e-4959-a5fa-c4d3937fe7e4', primary: true},
{uuid: '802a13d8-1ad0-4f4a-b880-9ace889fafa6', primary: false}
],
roleUUID: '84e67f54-5157-442b-a2b3-8b9c728b2fef1',
seat_type: 'recording'
})
};
fetch('https://api.attention.tech/v2/organizations/users/{userId}', 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.attention.tech/v2/organizations/users/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'lastName' => 'Doe',
'password' => 'newPassword123',
'botName' => 'JohnBot4',
'dealsEnabled' => false,
'teamUUIDsToRemove' => [
'802a13d8-1ad0-4f4a-b880-9ace889fafa61'
],
'teamsToAdd' => [
[
'uuid' => 'fe515723-fe2e-4959-a5fa-c4d3937fe7e4',
'primary' => true
],
[
'uuid' => '802a13d8-1ad0-4f4a-b880-9ace889fafa6',
'primary' => false
]
],
'roleUUID' => '84e67f54-5157-442b-a2b3-8b9c728b2fef1',
'seat_type' => 'recording'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/organizations/users/{userId}"
payload := strings.NewReader("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"password\": \"newPassword123\",\n \"botName\": \"JohnBot4\",\n \"dealsEnabled\": false,\n \"teamUUIDsToRemove\": [\n \"802a13d8-1ad0-4f4a-b880-9ace889fafa61\"\n ],\n \"teamsToAdd\": [\n {\n \"uuid\": \"fe515723-fe2e-4959-a5fa-c4d3937fe7e4\",\n \"primary\": true\n },\n {\n \"uuid\": \"802a13d8-1ad0-4f4a-b880-9ace889fafa6\",\n \"primary\": false\n }\n ],\n \"roleUUID\": \"84e67f54-5157-442b-a2b3-8b9c728b2fef1\",\n \"seat_type\": \"recording\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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.patch("https://api.attention.tech/v2/organizations/users/{userId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"password\": \"newPassword123\",\n \"botName\": \"JohnBot4\",\n \"dealsEnabled\": false,\n \"teamUUIDsToRemove\": [\n \"802a13d8-1ad0-4f4a-b880-9ace889fafa61\"\n ],\n \"teamsToAdd\": [\n {\n \"uuid\": \"fe515723-fe2e-4959-a5fa-c4d3937fe7e4\",\n \"primary\": true\n },\n {\n \"uuid\": \"802a13d8-1ad0-4f4a-b880-9ace889fafa6\",\n \"primary\": false\n }\n ],\n \"roleUUID\": \"84e67f54-5157-442b-a2b3-8b9c728b2fef1\",\n \"seat_type\": \"recording\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/organizations/users/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"password\": \"newPassword123\",\n \"botName\": \"JohnBot4\",\n \"dealsEnabled\": false,\n \"teamUUIDsToRemove\": [\n \"802a13d8-1ad0-4f4a-b880-9ace889fafa61\"\n ],\n \"teamsToAdd\": [\n {\n \"uuid\": \"fe515723-fe2e-4959-a5fa-c4d3937fe7e4\",\n \"primary\": true\n },\n {\n \"uuid\": \"802a13d8-1ad0-4f4a-b880-9ace889fafa6\",\n \"primary\": false\n }\n ],\n \"roleUUID\": \"84e67f54-5157-442b-a2b3-8b9c728b2fef1\",\n \"seat_type\": \"recording\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"botName": "John's Notetaker",
"email": "15john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"primaryTeamUUID": "fe515723-fe2e-4959-a5fa-c4d3937fe7e4",
"roles": [
{
"name": "Sales Rep",
"type": "SALES_REP",
"uuid": "55906d03-2849-4c3c-a67f-da07a6300de4"
}
],
"settings": {
"autoCalculateCRMFields": true,
"joinWhenIAmHostAndAlone": true,
"joinWhenIAmHostWithPeers": true,
"joinWhenUnlicensedPeerIsHost": true,
"realTimeCapabilitiesOFF": true,
"seat_type": "recording"
},
"transcriptLang": "en",
"uuid": "c74eb7bc-7b0e-45e2-843a-67305bfc4dce"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"code": 401,
"message": "unauthenticated for Invalid API key"
}{
"code": 422,
"message": "Missing required fields in body"
}{
"code": "500",
"detail": "An unexpected error occurred on the server. Please try again later or contact support if the problem persists.",
"id": "internal_server_error",
"title": "Internal Server Error"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Authorizations
Path Parameters
UUID of the user to update
Body
application/jsonapplication/vnd.api+json
The updated user information
Show child attributes
Show child attributes
The UUID of the role assigned to the user.
The type of seat assigned to the user.
Available options:
listener, recording Example:
"recording"
Response
User successfully updated
Show child attributes
Show child attributes
Example:
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"createdAt": "2021-01-01T00:00:00Z",
"transcriptLang": "en-US",
"joinOutsideHostMeetings": true,
"realTimeCapabilities": false,
"botName": "MyBot",
"botImageURL": "https://example.com/bot.png",
"primaryTeamUUID": "primary-team-uuid-12345",
"organizationRoleUUID": "org-role-uuid-56789",
"showReferralScreen": false,
"seatType": "admin"
}
Was this page helpful?
⌘I