Resolido Docs

TypeScript SDK

@resolido/sdk – a typed client generated from the OpenAPI spec.

npm install @resolido/sdk
import { createResolido } from "@resolido/sdk";

const resolido = createResolido({ apiKey: process.env.RESOLIDO_API_KEY });

const { data } = await resolido.GET("/conversations", {
  params: { query: { view: "escalated", limit: 10 } },
});

for (const conversation of data.data) {
  console.log(conversation.id, conversation.preview);
}

Paths, parameters, request bodies and responses are fully typed from the OpenAPI spec. The client is built on openapi-fetch and works in Node.js 18+, Bun, Deno and edge runtimes.

Options

OptionDefault
apiKeyRESOLIDO_API_KEY – an API key (rsl_live_…) or OAuth access token (rsl_oat_…)
baseUrlRESOLIDO_API_URL or https://api.resolido.com/v1
maxRetries2 – retries 429 and 5xx responses, honoring Retry-After
fetchglobalThis.fetch

Every non-GET request automatically gets an Idempotency-Key. Pass your own header when you need retries to be safe across processes – see Idempotency.

Errors and confirmations

Failed requests throw ResolidoError with status, code, hint, requestId and the full problem. Destructive operations first fail with confirmation_required:

import { ResolidoError } from "@resolido/sdk";

try {
  await resolido.DELETE("/agents/{agentId}", { params: { path: { agentId } } });
} catch (error) {
  const confirmation = error instanceof ResolidoError ? error.confirmation : null;
  if (!confirmation) throw error;
  if (await askUser(confirmation.summary)) {
    await resolido.DELETE("/agents/{agentId}", {
      params: { path: { agentId }, query: { confirmationToken: confirmation.token } },
    });
  }
}

On this page