Class Seclai

Seclai JavaScript/TypeScript client.

Provides typed methods for every Seclai API endpoint, plus higher-level abstractions for streaming, polling, and pagination.

import { Seclai } from "@seclai/sdk";

const client = new Seclai({ apiKey: "sk-..." });

// List agents
const { data: agents } = await client.listAgents();

// Run an agent
const run = await client.runAgent("agent-id", { input: "Hello!" });

// Stream an agent run
for await (const event of client.runStreamingAgent("agent-id", { input: "Hello!" })) {
console.log(event.event, event.data);
}

Constructors

Methods

acceptAiAssistantPlan acceptAiMemoryBankSuggestion acceptGovernanceAiPlan acceptMemoryBankAiSuggestion acceptSolutionAiPlan addAlertComment addEmailDomain addSolutionConversationTurn aiAssistantKnowledgeBase aiAssistantMemoryBank aiAssistantSolution aiAssistantSource blockEmailSender cancelAgentRun cancelExperiment cancelQueuedEmailRuns cancelSourceEmbeddingMigration cancelSourceExport changeAlertStatus compactMemoryBank createAgent createAlertConfig createEvaluationCriteria createEvaluationResult createExperiment createKnowledgeBase createMemoryBank createSolution createSource createSourceExport declineAiAssistantPlan declineGovernanceAiPlan declineSolutionAiPlan deleteAgent deleteAgentRun deleteAlertConfig deleteCloudDrive deleteContent deleteEvaluationCriteria deleteExperiment deleteKnowledgeBase deleteMemoryBank deleteMemoryBankSource deleteSolution deleteSource deleteSourceExport disableAgent disconnectCloudDrive downloadAgentRunAttachment downloadContentAttachment downloadSourceExport enableAgent estimateSourceExport exportAgent generateAgentSteps generateGovernanceAiPlan generateMemoryBankConfig generateSolutionAiKnowledgeBase generateSolutionAiPlan generateSolutionAiSource generateStepConfig getAgent getAgentAiConversationHistory getAgentAttachmentReferences getAgentCallers getAgentDefinition getAgentInputUploadStatus getAgentRun getAgentsUsingCloudDrive getAgentsUsingMemoryBank getAiAssistantMemoryBankHistory getAlert getAlertConfig getApiVersion getCloudDrive getContentAttachment getContentDetail getDmarcSummary getEvaluationCriteria getEvaluationCriteriaSummary getExperiment getGenerationTiers getInboundEmailStatus getKnowledgeBase getKnowledgeBaseMetadataKeyStats getMe getMemoryBank getMemoryBankAiLastConversation getMemoryBankStats getMetadataKeys getModel getModelRecommendations getNonManualEvaluationSummary getSolution getSource getSourceContentStatus getSourceEmbeddingMigration getSourceExport getUnreadModelAlertCount linkAgentsToSolution linkKnowledgeBasesToSolution linkSourceConnectionsToSolution listAgentEmailOptOuts listAgentEvaluationResults listAgentExamples listAgentRuns listAgents listAlertConfigs listAlerts listBlockedEmailSenders listCloudDriveProviders listCloudDriveRejections listCloudDrives listCompatibleRuns listContentAttachmentEmbeddings listContentAttachments listContentEmbeddings listEmailDomains listEmailSourceRejections listEmbeddingModels listEvaluationCriteria listEvaluationCriteriaPage listEvaluationResults listEvaluationRuns listExperiments listGovernanceAiConversations listInboundEmailRejections listKnowledgeBases listMemoryBanks listMemoryBankTemplates listModelAlerts listModels listOrganizationAlertPreferences listRerankerModels listRunEvaluationResults listSolutionConversations listSolutions listSourceContents listSourceExports listSources markAgentAiSuggestion markAllModelAlertsRead markModelAlertRead markSolutionConversationTurn paginate previewImportAgent removeAgentEmailOptOut removeEmailDomain replaceContentWithInlineText request requestRaw resumeInboundEmail runAgent runAgentAndPoll runStreamingAgent runStreamingAgentAndWait search searchAgentRuns searchDocs sendEmailDomainTestEmail setAcceptedAttachments setAutoBlockMode setEmailTriggerConfig setMetadataKeys setPrimaryEmailDomain setSlackTriggerConfig startSourceEmbeddingMigration submitAiFeedback subscribeToAlert testCompactionPromptStandalone testDraftEvaluation testMemoryBankCompaction unblockEmailSender unlinkAgentsFromSolution unlinkKnowledgeBasesFromSolution unlinkSourceConnectionsFromSolution unsubscribeFromAlert updateAgent updateAgentDefinition updateAlertConfig updateApiVersion updateCloudDrive updateEvaluationCriteria updateKnowledgeBase updateMemoryBank updateOrganizationAlertPreference updateSolution updateSource uploadAgentInput uploadFileToContent uploadFileToSource uploadInlineTextToSource useSharedEmailDomain verifyEmailDomain

Constructors

  • Create a new Seclai client.

    Credentials are resolved via a chain (first match wins):

    1. Explicit apiKey option
    2. Explicit accessToken option (static string or provider function)
    3. SECLAI_API_KEY environment variable
    4. SSO profile from ~/.seclai/config + cached tokens in ~/.seclai/sso/cache/

    Parameters

    Returns Seclai

    SeclaiConfigurationError If no fetch implementation is available.

    SeclaiConfigurationError If both apiKey and accessToken are provided.

