PUT
/v1/admin/profile
Update Profile
curl -X PUT https://api.{cluster}.{platform}.voiger.io/v1/admin/profile \
-H "Cookie: sid=$VOIGER_SESSION" \
-H "x-workspace-code: your-workspace-code" \
-H "x-csrf-token: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"profile": {
"first_name": "Salman",
"last_name": "Ahmad",
"phone": "+94..",
"image": {
"id": "a9788d2e-ca37-41e3-b440-85ae6f8cd4c6"
}
}
}'
const res = await fetch("https://api.{cluster}.{platform}.voiger.io/v1/admin/profile", {
method: "PUT",
credentials: "include",
headers: { "x-workspace-code": "your-workspace-code" },
headers: { "Content-Type": "application/json", "x-csrf-token": csrf },
body: JSON.stringify({
"profile": {
"first_name": "Salman",
"last_name": "Ahmad",
"phone": "+94..",
"image": {
"id": "a9788d2e-ca37-41e3-b440-85ae6f8cd4c6"
}
}
}),
})
const data = await res.json()
Parameters
x-workspace-code
string
required
in header
image▾
null | object
when image is attached, empty object, otherwise null will be returned
role_id
string
ID of the admin's role. The client resolves the role name from its cached roles list.
team_ids
array
IDs of the active teams the admin is a member of (empty array when none). The client resolves team names from its cached teams list.
json · 200
{
"profile": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"first_name": "Salman",
"last_name": "Ahmad",
"image": null,
"email": "salman@domain.com",
"phone": "+94..",
"role_id": "9b2ac10b-58cc-4372-a567-0e02b2c3d111",
"team_ids": [
"1a2bc10b-58cc-4372-a567-0e02b2c3d222",
"2b3cc10b-58cc-4372-a567-0e02b2c3d333"
]
}
}