Create User Profile
POST/v1/user_profiles
Create User Profile
Parameters
Returns
Create User Profile
<?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',
externalUserOnboardedAt: new \DateTimeImmutable('2024-11-02T08:15:00Z'),
metadata: [],
name: 'x',
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);
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_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_onboarded_at": "2024-11-02T08:15:00Z",
"name": "Example User"
}