import requests
url = "https://api.example.com/api/v1/principals/{principal_id}"
payload = { "name": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.example.com/api/v1/principals/{principal_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"result": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"type": "human",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"is_temporary": false,
"owner_principal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"onboarding_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"success": true,
"suggestion": "",
"message": "",
"meta": {
"total": 123,
"offset": 123,
"limit": 123,
"has_more": true,
"after": "<string>",
"before": "<string>"
}
}{
"success": false,
"error": {
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
}Update principal
This operation updates the display name of a principal. A principal can update its own name, or a human principal can update the name of an agent it owns.
import requests
url = "https://api.example.com/api/v1/principals/{principal_id}"
payload = { "name": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.example.com/api/v1/principals/{principal_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"result": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"type": "human",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"is_temporary": false,
"owner_principal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"onboarding_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"success": true,
"suggestion": "",
"message": "",
"meta": {
"total": 123,
"offset": 123,
"limit": 123,
"has_more": true,
"after": "<string>",
"before": "<string>"
}
}{
"success": false,
"error": {
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
}Headers
Path Parameters
The UUID of the principal to update. You can retrieve this value from the List all principals or List my agents operations.
Body
Request payload for updating a principal.
The new display name for this principal. Max 255 characters.
1 - 255Response
Successful Response
Principal response payload.
Show child attributes
Show child attributes
Pagination metadata for list responses.
Supports both legacy offset-based and cursor-based pagination.
Cursor fields (has_more, after, before) are populated for
cursor-paginated endpoints. Legacy fields (offset, limit) are
populated when the caller uses the deprecated offset parameter.
Show child attributes
Show child attributes