Class SeclaiClientOptions
Configuration options for SeclaiClient.
Inherited Members
Namespace: Seclai
Assembly: Seclai.dll
Syntax
public sealed class SeclaiClientOptions
Properties
AccessToken
Static bearer token (mutually exclusive with ApiKey and AccessTokenProvider).
Declaration
public string? AccessToken { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AccessTokenProvider
Async provider that returns a bearer token per request (mutually exclusive with ApiKey and AccessToken).
Declaration
public Func<CancellationToken, Task<string>>? AccessTokenProvider { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<CancellationToken, Task<string>> |
AccountId
Account ID sent as the X-Account-Id header for multi-org targeting.
Declaration
public string? AccountId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AllowUnknownApiVersion
Permit an ApiVersion this release was not built against.
Declaration
public bool AllowUnknownApiVersion { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Off by default. A newer API version can change response shapes, and this client would decode them incorrectly rather than reject them — a request-side mistake answers 422, but a reshaped response just mis-decodes, silently. Prefer upgrading the SDK.
ApiKey
API key for authentication. Falls back to the SECLAI_API_KEY environment variable.
Declaration
public string? ApiKey { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ApiKeyHeader
Header name used to send the API key. Defaults to x-api-key.
Declaration
public string ApiKeyHeader { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ApiVersion
Dated API version (YYYY-MM-DD) sent as the Seclai-Version header,
opting this client into backward-incompatible API changes released on or
before that date.
Declaration
public string? ApiVersion { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
Left unset the header is omitted and the account's pinned baseline applies, so responses keep their current shapes. Pin the account instead with UpdateApiVersionAsync(string?, CancellationToken), and read what a request resolves to with GetApiVersionAsync(CancellationToken).
From 2026-07-27 the API rejects undeclared query parameters with a
422 rather than ignoring them, and list endpoints return the canonical
{data, pagination} envelope.
AutoRefresh
Whether to auto-refresh expired SSO tokens. Defaults to true.
Declaration
public bool? AutoRefresh { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
BaseUri
API base URL. Falls back to the SECLAI_API_URL environment variable, then DefaultBaseUri.
Declaration
public Uri? BaseUri { get; set; }
Property Value
| Type | Description |
|---|---|
| Uri |
ConfigDir
Config directory override. Falls back to SECLAI_CONFIG_DIR, then ~/.seclai.
Declaration
public string? ConfigDir { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DefaultBaseUri
Default API base URL (https://seclai.com).
Declaration
public static Uri DefaultBaseUri { get; }
Property Value
| Type | Description |
|---|---|
| Uri |
DefaultHeaders
Extra headers sent with every request (e.g. User-Agent, X-Correlation-Id).
Declaration
public Dictionary<string, string>? DefaultHeaders { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, string> |
HttpClient
Provide your own HttpClient instance (e.g. from IHttpClientFactory). When supplied, the client will not be disposed by SeclaiClient.
Declaration
public HttpClient? HttpClient { get; set; }
Property Value
| Type | Description |
|---|---|
| HttpClient |
Profile
SSO profile name from the config file. Falls back to SECLAI_PROFILE, then "default".
Declaration
public string? Profile { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Timeout
HTTP request timeout applied to internally-created HttpClient instances. Defaults to 120 seconds. Ignored when HttpClient is provided externally.
Declaration
public TimeSpan Timeout { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |