Skip to main content
PATCH
/
api
/
v1
/
principals
/
{principal_id}
Update principal
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)
{
  "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>"
  }
}

Headers

X-API-Key
string | null

Path Parameters

principal_id
string<uuid>
required

The UUID of the principal to update. You can retrieve this value from the List all principals or List my agents operations.

Body

application/json

Request payload for updating a principal.

name
string
required

The new display name for this principal. Max 255 characters.

Required string length: 1 - 255

Response

Successful Response

result
PrincipalRead · object
required

Principal response payload.

success
boolean
default:true
suggestion
string
default:""
message
string
default:""
meta
PaginationMeta · object

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.