Skip to content
Reference API reference

Klyroo.Hotkey API reference

Every public class, record, property and method of Klyroo.Hotkey.

On this page

Every public class, record, property and method exposed by Klyroo.Hotkey (namespace Klyroo.Hotkey).

Klyroo.Hotkey

Classes (8) · Records (16)

Classes

HotkeyClient

Klyroo.Hotkey · sealed class

Server-side client for the Hotkey HTTP API (https://console.hotkey.so/v1/). The caller owns the supplied HttpClient.

Constructor Description
HotkeyClient(HttpClient http, string apiKey) Creates a client using http and authenticates requests with Bearer <apiKey>.
Method Returns Description
GetAccountAsync(CancellationToken = default) Task<HotkeyAccount> Reads the authenticated Hotkey account and active workspace.
GetWorkspaceAsync(CancellationToken = default) Task<HotkeyWorkspace> Reads the current workspace settings, plan and allowed embed origins.
UpdateWorkspaceAsync(WorkspaceUpdate settings, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyWorkspace> Updates workspace settings such as phone alerts and EmbedOrigins.
ListBrowsersAsync(BrowserFilter? filter = null, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyBrowser>> Returns one page of browsers matching filter (limit 1–100).
EnumerateBrowsersAsync(BrowserFilter? filter = null, CancellationToken = default) IAsyncEnumerable<HotkeyBrowser> Pages through all browsers matching filter using cursor pagination.
GetBrowserAsync(string browserId, CancellationToken = default) Task<HotkeyBrowser> Reads one browser by ID.
CreateBrowserAsync(BrowserCreate settings, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyBrowser> Provisions a new cloud browser.
GetOrCreateBrowserAsync(BrowserCreate settings, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyBrowser> Provisions a browser by ExternalId, recovering and verifying the existing browser on 409 browser_exists.
UpdateBrowserAsync(string browserId, BrowserUpdate settings, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyBrowser> Updates a browser's name, external ID, time zone, languages or metadata.
WakeBrowserAsync(string browserId, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyBrowser> Wakes a sleeping browser.
SleepBrowserAsync(string browserId, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyBrowser> Puts a browser to sleep.
DeleteBrowserAsync(string browserId, CancellationToken = default) Task<HotkeyBrowserDeletion> Deletes a browser.
ListTabsAsync(string browserId, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyTab>> Lists open tabs in a browser.
CreateAskAsync(AskCreate settings, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyAsk> Creates a human handoff request targeting either one tab or one HTTP/HTTPS URL.
ListAsksAsync(string? browserId = null, string? status = null, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyAsk>> Lists handoff asks filtered by browser or status.
GetAskAsync(string askId, CancellationToken = default) Task<HotkeyAsk> Reads the current state of an ask.
CancelAskAsync(string askId, string? note = null, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyAsk> Cancels an open ask with an optional note.
RenewAskLinkAsync(string askId, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyAsk> Issues a fresh expiring handoff link and invalidates the previous one.
ListSignInsAsync(string browserId, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeySignIn>> Lists saved sign-in metadata for a browser.
ForgetSignInAsync(string browserId, string signInId, CancellationToken = default) Task Removes a saved sign-in from a browser.
CreateEmbedAsync(string browserId, EmbedCreate settings, CancellationToken = default) Task<HotkeyEmbed> Creates a short-lived "view" or "interact" live-view embed (sent once, never auto-retried).
ListEmbedsAsync(string browserId, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyEmbed>> Lists embeds for a browser.
GetEmbedAsync(string embedId, CancellationToken = default) Task<HotkeyEmbed> Reads one embed by ID.
RevokeEmbedAsync(string embedId, CancellationToken = default) Task Revokes an active embed.
ListDownloadsAsync(string browserId, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyDownload>> Lists files downloaded in a browser.
GetDownloadAsync(string downloadId, CancellationToken = default) Task<HotkeyDownload> Reads metadata for one download.
CopyDownloadToAsync(string downloadId, Stream destination, CancellationToken = default) Task Streams download bytes into destination without closing the stream.
DeleteDownloadAsync(string downloadId, CancellationToken = default) Task Deletes a stored download.
ListEventsAsync(string? browserId = null, string? type = null, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyEvent>> Reads the event cursor filtered by browser or event type.
GetUsageAsync(DateOnly? from = null, DateOnly? to = null, string? browserId = null, string? externalId = null, bool groupByExternalId = false, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyUsagePage> Queries usage metrics over a date range.
CopyUsageCsvToAsync(Stream destination, DateOnly? from = null, DateOnly? to = null, string? browserId = null, string? externalId = null, bool groupByExternalId = false, CancellationToken = default) Task Streams usage metrics as text/csv into destination without closing it.
ListAgentKeysAsync(string? browserId = null, int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyAgentKey>> Lists issued agent keys.
CreateBrowserAgentKeyAsync(string browserId, string name, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyAgentKey> Creates an API key scoped to a single browser.
RevokeAgentKeyAsync(string keyId, CancellationToken = default) Task Revokes an agent key.
CreateWebhookEndpointAsync(WebhookEndpointSettings settings, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyWebhookEndpoint> Registers an HTTPS webhook endpoint and returns its signing secret.
ListWebhookEndpointsAsync(int? limit = null, string? after = null, CancellationToken = default) Task<HotkeyPage<HotkeyWebhookEndpoint>> Lists configured webhook endpoints.
GetWebhookEndpointAsync(string endpointId, CancellationToken = default) Task<HotkeyWebhookEndpoint> Reads one webhook endpoint.
UpdateWebhookEndpointAsync(string endpointId, WebhookEndpointSettings settings, string? idempotencyKey = null, CancellationToken = default) Task<HotkeyWebhookEndpoint> Updates a webhook endpoint's URL, subscribed events or description.
DeleteWebhookEndpointAsync(string endpointId, CancellationToken = default) Task Deletes a webhook endpoint.

HotkeyWebhook

Klyroo.Hotkey · static class

Method Returns Description
VerifyAndRead(ReadOnlySpan<byte> rawBody, string? signature, string secret, DateTimeOffset? now = null) HotkeyEvent? Verifies the Hotkey-Signature header (HMAC-SHA256 and ±5 minute window) over rawBody before deserializing HotkeyEvent. Returns null on any validation failure.

HotkeyServiceCollectionExtensions

Klyroo.Hotkey · static class

Method Returns Description
AddKlyrooHotkey(this IServiceCollection services, Func<IServiceProvider, string> getApiKey) IHttpClientBuilder Registers the named "Klyroo.Hotkey" HttpClient (redirects and cookies disabled) and typed HotkeyClient.

HotkeyException

Klyroo.Hotkey · sealed class · inherits HttpRequestException

Thrown when the Hotkey API returns a non-success HTTP status code after any eligible retries.

Property Type Description
Code string? Machine-readable Hotkey error code (for example browser_exists or idempotency_key_in_use).
RequestId string? Hotkey request identifier from the Request-Id header or error body.
RetryAfter TimeSpan? Requested retry delay from the Retry-After header or error body, when present.
ExistingBrowserId string? ID of the existing browser returned with a 409 browser_exists conflict.

HotkeyAsk

Klyroo.Hotkey · sealed class

Represents a human handoff request. Implemented as a class so one-time links are omitted from generated ToString() output.

Property Type Description
Id (required init) string Ask identifier.
Browser (required init) HotkeyBrowserRef Target browser reference.
Status (required init) string Current ask state.
Reason (init) string? Prompt shown to the person completing the handoff.
Tab (init) int Browser tab identifier.
Expires (init) DateTimeOffset? When the ask times out.
Link (init) Uri? Expiring handoff URL to deliver only to the authorized user.
LinkExpires (init) DateTimeOffset? When Link expires.
Note (init) string? Optional resolution or cancellation note.
SaveSignIn (init) bool Whether the user may save their sign-in.

HotkeyEmbed

Klyroo.Hotkey · sealed class

Represents a short-lived live-view or interactive browser embed.

Property Type Description
Id (required init) string Embed identifier.
Browser (required init) string Target browser ID.
Status (required init) string Current embed state.
Mode (init) string? "view" or "interact".
Origins (init) IReadOnlyList<string>? Allowed embedding origins.
Sites (init) IReadOnlyList<string>? Optional site restrictions.
Expires (init) DateTimeOffset? Embed expiration timestamp.
EndedWhy (init) string? Reason the embed ended, if ended.
Url (init) Uri? Short-lived embed URL.
Token (init) string? Embed token, when returned on creation.

HotkeyAgentKey

Klyroo.Hotkey · sealed class

Represents an issued Hotkey API key.

Property Type Description
Id (required init) string Key identifier.
Name (required init) string Display name of the key.
Browser (init) string? Scoped browser ID, or null for a workspace key.
Expires (init) DateTimeOffset? Optional expiration timestamp.
Secret (init) string? Secret key value, returned only on creation.

HotkeyWebhookEndpoint

Klyroo.Hotkey · sealed class

Represents a registered webhook destination.

Property Type Description
Id (required init) string Endpoint identifier.
Url (required init) Uri HTTPS destination URL.
Events (required init) IReadOnlyList<string> Subscribed event types.
Description (init) string? Optional description.
LastDelivery (init) JsonElement Metadata of the latest delivery attempt.
Secret (init) string? Signing secret for HotkeyWebhook.VerifyAndRead, returned on creation.

Records

HotkeyPage<T>

Klyroo.Hotkey · record

HotkeyPage<T>(IReadOnlyList<T> Data, bool HasMore, string? NextCursor) — cursor-paginated response envelope.

HotkeyAccount

Klyroo.Hotkey · record

HotkeyAccount(string Id, string Name, bool Waiting, HotkeyWorkspace Workspace, string? Browser)

HotkeyWorkspace

Klyroo.Hotkey · record

HotkeyWorkspace(string Id, string Name, bool Personal, string Role, bool PhoneAlerts, IReadOnlyList<string>? EmbedOrigins, JsonElement Plan)

WorkspaceUpdate

Klyroo.Hotkey · record

WorkspaceUpdate(bool? PhoneAlerts = null, IReadOnlyList<string>? EmbedOrigins = null)

HotkeyBrowser

Klyroo.Hotkey · record

HotkeyBrowser(string Id, string Name, string? ExternalId, string State, string Agent, int WaitingAsks, string? TimeZone, IReadOnlyList<string>? Languages, IReadOnlyDictionary<string, string>? Metadata)

BrowserCreate

Klyroo.Hotkey · record

BrowserCreate(string? Name = null, string? ExternalId = null, string? TimeZone = null, IReadOnlyList<string>? Languages = null, IReadOnlyDictionary<string, string>? Metadata = null)

BrowserUpdate

Klyroo.Hotkey · record

BrowserUpdate(string? Name = null, string? ExternalId = null, string? TimeZone = null, IReadOnlyList<string>? Languages = null, IReadOnlyDictionary<string, string?>? Metadata = null)

BrowserFilter

Klyroo.Hotkey · record

BrowserFilter(string? ExternalId = null, string? State = null, string? Search = null, IReadOnlyDictionary<string, string>? Metadata = null)

HotkeyBrowserRef

Klyroo.Hotkey · record

HotkeyBrowserRef(string Id, string? Name, string? ExternalId)

HotkeyBrowserDeletion

Klyroo.Hotkey · record

HotkeyBrowserDeletion(string Id, string? ExternalId, bool Deleted, string Status)

HotkeyTab

Klyroo.Hotkey · record

HotkeyTab(int Id, string Title, Uri? Url, string State)

AskCreate

Klyroo.Hotkey · record

AskCreate(string Browser, string Reason, int? Tab = null, Uri? Url = null, int? TimeoutMinutes = null, Uri? ReturnUrl = null, bool SaveSignIn = false)

EmbedCreate

Klyroo.Hotkey · record

EmbedCreate(IReadOnlyList<string>? Origins = null, IReadOnlyList<string>? Sites = null, int? ExpiresIn = null, string Mode = "view")

HotkeyDownload

Klyroo.Hotkey · record

HotkeyDownload(string Id, string Name, string? MediaType, long? SizeBytes, string State, DateTimeOffset? Expires)

HotkeyEvent

Klyroo.Hotkey · record

HotkeyEvent(string Id, string Type, DateTimeOffset Created, HotkeyBrowserRef? Browser, JsonElement Data)

HotkeySignIn

Klyroo.Hotkey · record

HotkeySignIn(string Id, string Site, string? Username, string? SavedBy, DateTimeOffset? LastUsed)

HotkeyUsagePage

Klyroo.Hotkey · record

HotkeyUsagePage(IReadOnlyList<HotkeyUsage> Data, bool HasMore, string? NextCursor, JsonElement Total, DateTimeOffset From, DateTimeOffset To)

HotkeyUsage

Klyroo.Hotkey · record

HotkeyUsage(string? Id, string? ExternalId, HotkeyBrowserRef? Browser, long AwakeMinutes, long AgentCalls, long Asks, long Downloads, long DownloadBytes, long? StorageBytes)

WebhookEndpointSettings

Klyroo.Hotkey · record

WebhookEndpointSettings(Uri? Url = null, IReadOnlyList<string>? Events = null, string? Description = null)