Criar perfil de usuário
POST/v1/user_profiles
Criar perfil de usuário
Parameters
Returns
Criar perfil de usuário
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client(apiKey: 'my-anthropic-api-key');
$betaUserProfile = $client->beta->userProfiles->create(
accessType: 'application',
externalID: 'user_12345',
externalUserDetails: [
'accountStatus' => 'active',
'country' => 'country',
'emailHash' => 'x',
'entityType' => 'individual',
'nameHash' => 'x',
'onboardedAt' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
'referenceID' => 'x',
],
externalUserOnboardedAt: new \DateTimeImmutable('2024-11-02T08:15:00Z'),
metadata: [],
name: 'x',
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);
var_dump($betaUserProfile);Response 200
{
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
"created_at": "2026-03-15T10:00:00Z",
"metadata": {},
"trust_grants": {
"cyber": {
"status": "active"
}
},
"type": "user_profile",
"updated_at": "2026-03-15T10:00:00Z",
"access_type": "application",
"external_id": "user_12345",
"external_user_details": {
"account_status": "active",
"country": "country",
"email_hash": "email_hash",
"entity_type": "individual",
"name_hash": "name_hash",
"onboarded_at": "2019-12-27T18:11:19.117Z",
"reference_id": "reference_id"
},
"external_user_onboarded_at": "2024-11-02T08:15:00Z",
"name": "Example User"
}Returns Examples
Response 200
{
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
"created_at": "2026-03-15T10:00:00Z",
"metadata": {},
"trust_grants": {
"cyber": {
"status": "active"
}
},
"type": "user_profile",
"updated_at": "2026-03-15T10:00:00Z",
"access_type": "application",
"external_id": "user_12345",
"external_user_details": {
"account_status": "active",
"country": "country",
"email_hash": "email_hash",
"entity_type": "individual",
"name_hash": "name_hash",
"onboarded_at": "2019-12-27T18:11:19.117Z",
"reference_id": "reference_id"
},
"external_user_onboarded_at": "2024-11-02T08:15:00Z",
"name": "Example User"
}