Update User Profile
beta.user_profiles.update(strid, UserProfileUpdateParams**kwargs) -> BetaUserProfile
POST/v1/user_profiles/{id}
Update User Profile
Parameters
id: str
external_id: Optional[str]
metadata: Optional[Dict[str, str]]
Key-value pairs to merge into the stored metadata. Keys provided overwrite existing values. To remove a key, set its value to an empty string. Keys not provided are left unchanged. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters.
Returns
Update User Profile
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get("ANTHROPIC_API_KEY"), # This is the default and can be omitted
)
beta_user_profile = client.beta.user_profiles.update(
id="id",
)
print(beta_user_profile.id)Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"metadata": {
"foo": "string"
},
"trust_grants": {
"foo": {
"status": "status"
}
},
"type": "type",
"updated_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id"
}Returns Examples
Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"metadata": {
"foo": "string"
},
"trust_grants": {
"foo": {
"status": "status"
}
},
"type": "type",
"updated_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id"
}