Claude Platform Docs

Buat URL Pendaftaran

$client->beta->userProfiles->createEnrollmentURL(string userProfileID, ?list<AnthropicBeta> betas, ?string workspaceID): BetaUserProfileEnrollmentURL
POST/v1/user_profiles/{user_profile_id}/enrollment_url

Buat URL Pendaftaran

Parameters
userProfileID: string
betas?:optional list<AnthropicBeta>

Optional header to specify the beta version(s) you want to use.

workspaceID?:optional string
Returns
class BetaUserProfileEnrollmentURL { $type; $expiresAt; $url; }
Type type

Object type. Always enrollment_url.

\Datetime expiresAt

A timestamp in RFC 3339 format

string url

Enrollment URL to send to the end user. Valid until expires_at.

Buat URL Pendaftaran
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaUserProfileEnrollmentURL = $client
  ->beta
  ->userProfiles
  ->createEnrollmentURL(
  'uprof_011CZkZCu8hGbp5mYRQgUmz9',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($betaUserProfileEnrollmentURL);
Returns Examples
Response 200
{
  "expires_at": "2026-03-15T10:15:00Z",
  "type": "enrollment_url",
  "url": "https://platform.claude.com/user-profiles/enrollment/M3J0bGJxZ2ppMnptbnB1"
}