Update current user
curl --request PATCH \
--url https://app.gtm-api.com/id/v4/api/users/current \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": true,
"onboarding_steps": [
"<string>"
],
"locale": "<string>"
}
}
'import requests
url = "https://app.gtm-api.com/id/v4/api/users/current"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": True,
"onboarding_steps": ["<string>"],
"locale": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
avatar_url: '<string>',
phone: '<string>',
timezone: '<string>',
country: '<string>',
config: {
latest_team_sid: '<string>',
onboarding_completed: true,
onboarding_steps: ['<string>'],
locale: '<string>'
}
})
};
fetch('https://app.gtm-api.com/id/v4/api/users/current', 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.gtm-api.com/id/v4/api/users/current",
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([
'first_name' => '<string>',
'last_name' => '<string>',
'avatar_url' => '<string>',
'phone' => '<string>',
'timezone' => '<string>',
'country' => '<string>',
'config' => [
'latest_team_sid' => '<string>',
'onboarding_completed' => true,
'onboarding_steps' => [
'<string>'
],
'locale' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <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://app.gtm-api.com/id/v4/api/users/current"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"timezone\": \"<string>\",\n \"country\": \"<string>\",\n \"config\": {\n \"latest_team_sid\": \"<string>\",\n \"onboarding_completed\": true,\n \"onboarding_steps\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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://app.gtm-api.com/id/v4/api/users/current")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"timezone\": \"<string>\",\n \"country\": \"<string>\",\n \"config\": {\n \"latest_team_sid\": \"<string>\",\n \"onboarding_completed\": true,\n \"onboarding_steps\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/id/v4/api/users/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"timezone\": \"<string>\",\n \"country\": \"<string>\",\n \"config\": {\n \"latest_team_sid\": \"<string>\",\n \"onboarding_completed\": true,\n \"onboarding_steps\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "update",
"item": {
"sid": "<string>",
"default_team_sid": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": true,
"onboarding_steps": [
"<string>"
],
"locale": "<string>"
},
"utm": {},
"created_at": "<string>",
"updated_at": "<string>",
"erasure_requested_at": "<string>",
"erased_at": "<string>",
"deleted_at": "<string>"
},
"updated_fields": [
"<string>"
],
"previous_values": {},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}users
Update current user
Patch the authenticated user’s own profile: first_name / last_name / avatar_url / phone / timezone / country / config only. email (change-email flow), password (change-password flow), auth_provider, email_status and all sids are rejected if sent. At least one field required. config merges key-by-key.
Contract:
- MCP tool
update_current_user, registry packagemcp.id/users, mountid.identity. - Operation
update, response envelopeupdate. - Flags: none.
PATCH
/
api
/
users
/
current
Update current user
curl --request PATCH \
--url https://app.gtm-api.com/id/v4/api/users/current \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": true,
"onboarding_steps": [
"<string>"
],
"locale": "<string>"
}
}
'import requests
url = "https://app.gtm-api.com/id/v4/api/users/current"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": True,
"onboarding_steps": ["<string>"],
"locale": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
avatar_url: '<string>',
phone: '<string>',
timezone: '<string>',
country: '<string>',
config: {
latest_team_sid: '<string>',
onboarding_completed: true,
onboarding_steps: ['<string>'],
locale: '<string>'
}
})
};
fetch('https://app.gtm-api.com/id/v4/api/users/current', 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.gtm-api.com/id/v4/api/users/current",
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([
'first_name' => '<string>',
'last_name' => '<string>',
'avatar_url' => '<string>',
'phone' => '<string>',
'timezone' => '<string>',
'country' => '<string>',
'config' => [
'latest_team_sid' => '<string>',
'onboarding_completed' => true,
'onboarding_steps' => [
'<string>'
],
'locale' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <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://app.gtm-api.com/id/v4/api/users/current"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"timezone\": \"<string>\",\n \"country\": \"<string>\",\n \"config\": {\n \"latest_team_sid\": \"<string>\",\n \"onboarding_completed\": true,\n \"onboarding_steps\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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://app.gtm-api.com/id/v4/api/users/current")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"timezone\": \"<string>\",\n \"country\": \"<string>\",\n \"config\": {\n \"latest_team_sid\": \"<string>\",\n \"onboarding_completed\": true,\n \"onboarding_steps\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gtm-api.com/id/v4/api/users/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"timezone\": \"<string>\",\n \"country\": \"<string>\",\n \"config\": {\n \"latest_team_sid\": \"<string>\",\n \"onboarding_completed\": true,\n \"onboarding_steps\": [\n \"<string>\"\n ],\n \"locale\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "update",
"item": {
"sid": "<string>",
"default_team_sid": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"phone": "<string>",
"timezone": "<string>",
"country": "<string>",
"config": {
"latest_team_sid": "<string>",
"onboarding_completed": true,
"onboarding_steps": [
"<string>"
],
"locale": "<string>"
},
"utm": {},
"created_at": "<string>",
"updated_at": "<string>",
"erasure_requested_at": "<string>",
"erased_at": "<string>",
"deleted_at": "<string>"
},
"updated_fields": [
"<string>"
],
"previous_values": {},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}{
"success": false,
"error": {
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"debug_url": "<string>"
}
}Authorizations
Access token issued by gtm.service.id. Its access_identity claim carries team_sid, actor_sid and actor_type, and that team scope is authoritative.
Team scope for tokens that do not carry one. Ignored when the token already names a team.
Body
application/json
Request body of update_current_user.
Required string length:
1 - 100Maximum string length:
100Maximum string length:
1024Maximum string length:
32IANA tz, e.g. "Europe/Riga".
ISO 3166-1 alpha-2.
Required string length:
2Show child attributes
Show child attributes
Response
update success envelope.
⌘I