WorkOS.Agents (WorkOS SDK for Elixir v3.0.1)

Copy Markdown View Source

Operations for the Agents API.

Summary

Functions

Get an agent registration

Link a claim attempt to an external user

Functions

create_validate(client, params \\ %{}, opts \\ [])

@spec create_validate(WorkOS.Client.t(), map(), keyword()) ::
  {:ok, WorkOS.AgentCredentialValidation.t()} | {:error, WorkOS.Error.error()}

Validate an agent credential

Validate an agent credential — an API key or access token — against the environment of the API key used to authenticate the request. This is a read-only check: it never consumes or mutates the credential.

Parameters

get_registration(client, id, opts \\ [])

@spec get_registration(WorkOS.Client.t(), String.t(), keyword()) ::
  {:ok, WorkOS.AgentRegistration.t()} | {:error, WorkOS.Error.error()}

Get an agent registration

Retrieve the details of an agent registration by ID. The registration is scoped to the environment of the API key used to authenticate the request.

Parameters

update_attempts(client, params \\ %{}, opts \\ [])

@spec update_attempts(WorkOS.Client.t(), map(), keyword()) ::
  {:ok, WorkOS.ClaimViewResponse.t()} | {:error, WorkOS.Error.error()}

Link a claim attempt to an external user

Link an external user to a claim attempt and retrieve the code needed for the agent to complete the claim. The user is looked up by external ID; if no user exists, one is created. When the user belongs to multiple organizations, an explicit organization must be provided.

Parameters