team.user.delegate
Delegates a deactivated profile (team_user_id) to an active member (target_team_user_id). The delegated profile’s email is rewritten to delegate-xxx@manus.im and the original email is preserved in original_email. Pre-checks: the source must be currently INACTIVE, the target must be an active non-delegated member, and the source cannot be the team owner.
curl --request POST \
--url https://api.manus.im/v2/team.user.delegate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"team_user_id": "123456",
"target_team_user_id": "654321"
}
'import requests
url = "https://api.manus.im/v2/team.user.delegate"
payload = {
"team_user_id": "123456",
"target_team_user_id": "654321"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({team_user_id: '123456', target_team_user_id: '654321'})
};
fetch('https://api.manus.im/v2/team.user.delegate', 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.manus.im/v2/team.user.delegate",
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([
'team_user_id' => '123456',
'target_team_user_id' => '654321'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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.manus.im/v2/team.user.delegate"
payload := strings.NewReader("{\n \"team_user_id\": \"123456\",\n \"target_team_user_id\": \"654321\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.manus.im/v2/team.user.delegate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"team_user_id\": \"123456\",\n \"target_team_user_id\": \"654321\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.manus.im/v2/team.user.delegate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"team_user_id\": \"123456\",\n \"target_team_user_id\": \"654321\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"request_id": "<string>",
"user": {
"email": "<string>",
"user_name": "<string>",
"team_user_id": "<string>",
"delegated_to": "<string>",
"delegated_profiles": [
{
"team_user_id": "<string>",
"display_name": "<string>",
"delegated_at": "2023-11-07T05:31:56Z"
}
],
"original_email": "<string>"
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}team_user_id (the source profile) must currently have status = USER_STATUS_INACTIVE. Active members and already-removed users are rejected with failed_precondition — call team.user.update with status: USER_STATUS_INACTIVE first if needed.Target must be active and never delegated: target_team_user_id must be an active team member that is not currently a delegated profile. This prevents cycles and ownership-laundering through chained delegations.Owner cannot be delegated: The team owner’s profile is rejected with failed_precondition.Email rewrite: On success, the source’s email becomes delegate-<id>@manus.im and the original is preserved in original_email. Subsequent operations on this profile must use team_user_id.Role (required): uses the MigratedProfileRole enum, distinct from the TeamMemberRole used elsewhere. Send MIGRATED_PROFILE_ROLE_MEMBER to activate as a regular member, MIGRATED_PROFILE_ROLE_FREE_GUEST to activate as a free (non-seat-consuming) guest, or MIGRATED_PROFILE_ROLE_DEACTIVATED to keep the profile in the deactivated pool under the new assignee. MIGRATED_PROFILE_ROLE_UNSPECIFIED is rejected — the field must carry an explicit value.Protocols: Also callable via Connect RPC. See Protocols.Authorizations
Body
ID of the deactivated profile being delegated.
1 - 64"123456"
ID of the active member receiving the delegation.
1 - 64"654321"
Post-delegation role for the source profile. Required — MIGRATED_PROFILE_ROLE_UNSPECIFIED is rejected. Use MIGRATED_PROFILE_ROLE_MEMBER to activate as a regular member, MIGRATED_PROFILE_ROLE_FREE_GUEST to activate as a free guest, or MIGRATED_PROFILE_ROLE_DEACTIVATED to keep the profile deactivated under the new assignee.
MIGRATED_PROFILE_ROLE_MEMBER, MIGRATED_PROFILE_ROLE_FREE_GUEST, MIGRATED_PROFILE_ROLE_DEACTIVATED Response
Profile delegated successfully.
true
A team member.
Hide child attributes
Hide child attributes
Email address. After delegation this field becomes delegate-xxx@manus.im — the pre-delegation address is preserved in original_email.
Status of a team member.
USER_STATUS_ACTIVE, USER_STATUS_INACTIVE, USER_STATUS_REMOVED Team role. TEAM_MEMBER_ROLE_OWNER is read-only and cannot be granted via API (transfer ownership in the UI). Guest members do not consume a paid seat.
TEAM_MEMBER_ROLE_OWNER, TEAM_MEMBER_ROLE_ADMIN, TEAM_MEMBER_ROLE_MEMBER, TEAM_MEMBER_ROLE_SUPER_ADMIN, TEAM_MEMBER_ROLE_GUEST Display name. Sourced from team_user_relation.Name (set via team.user.rename) when present, otherwise falls back to the underlying user's name. Omitted when neither is set.
Stable identifier for the team member, unique within the team. Use this (not email) for any subsequent profile-management call.
If this profile is currently delegated, the team_user_id of the assignee.
Profiles delegated to this user. Only populated by single-record responses (team.user.detail, team.user.update, etc.). team.user.list omits this field to avoid N+1 fan-out.
Hide child attributes
Hide child attributes
ID of the delegated profile.
Display name. Falls back to the original (pre-delegation) email when the profile has no name set.
Team role. TEAM_MEMBER_ROLE_OWNER is read-only and cannot be granted via API (transfer ownership in the UI). Guest members do not consume a paid seat.
TEAM_MEMBER_ROLE_OWNER, TEAM_MEMBER_ROLE_ADMIN, TEAM_MEMBER_ROLE_MEMBER, TEAM_MEMBER_ROLE_SUPER_ADMIN, TEAM_MEMBER_ROLE_GUEST When the delegation was created.
Pre-delegation email. Only present for currently-delegated profiles.
curl --request POST \
--url https://api.manus.im/v2/team.user.delegate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"team_user_id": "123456",
"target_team_user_id": "654321"
}
'import requests
url = "https://api.manus.im/v2/team.user.delegate"
payload = {
"team_user_id": "123456",
"target_team_user_id": "654321"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({team_user_id: '123456', target_team_user_id: '654321'})
};
fetch('https://api.manus.im/v2/team.user.delegate', 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.manus.im/v2/team.user.delegate",
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([
'team_user_id' => '123456',
'target_team_user_id' => '654321'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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.manus.im/v2/team.user.delegate"
payload := strings.NewReader("{\n \"team_user_id\": \"123456\",\n \"target_team_user_id\": \"654321\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.manus.im/v2/team.user.delegate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"team_user_id\": \"123456\",\n \"target_team_user_id\": \"654321\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.manus.im/v2/team.user.delegate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"team_user_id\": \"123456\",\n \"target_team_user_id\": \"654321\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"request_id": "<string>",
"user": {
"email": "<string>",
"user_name": "<string>",
"team_user_id": "<string>",
"delegated_to": "<string>",
"delegated_profiles": [
{
"team_user_id": "<string>",
"display_name": "<string>",
"delegated_at": "2023-11-07T05:31:56Z"
}
],
"original_email": "<string>"
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}