Methods

  • Accept/mark an AI memory bank suggestion.

    Parameters

    • conversationId: string

      Conversation identifier.

    • body: {}

      Acceptance payload for the memory bank suggestion.

    Returns Promise<{}>

  • Accept a governance AI plan.

    Parameters

    • conversationId: string

      Conversation identifier.

    Returns Promise<{}>

    Acceptance result.

  • Accept a memory bank AI suggestion.

    Parameters

    • conversationId: string

      Conversation identifier.

    • body: {}

      Accept request payload.

    Returns Promise<{}>

  • Accept a solution AI plan.

    Parameters

    • solutionId: string

      Solution identifier.

    • conversationId: string

      Conversation identifier.

    • body: AiAssistantAcceptRequest

      Accept request.

    Returns Promise<{}>

    Acceptance result with executed actions.

  • Add a comment to an alert.

    Parameters

    • alertId: string

      Alert identifier.

    • body: {}

      Comment payload.

    Returns Promise<{}>

  • Add and provision a new agent-email domain.

    Pass kind: "vanity" with value: "<slug>", or kind: "custom" with value: "agent.mycompany.com" (optionally delegated: true to let Seclai manage a dedicated Route53 zone). Stands up the SES identity + DNS and returns the records the customer must publish. Requires an account owner/admin.

    Parameters

    Returns Promise<{}>

  • Add a conversation turn to a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Conversation turn payload.

    Returns Promise<{}>

    Updated conversation.

  • Generate a knowledge base configuration via AI assistant.

    Parameters

    • body: {}

      Generation request.

    Returns Promise<{}>

  • Generate a memory bank configuration via AI assistant.

    Parameters

    • body: {}

      Generation request.

    Returns Promise<{}>

  • Generate a solution via AI assistant.

    Parameters

    • body: {}

      Generation request.

    Returns Promise<{}>

  • Generate a source configuration via AI assistant.

    Parameters

    • body: {}

      Generation request.

    Returns Promise<{}>

  • Add a sender address or a whole domain to the account blocklist.

    Idempotent. match_type is "address" (default) or "domain". Requires an account owner/admin.

    Parameters

    Returns Promise<{}>

    The blocked-sender entry.

  • Cancel a running agent run.

    Cancellation is DELETE on the run resource — the API exposes no POST .../cancel route, and no operation that deletes a run. Rejected when the run has already reached a terminal state.

    Parameters

    • runId: string

      Run identifier.

    Returns Promise<{}>

    Updated run (with cancelled status).

  • Cancel a running model playground experiment.

    Parameters

    • experimentId: string

      Experiment identifier.

    Returns Promise<{}>

  • Fail all of the account's QUEUED (over-quota parked) inbound-email runs at once.

    A queued run consumed no quota or credits at queue time, so this merely fails them. Requires an account owner/admin.

    Returns Promise<{}>

    The count cancelled.

  • Cancel a source embedding migration.

    Parameters

    • sourceId: string

      Source connection identifier.

    Returns Promise<{}>

    Updated migration status.

  • Cancel a source export.

    Parameters

    • sourceId: string

      Source connection identifier.

    • exportId: string

      Export identifier.

    Returns Promise<{}>

  • Change the status of an alert.

    Parameters

    • alertId: string

      Alert identifier.

    • body: {}

      Status change request.

    Returns Promise<{}>

  • Compact a memory bank (trigger compaction).

    Parameters

    • memoryBankId: string

      Memory bank identifier.

    Returns Promise<void>

  • Create a new knowledge base.

    Parameters

    • body: {}

      Knowledge base configuration.

    Returns Promise<{}>

    The created knowledge base.

  • Create a new memory bank.

    Memory banks give agents persistent memory across conversations. Types: conversation (chat-style history) or general (flat factual entries).

    Parameters

    Returns Promise<{}>

    The created memory bank.

  • Create a new content source.

    Parameters

    • body: {}

      Source configuration (type, name, knowledge base link, etc.).

    Returns Promise<{}>

    The created source.

  • Create a source data export.

    Parameters

    • sourceId: string

      Source connection identifier.

    • body: {}

      Export configuration (format, etc.).

    Returns Promise<{}>

    Export response with job status.

  • Decline an AI assistant suggestion.

    Parameters

    • conversationId: string

      Conversation identifier.

    Returns Promise<void>

  • Decline a governance AI plan.

    Parameters

    • conversationId: string

      Conversation identifier.

    Returns Promise<void>

  • Decline a solution AI plan.

    Parameters

    • solutionId: string

      Solution identifier.

    • conversationId: string

      Conversation identifier.

    Returns Promise<void>

  • Delete an agent.

    Parameters

    • agentId: string

      Agent identifier.

    Returns Promise<void>

  • Cancel an agent run.

    Parameters

    • runId: string

      Run identifier.

    Returns Promise<void>

    This never deleted anything — the endpoint it calls is documented as "Cancel an agent run", and the API has no delete-a-run operation. It also discards the returned run state. Use cancelAgentRun instead.

  • Delete an alert configuration.

    Parameters

    • configId: string

      Alert config identifier.

    Returns Promise<void>

  • Delete a cloud-drive connection.

    Parameters

    • connectionId: string

      Cloud-drive connection identifier.

    Returns Promise<void>

  • Delete a specific content version.

    Parameters

    • contentVersionId: string

      Content version identifier.

    Returns Promise<void>

  • Delete an evaluation criteria and all associated results.

    Parameters

    • criteriaId: string

      Criteria identifier.

    Returns Promise<void>

  • Soft-delete a model playground experiment.

    Removes the experiment from list/detail views while preserving audit history. Returns HTTP 204 with no body.

    Parameters

    • experimentId: string

      Experiment identifier.

    Returns Promise<void>

  • Delete a knowledge base.

    Parameters

    • knowledgeBaseId: string

      Knowledge base identifier.

    Returns Promise<void>

  • Delete a memory bank.

    Parameters

    • memoryBankId: string

      Memory bank identifier.

    Returns Promise<void>

  • Delete a memory bank source.

    Parameters

    • memoryBankId: string

      Memory bank identifier.

    Returns Promise<void>

  • Delete a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    Returns Promise<void>

  • Delete a source.

    Parameters

    • sourceId: string

      Source connection identifier.

    Returns Promise<void>

  • Delete a source export.

    Parameters

    • sourceId: string

      Source connection identifier.

    • exportId: string

      Export identifier.

    Returns Promise<void>

  • Pause (disable) an agent so it stops firing from every trigger path.

    API runs return HTTP 409, inbound email is turned away, and scheduled / content triggers are skipped.

    Fails with HTTP 409 when other live agents still call this one via a call_agent step — use getAgentCallers to list them, and disable those first.

    Parameters

    • agentId: string

      Agent identifier.

    Returns Promise<{}>

    The updated agent summary.

  • Disconnect a cloud-drive connection, keeping the connection itself.

    Parameters

    • connectionId: string

      Cloud-drive connection identifier.

    Returns Promise<{}>

    The connection in its disconnected state.

  • Download a file attachment emitted by a step in an agent run.

    Returns the raw Response so you can stream or save the binary data.

    Parameters

    • runId: string

      Run identifier.

    • attachmentId: string

      URL-safe-base64-encoded storage_key of the attachment (as surfaced in run output manifests and webhook/email payloads).

    • opts: { downloadName?: string; signal?: AbortSignal } = {}

      Optional downloadName filename hint for the download disposition, and signal, which cancels the request; with a standard fetch this includes reading the body, so AbortSignal.timeout(ms) bounds the whole transfer.

    Returns Promise<Response>

    Raw response with the attachment bytes.

  • Download a content attachment's bytes.

    Returns the raw Response so you can stream or save the binary data. The API answers 403 when the file is withheld — blocked or redacted by a governance policy, or still being indexed after arriving from outside; the attachment's file_withheld field says which before you ask.

    Parameters

    • contentVersionId: string

      Content version identifier.

    • attachmentId: string

      Attachment identifier.

    • opts: { signal?: AbortSignal } = {}

      Optional signal, which cancels the request; with a standard fetch this includes reading the body, so AbortSignal.timeout(ms) bounds the whole transfer.

    Returns Promise<Response>

    Raw response with the attachment bytes.

    403 when the file is withheld, and 402 when the account has no credits left (error.code insufficient_credits).

  • Download a source export file.

    Returns the raw Response so you can stream or save the binary data.

    Parameters

    • sourceId: string

      Source connection identifier.

    • exportId: string

      Export identifier.

    • opts: { signal?: AbortSignal } = {}

      Optional signal, which cancels the request; with a standard fetch this includes reading the body, so AbortSignal.timeout(ms) bounds the whole transfer.

    Returns Promise<Response>

    Raw response with the export file.

  • Resume (enable) a paused agent.

    Clears the disable state whether the agent was paused manually or auto-paused by the inbound-email overload safeguard.

    Parameters

    • agentId: string

      Agent identifier.

    Returns Promise<{}>

    The updated agent summary.

  • Estimate a source export.

    Parameters

    • sourceId: string

      Source connection identifier.

    • body: {}

      Estimate request.

    Returns Promise<{}>

    Export estimate.

  • Export an agent definition as a portable JSON snapshot.

    Parameters

    • agentId: string

      Agent identifier.

    • download: boolean = true

      When true (default), the server sets Content-Disposition: attachment.

    Returns Promise<{}>

    The exported agent snapshot.

  • Generate agent workflow steps from natural language using AI.

    Parameters

    Returns Promise<{}>

    AI-generated step configuration.

  • Generate governance policy suggestions using AI.

    Parameters

    • body: {}

      AI governance request.

    Returns Promise<{}>

    AI-generated governance suggestions.

  • Generate memory bank configuration using AI.

    Parameters

    • body: {}

      AI assistant request with user instructions.

    Returns Promise<{}>

    AI-generated memory bank config.

  • Generate a knowledge base configuration via solution AI.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Generation request.

    Returns Promise<{}>

    AI-generated knowledge base config.

  • Generate a solution AI plan.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Generation request.

    Returns Promise<{}>

    AI-generated plan.

  • Generate a source configuration via solution AI.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Generation request.

    Returns Promise<{}>

    AI-generated source config.

  • Generate a single step configuration using AI.

    Parameters

    • agentId: string

      Agent identifier.

    • body: {}

      Step config generation request.

    Returns Promise<{}>

    AI-generated step config.

  • Get agent details including its definition.

    Parameters

    • agentId: string

      Agent identifier.

    Returns Promise<{}>

    Full agent metadata.

  • Get AI conversation history for an agent.

    Parameters

    • agentId: string

      Agent identifier.

    • opts: { limit?: number; offset?: number; stepId?: string; stepType?: string } = {}

    Returns Promise<{}>

    Conversation history.

  • Get the static attachment-reference contract for an agent — what files (if any) its definition expects on a run.

    Call this before staging uploads to learn whether the agent accepts files at all (requires_uploads) and which specific filenames, indexes, or glob patterns its templates reference. A run-time upload batch that doesn't satisfy every declared selector is rejected with HTTP 400.

    Parameters

    • agentId: string

      Agent identifier.

    Returns Promise<{}>

    The agent's attachment-reference contract.

  • List the live agents that call this agent via a call_agent step.

    These must be disabled before this agent can be paused.

    Parameters

    • agentId: string

      Agent identifier.

    Returns Promise<{}[]>

    The calling agents.

  • Get an agent's full definition (steps, model config, etc.).

    Parameters

    • agentId: string

      Agent identifier.

    Returns Promise<{}>

    The agent definition.

  • Get the status of an agent input upload.

    Parameters

    • agentId: string

      Agent identifier.

    • uploadId: string

      Upload identifier.

    Returns Promise<{}>

    Upload status and metadata.

  • Get details of a specific agent run.

    Parameters

    • runId: string

      Run identifier.

    • Optionalopts: { includeStepOutputs?: boolean }

      Optional flags.

    Returns Promise<{}>

    Agent run details.

  • List the agents that use a cloud-drive connection.

    Parameters

    • connectionId: string

      Cloud-drive connection identifier.

    Returns Promise<{}[]>

    The agents, read from either wire shape.

  • Get agents that are using a specific memory bank.

    Parameters

    • memoryBankId: string

      Memory bank identifier.

    Returns Promise<unknown>

  • Get AI assistant memory bank conversation history.

    Parameters

    • opts: OffsetPageOptions = {}

      Turns to return (server default 5) and most-recent turns to skip (default 0).

    Returns Promise<{}>

  • Get alert details by ID.

    Parameters

    • alertId: string

      Alert identifier.

    Returns Promise<{}>

    Alert details.

  • Get an alert configuration by ID.

    Parameters

    • configId: string

      Alert config identifier.

    Returns Promise<{}>

    Alert config details.

  • Read the API version this request resolved to, and the versions available.

    Resolution order is the Seclai-Version header, then the account pin, then the default — so effective_version reflects the client's apiVersion option when that is set.

    Returns Promise<{}>

    The pinned, effective, default and latest versions.

  • Get a cloud-drive connection.

    Parameters

    • connectionId: string

      Cloud-drive connection identifier.

    Returns Promise<{}>

  • Get one file attached to a content item: its indexing status and reason, its metadata, and the text it is indexed by.

    Parameters

    • contentVersionId: string

      Content version identifier.

    • attachmentId: string

      The id of an entry from listContentAttachments.

    • opts: { end?: number; start?: number } = {}

      start and end character offsets for paging through long text (server defaults 0 and 5000). Both are sent as given, so end: 0 asks for the metadata without any text. A file that was not indexed has no text.

    Returns Promise<{}>

    The attachment with the requested range of its text.

    402 when the account has no credits left (error.code insufficient_credits).

  • Get content detail for a specific content version.

    Parameters

    • contentVersionId: string

      Content version identifier.

    • opts: { end?: number; start?: number } = {}

      Range options for slicing large content.

    Returns Promise<{}>

    Content details for the requested range.

  • Get the DMARC aggregate-report summary for a domain.

    Pass rate, disposition breakdown (none/quarantine/reject), and top failing source IPs from the DMARC rua reports over the last days (clamped by the service).

    Populated for domains whose DNS zone Seclai controls (vanity + delegated custom); a self-managed custom domain keeps its own DMARC reporting and returns an all-zero summary.

    Parameters

    • domainId: string

      Domain identifier.

    • opts: { days?: number; topSources?: number } = {}

      Reporting window options.

      • Optionaldays?: number

        Window length in days (default 30).

      • OptionaltopSources?: number

        Number of top failing sources to return (default 10).

    Returns Promise<{}>

  • Get a single evaluation criteria by ID.

    Parameters

    • criteriaId: string

      Criteria identifier.

    Returns Promise<{}>

    Evaluation criteria details.

  • Get the evaluation summary for a specific criteria.

    Parameters

    • criteriaId: string

      Criteria identifier.

    Returns Promise<{}>

    Evaluation result summary.

  • Get a model playground experiment by ID.

    Parameters

    • experimentId: string

      Experiment identifier.

    Returns Promise<{}>

  • List the media-generation quality tiers and the model + cost each resolves to.

    On a prompt_call's media_generation tool — and the dedicated generate_* steps via tier routing — the author/LLM picks a tier (fast/balanced/thorough), never a model. This maps each (modality, tier) to its concrete generator, raw credits_per_unit, unit_label, and a human-readable scaled price_label.

    Global routing/pricing (the same for every account); read-only.

    Returns Promise<Record<string, unknown>>

  • Get the account's inbound-email overload status — whether the circuit breaker has paused new inbound email, and the size of the QUEUED (over-quota parked) run backlog.

    Returns Promise<{}>

  • Get a knowledge base by ID.

    Parameters

    • knowledgeBaseId: string

      Knowledge base identifier.

    Returns Promise<{}>

    Knowledge base details.

  • Get the item-metadata keys seen in a knowledge base's content.

    Reports, for all time and the last 30 and 7 days, each key's item count, number of distinct values and five most frequent values.

    Parameters

    • knowledgeBaseId: string

      Knowledge base identifier.

    Returns Promise<{}>

    The key statistics per window.

  • Get the authenticated user's identity.

    Returns the personal account_id plus every organization the user belongs to — each with its own id, display name, and account_id. Use it to discover the account IDs that can be passed as the client's accountId option (sent as the X-Account-Id header) to target an org context.

    Returns Promise<{}>

    The current user's account ID and organization memberships.

  • Get a memory bank by ID.

    Parameters

    • memoryBankId: string

      Memory bank identifier.

    Returns Promise<{}>

    Memory bank details.

  • Get the last AI conversation for memory banks.

    Parameters

    • opts: OffsetPageOptions = {}

      Turns to return (server default 5) and most-recent turns to skip (default 0).

    Returns Promise<{}>

  • Get stats for a memory bank.

    Parameters

    • memoryBankId: string

      Memory bank identifier.

    • opts: DateRangeOptions = {}

      Date range. Only startDate and endDate together replace days; either one alone is ignored and the last days days apply (server default 30).

    Returns Promise<unknown>

  • Get the run metadata keys a trigger declares.

    Steps may reference a declared key as {{metadata.<key>}}. The response also lists the system and source keys the trigger's type can declare.

    Parameters

    • agentId: string

      Agent identifier.

    • triggerId: string

      Trigger identifier, as getAgent() returns it.

    Returns Promise<{}>

    The trigger's declared and declarable metadata keys.

  • Get full details for a specific model.

    Parameters

    • modelId: string

      Model identifier.

    Returns Promise<{}>

  • Get a summary of non-manual evaluations, for one agent or the whole account.

    Parameters

    • OptionalagentId: string

      Agent identifier. Omit (pass undefined) for the account-wide summary.

    • opts: DateRangeOptions = {}

      Date range. startDate and endDate together set the range; startDate alone runs from it through today; otherwise the last days days apply (server default 30), and an endDate without startDate is ignored.

    Returns Promise<{}>

  • Get a solution by ID.

    Parameters

    • solutionId: string

      Solution identifier.

    Returns Promise<{}>

    Solution details.

  • Get a source by ID.

    Parameters

    • sourceId: string

      Source connection identifier.

    Returns Promise<{}>

    Source details.

  • Get one content item's indexing status.

    Parameters

    • sourceId: string

      Source connection identifier.

    • contentVersionId: string

      The content_version_id an upload returned.

    Returns Promise<{}>

  • Get the status of a source embedding migration.

    Parameters

    • sourceId: string

      Source connection identifier.

    Returns Promise<{}>

    Migration status.

  • Get a specific source export.

    Parameters

    • sourceId: string

      Source connection identifier.

    • exportId: string

      Export identifier.

    Returns Promise<{}>

    Export details.

  • Get unread model alert count.

    Returns Promise<{}>

  • Link agents to a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Resource IDs to link.

    Returns Promise<{}>

    Updated solution.

  • Link knowledge bases to a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Resource IDs to link.

    Returns Promise<{}>

    Updated solution.

  • Link source connections to a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Resource IDs to link.

    Returns Promise<{}>

    Updated solution.

  • List recipients who have opted out of this account's agent emails.

    Parameters

    • opts: { agentId?: string; limit?: number; offset?: number } = {}

      Optional agent filter and limit/offset pagination.

      • OptionalagentId?: string

        Filter to one agent (account-wide opt-outs still apply).

      • Optionallimit?: number

        Page size (1-200, default 50).

      • Optionaloffset?: number

        Rows to skip (default 0).

    Returns Promise<AgentEmailOptOutListResponse>

    The page of opt-outs plus the total count.

  • List runs for a specific agent.

    Parameters

    • agentId: string

      Agent identifier.

    • opts: ListOptions & { status?: string } = {}

      Pagination and filter options.

    Returns Promise<{}>

    Paginated list of runs.

  • List agents.

    Parameters

    Returns Promise<{}>

    Paginated list of agents.

  • List the cloud-drive providers this deployment has configured.

    Returns Promise<{}[]>

    The providers, read from either wire shape.

  • List the files a cloud-drive connection skipped, newest first.

    A skipped file fires no trigger, so this is where to look when an agent did not run for a file.

    Parameters

    • connectionId: string

      Cloud-drive connection identifier.

    • opts: { limit?: number } = {}
      • Optionallimit?: number

        Maximum number of rejections (1-200, default 50).

    Returns Promise<{}[]>

    The rejections with their reasons, read from either wire shape.

  • List the account's cloud-drive connections.

    Returns Promise<{}[]>

    The connections, read from either wire shape.

  • List the embeddings (chunk vectors) a content attachment is indexed by. The list is empty for a file that has no completed index.

    Parameters

    • contentVersionId: string

      Content version identifier.

    • attachmentId: string

      Attachment identifier.

    • opts: ListOptions = {}

      Pagination options (limit 1-100).

    Returns Promise<{}>

    Paginated list of embeddings.

    402 when the account has no credits left (error.code insufficient_credits).

  • List the files attached to a content item.

    Files arrive from an agent's write_content_attachment step, with an email message, from an RSS feed's feed_attachments, from a web page's media, or as the images inside a document. Each entry says whether it is indexed for search and, when indexing failed, why.

    Parameters

    • contentVersionId: string

      Content version identifier.

    • opts: ListOptions = {}

      Pagination options.

    Returns Promise<{}>

    The attachments under data with pagination.

  • List embeddings for a content version.

    Parameters

    • contentVersionId: string

      Content version identifier.

    • opts: ListOptions = {}

      Pagination options.

    Returns Promise<{}>

    Paginated list of embeddings.

  • List the account's vanity (<slug>.seclai.com) and custom (agent.mycompany.com) agent-email domains.

    Includes each domain's verification status and the DNS records the customer must publish, plus the plan capabilities (can_add_vanity / can_add_custom) and whether one of each kind already exists (has_vanity / has_custom — the per-kind limit is 1).

    Requires a user-bound credential; an account-only API key is refused with 403.

    Returns Promise<EmailDomainsListResponse>

  • List mail an email content source refused, newest first.

    Each entry says who sent the message and why it was refused, never its subject or body. To accept a refused sender, add its from_address or that address's domain to the source's email_allowed_senders — which only helps when authenticated is true. Requires an account owner or administrator; the API answers 404 for a source that is not an email source.

    Parameters

    • sourceId: string

      Source connection identifier.

    • opts: ListOptions = {}

      Pagination options (limit 1-100).

    Returns Promise<{}>

    The rejections under data with pagination.

  • List the embedding models a source can index with, and their pricing.

    The endpoint lists the embedders under models by default and under data once the caller opts in with apiVersion 2026-07-27 or later; models is populated on either, with the defaults and pricing beside it.

    Parameters

    • opts: { supportsInputMedia?: string } = {}
      • OptionalsupportsInputMedia?: string

        Keep only embedders that can index this input modality — a coarse kind (text, image, video, audio) or a full MIME.

    Returns Promise<EmbeddingModelListResponse>

  • List evaluation criteria for an agent.

    Parameters

    • agentId: string

      Agent identifier.

    • opts: ListOptions = {}

      Pagination options.

    Returns Promise<{}[]>

  • List evaluation criteria for an agent, with pagination metadata.

    The endpoint answers with a bare array by default and with {data, pagination} once apiVersion is 2026-07-27 or later; pagination is absent on the bare array.

    Parameters

    • agentId: string

      Agent identifier.

    • opts: ListOptions = {}

      Pagination options.

    Returns Promise<EvaluationCriteriaListResponse>

    The criteria under data, plus the page metadata when present.

  • List governance AI conversations.

    Parameters

    • opts: { limit?: number } = {}

      limit: how many conversations (the server defaults to 20).

    Returns Promise<{}[]>

  • List recent inbound emails that were quietly discarded before running an agent (unauthorized sender, unknown alias, spam/virus, flood-shed).

    Parameters

    • opts: { agentId?: string; limit?: number } = {}

      Optional agent filter and result limit.

      • OptionalagentId?: string

        Filter to a single agent's rejections.

      • Optionallimit?: number

        Maximum results (1-200, default 50).

    Returns Promise<{}[]>

  • List available memory bank templates.

    Returns Promise<unknown>

  • List all enabled LLM models grouped by provider.

    Parameters

    • opts: {
          provider?: string;
          supportsInputMedia?: string;
          supportsOutputMedia?: string;
          supportsThinking?: boolean;
          supportsToolUse?: boolean;
      } = {}

      Optional filters.

    Returns Promise<{}[]>

  • List conversations for a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    Returns Promise<{}[]>

    List of conversations.

  • List a source's content items and their indexing status.

    Parameters

    • sourceId: string

      Source connection identifier.

    • opts: ListSourceContentsOptions = {}

      Pagination, sorting, and filters. Pass the content_version_id values the upload methods return as contentVersionIds to poll a batch of uploads in one request — about 100 at a time, since the ids travel in the query string and a URL over 8,192 bytes is rejected with a 414. An empty contentVersionIds matches nothing, so it returns an empty page without sending a request.

    Returns Promise<{}>

    The items under data with pagination, on every API version.

  • List exports for a source.

    Parameters

    • sourceId: string

      Source connection identifier.

    • opts: ListOptions = {}

      Pagination options.

    Returns Promise<{}>

    Paginated list of exports.

  • List sources.

    Parameters

    • opts: SortableListOptions & { accountId?: string } = {}

      Pagination, sorting, and filter options.

    Returns Promise<{}>

    Paginated list of sources.

  • Mark an AI suggestion as accepted or rejected.

    Parameters

    • agentId: string

      Agent identifier.

    • conversationId: string

      Conversation turn identifier.

    • body: {}

      Mark request payload.

    Returns Promise<void>

  • Mark all model alerts as read.

    Returns Promise<void>

  • Mark a specific model alert as read.

    Parameters

    • alertId: string

      Model alert identifier.

    Returns Promise<void>

  • Mark a conversation turn (e.g. accepted/rejected).

    Parameters

    • solutionId: string

      Solution identifier.

    • conversationId: string

      Conversation identifier.

    • body: {}

      Mark payload.

    Returns Promise<void>

  • Auto-paginate through a list endpoint.

    Yields individual items from each page, fetching the next page until the response reports there is none. A fetcher that answers with a bare array has no further pages, so its items are yielded once.

    Type Parameters

    • T

    Parameters

    • fetchPage: (opts: { limit: number; page: number }) => Promise<PaginatedPage<T>>

      A function that fetches a single page given { page, limit }.

    • Optionalopts: { limit?: number }

      Page size (default: 50).

    Returns AsyncGenerator<T, void, undefined>

    SeclaiError When a page carries its items under neither data nor items.

    for await (const agent of client.paginate(
    (opts) => client.listAgents(opts),
    )) {
    console.log(agent.name);
    }
  • Validate an agent_definition payload (same shape as exportAgent) without creating or modifying any agent.

    Use this before createAgent or updateAgent with an agent_definition to surface unresolved_refs — workflow references to knowledge bases, memory banks, source connections, or sub-agents that don't exist in the target account. Pass the returned ids back in entity_remap on the commit call to substitute them.

    Parameters

    • body: {}

      The preview payload ({ agent_definition: ... }).

    Returns Promise<{}>

    Summary of the validated payload (step counts, schedules, alert configs, evaluation criteria, governance policies, and any unresolved_refs).

    On HTTP 422 — the body is an AgentDefinitionImportErrorResponse with 1-indexed line/column-anchored errors against a canonical source echo.

  • Revoke an opt-out, opting the recipient back in to agent emails.

    Parameters

    • optoutId: string

      Opt-out identifier.

    Returns Promise<void>

  • Remove a domain and tear down its SES identity + DNS / receipt-rule recipient.

    Returns a cleanup_note when the removed domain was Seclai-managed (delegated), reminding you to delete the registrar NS delegation record (dangling-delegation / subdomain-takeover guard). Requires an account owner/admin.

    Parameters

    • domainId: string

      Domain identifier.

    Returns Promise<{}>

  • Replace content with inline text.

    Parameters

    Returns Promise<{}>

  • Make a raw HTTP request to the Seclai API.

    This is a low-level escape hatch. For most operations, prefer the typed convenience methods.

    Parameters

    • method: string

      HTTP method (e.g. "GET", "POST").

    • path: string

      Request path relative to baseUrl (e.g. "/sources/").

    • Optionalopts: {
          headers?: Record<string, string>;
          json?: unknown;
          query?: Record<string, unknown>;
          signal?: AbortSignal;
      }

      Query params, JSON body, per-request headers, and optional AbortSignal.

    Returns Promise<unknown>

    Parsed JSON for JSON responses, raw text for non-JSON responses, or null for empty bodies.

    SeclaiAPIValidationError For validation errors (typically HTTP 422).

    SeclaiAPIStatusError For other non-success HTTP status codes.

  • Make a raw HTTP request and return the raw Response object (for binary downloads, etc.).

    Parameters

    • method: string

      HTTP method.

    • path: string

      Request path relative to baseUrl.

    • Optionalopts: {
          headers?: Record<string, string>;
          json?: unknown;
          query?: Record<string, unknown>;
          signal?: AbortSignal;
      }

      Query params, JSON body, per-request headers, and optional AbortSignal.

    Returns Promise<Response>

    The raw Response object.

    On HTTP 422 responses.

    On other non-2xx responses.

  • Manually lift the account-wide inbound-email pause.

    If the queued backlog is still above the ceiling the breaker re-arms on the next evaluation — this is a one-shot override, not a permanent disable. Requires an account owner/admin.

    Returns Promise<{}>

  • Start an agent run.

    Parameters

    • agentId: string

      Agent identifier.

    • body: AgentRunRequest

      Run request payload (input, metadata, priority, etc.).

    Returns Promise<{}>

    The created agent run.

  • Run an agent and poll until it reaches a terminal status.

    This is useful in environments where SSE streaming is unavailable.

    A run's answer can be ready before its last step finishes: once result_reported_at is set, output holds the answer. Pass returnOnResult: true to return as soon as a run has it set, the run runAgent() returns included. With includeStepOutputs, when that run would end the poll and signal is not aborted, it is fetched again at once for its step outputs. Such a run may still be in progress: its status is not terminal and the run can still fail, so check result_reported_at, not status.

    When timeoutMs elapses first, this throws SeclaiStreamingError with the latest run it has (the runAgent() response if no poll ran) in run. If that run has result_reported_at set, its output is the answer.

    signal is checked at the top of each poll, after the check for a run that ends the poll. A run that has ended the poll by then, whether the start run or a polled one, is returned even after an abort; the start run then comes back without step outputs, even when includeStepOutputs is set. Otherwise an abort throws SeclaiError("Polling aborted."), which is not an AbortError and does not carry signal.reason.

    Parameters

    • agentId: string

      Agent identifier.

    • body: AgentRunRequest

      Run request payload.

    • Optionalopts: {
          includeStepOutputs?: boolean;
          pollIntervalMs?: number;
          returnOnResult?: boolean;
          signal?: AbortSignal;
          timeoutMs?: number;
      }

      Polling configuration and abort signal.

      • OptionalincludeStepOutputs?: boolean

        Include per-step outputs in the final result.

      • OptionalpollIntervalMs?: number

        Polling interval in ms (default: 2000).

      • OptionalreturnOnResult?: boolean

        Return as soon as a run, the runAgent() response included, has result_reported_at set (its answer is in output), without waiting for later steps to finish (default: false).

      • Optionalsignal?: AbortSignal
      • OptionaltimeoutMs?: number

        Maximum time to wait in ms (default: 300000 = 5 min).

    Returns Promise<{}>

    The terminal agent run, or, with returnOnResult, the first run with result_reported_at set.

    SeclaiStreamingError If timeoutMs elapses before the run finished. Its run holds the latest run it has (the runAgent() response if no poll ran).

    SeclaiError "Polling aborted." If signal is aborted and, at the next poll's check, the run has not ended the poll. It is not an AbortError and does not carry signal.reason.

  • Run an agent in streaming mode and yield each SSE event as it arrives.

    This is an AsyncGenerator suitable for real-time UIs that want to render step progress as it happens.

    Parameters

    • agentId: string

      Agent identifier.

    • body: AgentRunStreamRequest

      Streaming run request payload.

    • Optionalopts: { signal?: AbortSignal; timeoutMs?: number }

      Timeout and abort signal options.

    Returns AsyncGenerator<AgentRunEvent, void, undefined>

    AgentRunEvent for each SSE message.

    for await (const event of client.runStreamingAgent("agent-id", { input: "Hello!" })) {
    // `result` carries the answer in `output`, possibly before later steps finish.
    if (event.event === "result") {
    console.log("Answer:", (event.data as AgentRunResponse).output);
    }
    if (event.event === "done") {
    console.log("Final:", event.data);
    }
    }
  • Run an agent in streaming mode (SSE) and wait for the final result.

    Consumes the entire SSE stream and returns only the terminal done payload. For real-time event access, use runStreamingAgent instead. The body takes no include_reasoning, and one passed anyway is not sent: this method returns no stream_reasoning events.

    A result event carries the run's answer in output once result_reported_at is set, and can arrive while later steps still run. Pass returnOnResult: true to return that result snapshot as soon as it arrives, without waiting for done. Such a run may still be in progress: its status is not terminal and the run can still fail, so check result_reported_at, not status.

    If timeoutMs elapses, this throws SeclaiStreamingError with the latest snapshot in run: the result snapshot if one arrived, else the init snapshot. An abort from signal rethrows the abort error.

    By default, a stream that ends before done returns the latest snapshot when its status is not pending, so the run returned may not have finished: check status and result_reported_at. A stream that breaks throws the fetch error. Pass throwOnIncomplete: true to throw SeclaiStreamingError with the snapshot in run in both cases instead; it is recommended, and becomes the default in the next major version.

    Parameters

    • agentId: string

      Agent identifier.

    • body: Omit<AgentRunStreamRequest, "include_reasoning">

      Streaming run request payload, without include_reasoning.

    • Optionalopts: {
          returnOnResult?: boolean;
          signal?: AbortSignal;
          throwOnIncomplete?: boolean;
          timeoutMs?: number;
      }

      Timeout, abort signal and returnOnResult options.

      • OptionalreturnOnResult?: boolean

        Return the result snapshot as soon as a result event arrives (its answer is in output), without waiting for done (default: false).

      • Optionalsignal?: AbortSignal
      • OptionalthrowOnIncomplete?: boolean

        Throw SeclaiStreamingError, with the latest snapshot in run, whenever the stream ends or breaks before done, or the server answers with plain JSON for a run that has not finished, instead of returning an unfinished run or throwing the fetch error (default: false). This becomes the default in the next major version.

      • OptionaltimeoutMs?: number

    Returns Promise<{}>

    The run from the done event; with returnOnResult, the result snapshot; without throwOnIncomplete, possibly an unfinished snapshot (see above).

    SeclaiStreamingError If timeoutMs elapses, or, with throwOnIncomplete, the stream ends or breaks, before the run finished. Its run holds the latest snapshot.

    try {
    const run = await client.runStreamingAgentAndWait("agent-id", { input: "Hello" }, { throwOnIncomplete: true });
    console.log(run.output);
    } catch (err) {
    if (err instanceof SeclaiStreamingError && err.run?.result_reported_at) {
    console.log("Answer (run not finished):", err.run.output);
    } else throw err;
    }
  • Search across all resource types in your account.

    Accepts a free-text keyword query or a UUID. Results are ranked: name-prefix > name-substring > description-substring.

    Parameters

    • opts: { entityType?: string; limit?: number; query: string }

      Search options.

      • OptionalentityType?: string

        Optional entity type filter (e.g. "agent", "knowledge_base").

      • Optionallimit?: number

        Maximum results (1-50, default 10).

      • query: string

        Search query string (required, 1-200 chars).

    Returns Promise<{}>

    Search results.

  • Search the Seclai documentation by content.

    mode: "keyword" matches page titles and summaries (fast, no AI cost); mode: "semantic" matches page body content by meaning (uses an embedding).

    Each result carries a doc_slug and an optional section anchor for building a https://seclai.com/docs/<doc_slug>[#<anchor>] link, a score (not comparable across modes), and — in semantic mode — a highlight (best matching verbatim sentence; null for keyword).

    Documentation is global, so results are not account-scoped.

    Parameters

    • opts: { limit?: number; mode?: "keyword" | "semantic"; query: string }

      Search options.

      • Optionallimit?: number

        Maximum results (1-20, default 8).

      • Optionalmode?: "keyword" | "semantic"

        Search strategy (default "keyword").

      • query: string

        Search query string (required, 1-200 chars).

    Returns Promise<Record<string, unknown>>

  • Send a test message FROM a verified domain (noreply@<domain>) TO the account owner's email.

    Confirms end-to-end that the domain actually sends (SES verified, DKIM/SPF aligned). Never sends to any other address, so it can't be used as an open relay. Requires an account owner/admin.

    Parameters

    • domainId: string

      Domain identifier.

    Returns Promise<{}>

  • Replace the input attachments a trigger accepts.

    A run's files are each assigned to one declared attachment before any step runs, and steps reference one as {{agent.attachments.<name>}}. The API answers 400 when the agent references an attachment the new declaration leaves out.

    Parameters

    • agentId: string

      Agent identifier.

    • triggerId: string

      Trigger identifier, as getAgent() returns it.

    • body: SetAcceptedAttachmentsInput

      The full list of accepted attachments; a slot's min defaults to 0.

    Returns Promise<{}>

    The trigger's accepted attachments.

  • Set whether a governance BLOCK on an authenticated inbound sender auto-adds them to the blocklist.

    mode is "disabled", "input", or "input_and_output". Requires an account owner/admin.

    Parameters

    • body: {}

      The mode to set.

    Returns Promise<BlockedEmailSenderListResponse>

    The updated blocked-sender list.

  • Configure an agent's EMAIL_RECEIVED trigger and return its computed email address(es).

    Sets the custom alias, the sender allowlist, and the inbound-handling flags (ignore_auto_generated, require_sender_auth, queue_on_quota). Omitted fields are left unchanged; passing null (or "" for alias) clears them.

    Parameters

    • agentId: string

      Agent identifier.

    • triggerId: string

      Trigger identifier.

    • body: {}

      The fields to set.

    Returns Promise<{}>

    The trigger's resolved addresses and config.

  • Replace the run metadata keys a trigger declares.

    The body is the whole declaration and replaces the current one. The API answers 400 when the agent references a key that no trigger of its branch declares.

    Parameters

    • agentId: string

      Agent identifier.

    • triggerId: string

      Trigger identifier, as getAgent() returns it.

    • body: SetMetadataKeysRequest

      The full declaration; each key's required defaults to false.

    Returns Promise<{}>

    The trigger's metadata keys, with warnings naming agents whose call_agent mapping no longer fits.

  • Promote a verified domain to the account's primary domain.

    Agent email then sends FROM and receives ON this domain (<agentID>@<domain>, <alias>@<domain>) instead of the shared agent.seclai.com. The domain must be verified. Requires an account owner/admin.

    Parameters

    • domainId: string

      Domain identifier.

    Returns Promise<{}>

  • Configure an agent's SLACK_COMMAND trigger, which people run from Slack with /seclai or the message shortcut.

    Sets the Slack connection, alias (the name people type after /seclai), form, channels, reply visibility and conversation settings. Omitted fields are left unchanged. input is deprecated and ignored by the API.

    Parameters

    Returns Promise<{}>

    The trigger's full Slack config, including any missing_scopes.

  • Start a source embedding migration.

    Parameters

    • sourceId: string

      Source connection identifier.

    • body: {}

      Migration configuration (target embedding model, etc.).

    Returns Promise<{}>

    Migration status.

  • Submit feedback on an AI assistant interaction.

    Parameters

    • body: {}

      Feedback payload (thumbs up/down, optional comment).

    Returns Promise<{}>

    Feedback response.

  • Subscribe to an alert.

    Parameters

    • alertId: string

      Alert identifier.

    Returns Promise<{}>

  • Test compaction for a specific memory bank.

    Parameters

    Returns Promise<{}>

  • Remove a blocked sender by id. Requires an account owner/admin.

    Parameters

    • blockedId: string

      Blocked-sender identifier.

    Returns Promise<void>

  • Unlink agents from a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Resource IDs to unlink.

    Returns Promise<{}>

    Updated solution.

  • Unlink knowledge bases from a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Resource IDs to unlink.

    Returns Promise<{}>

    Updated solution.

  • Unlink source connections from a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Resource IDs to unlink.

    Returns Promise<{}>

    Updated solution.

  • Unsubscribe from an alert.

    Parameters

    • alertId: string

      Alert identifier.

    Returns Promise<{}>

  • Update an alert configuration.

    Parameters

    • configId: string

      Alert config identifier.

    • body: {}

      Fields to update.

    Returns Promise<{}>

    Updated alert config.

  • Pin the account to a dated API version, or clear the pin.

    Owner/admin only. The pin applies to later header-less requests; a Seclai-Version header still overrides it, so effective_version in the response describes this request rather than the pin just written.

    Parameters

    • version: null | string

      A YYYY-MM-DD date to pin to, or null to clear the pin.

    Returns Promise<{}>

    The updated version state.

  • Update a cloud-drive connection.

    Parameters

    • connectionId: string

      Cloud-drive connection identifier.

    • body: {}

      Fields to change — name and/or folder_path.

    Returns Promise<{}>

    The updated connection.

  • Update an evaluation criteria.

    Parameters

    • criteriaId: string

      Criteria identifier.

    • body: {}

      Fields to update.

    Returns Promise<{}>

    Updated evaluation criteria.

  • Update a knowledge base.

    Parameters

    • knowledgeBaseId: string

      Knowledge base identifier.

    • body: {}

      Fields to update.

    Returns Promise<{}>

    Updated knowledge base.

  • Update a memory bank.

    Parameters

    • memoryBankId: string

      Memory bank identifier.

    • body: {}

      Fields to update.

    Returns Promise<{}>

    Updated memory bank.

  • Update an organization alert preference.

    Parameters

    • organizationId: string

      Organization identifier.

    • alertType: string

      Alert type.

    • body: {}

      Preference update.

    Returns Promise<{}>

  • Update a solution.

    Parameters

    • solutionId: string

      Solution identifier.

    • body: {}

      Fields to update.

    Returns Promise<{}>

    Updated solution.

  • Update a source.

    Parameters

    • sourceId: string

      Source connection identifier.

    • body: {}

      Fields to update.

    Returns Promise<{}>

    Updated source.

  • Upload a file to use as input for a dynamic_input agent run. Any other agent rejects the upload with HTTP 400. Files are limited to 200 MB.

    From API version 2026-10-16 a file of any type is accepted and is ready at once: pass its id as input_upload_id to runAgent. Earlier versions accept only a fixed list of extensions and write each file's extracted text into the run's input, so poll getAgentInputUploadStatus until status is ready before running.

    Parameters

    • agentId: string

      Agent identifier.

    • opts: {
          file: Blob | Uint8Array<ArrayBufferLike> | BufferSource;
          fileName?: string;
          mimeType?: string;
      }

      File payload and optional metadata.

    Returns Promise<{}>

    Upload response with the upload ID and status.

  • Upload a file to replace content for an existing content version.

    Parameters

    • contentVersionId: string

      Content version identifier.

    • opts: {
          file: Blob | Uint8Array<ArrayBufferLike> | BufferSource;
          fileName?: string;
          metadata?: Record<string, unknown>;
          mimeType?: string;
          title?: string;
      }

      File payload and optional metadata.

    Returns Promise<{}>

    Upload response.

  • Upload a file to a source.

    Maximum file size: 200 MiB. Supports text, PDF, DOCX, audio, video, images, and more. If mimeType is omitted, it will be inferred from the fileName extension when possible.

    Parameters

    • sourceId: string

      Source connection identifier.

    • opts: {
          file: Blob | Uint8Array<ArrayBufferLike> | BufferSource;
          fileName?: string;
          metadata?: Record<string, unknown>;
          mimeType?: string;
          title?: string;
      }

      File payload and optional metadata.

    Returns Promise<{}>

    Upload response details.

  • Upload inline text to a source.

    Parameters

    Returns Promise<{}>

    Upload response.

  • Revert to the shared agent.seclai.com sending/inbound domain.

    Clears the account's primary domain WITHOUT removing the configured domain(s) — they stay verified and can be promoted again later. Requires an account owner/admin.

    Returns Promise<void>

  • Run a verification check immediately ("Check now").

    Re-polls SES + DNS for this domain instead of waiting for the background verification sweep, and returns its updated status + DNS-record check results. Useful right after publishing the required records. Requires an account owner/admin.

    Parameters

    • domainId: string

      Domain identifier.

    Returns Promise<{}>