Operations for the Agents API.
Summary
Functions
Validate an agent credential
Get an agent registration
Link a claim attempt to an external user
Functions
@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
params— request body mapopts— per-request options (seeWorkOS.Client.request/5)
@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
id— The unique ID of the agent registration.opts— per-request options (seeWorkOS.Client.request/5)
@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
params— request body mapopts— per-request options (seeWorkOS.Client.request/5)