Create User Profile
beta.user_profiles.create(UserProfileCreateParams**kwargs) -> BetaUserProfile
POST/v1/user_profiles
Create User Profile
Parameters
external_id: Optional[str]
metadata: Optional[Dict[str, str]]
Free-form key-value data to attach to this user profile. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters. Values must be non-empty strings.
Returns
Create 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.create()
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"
}