Class: Anthropic::Resources::Beta::UserProfiles::ActionURLs

Inherits:
Object
  • Object
show all
Defined in:
lib/anthropic/resources/beta/user_profiles/action_urls.rb,
sig/anthropic/resources/beta/user_profiles/action_urls.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ActionURLs

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ActionURLs.

Parameters:



52
53
54
# File 'lib/anthropic/resources/beta/user_profiles/action_urls.rb', line 52

def initialize(client:)
  @client = client
end

Instance Method Details

#create(user_profile_id, action:, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::UserProfiles::BetaUserProfileActionURL

Create a link that sends the profile's end customer to the Verification Portal.

See Send an end customer a link to the Verification Portal for when to create the link and what the end customer sees.

Some parameter documentations has been truncated, see Models::Beta::UserProfiles::ActionURLCreateParams for more details.

Parameters:

  • user_profile_id (String) —

    Path param: The ID of the user profile the action is for (uprof_...).

  • action (Anthropic::Models::Beta::UserProfiles::BetaUserProfileEnrollEndUserAction) —

    Body param: The action that the person who opens the URL takes.

  • betas (Array<Symbol, String, Anthropic::Models::AnthropicBeta>) —

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

  • workspace_id (String) —

    Header param: Optional header to select the Workspace for this request. The valu

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil)
  • action: (Anthropic::Beta::UserProfiles::BetaUserProfileEnrollEndUserAction)
  • betas: (::Array[Anthropic::Models::anthropic_beta])
  • workspace_id: (String)
  • request_options: (Anthropic::request_opts)

Returns:

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/anthropic/resources/beta/user_profiles/action_urls.rb', line 32

def create(, params)
  parsed, options = Anthropic::Beta::UserProfiles::ActionURLCreateParams.dump_request(params)
  header_params = {betas: "anthropic-beta", workspace_id: "anthropic-workspace-id"}
  @client.request(
    qualifiers: {beta: "true"},
    span_name: Anthropic::Internal::Tracing::SpanName::USER_PROFILES_ACTION_URLS_CREATE,
    span_attributes: {"anthropic.user_profile.id" => },
    span_route: "/v1/user_profiles/{user_profile_id}/action_urls",
    method: :post,
    path: ["v1/user_profiles/%1$s/action_urls", ],
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Anthropic::Beta::UserProfiles::BetaUserProfileActionURL,
    options: {extra_headers: {"anthropic-beta" => "user-profiles-2026-08-18"}, **options}
  )
end