Skip to main content

Adspire.AI Node SDK

The Adspire.AI Node SDK provides a simple, type‑safe client for the REST API.

Features​

  • Auto‑generated TypeScript client for Adspire.AI’s REST API
  • Built on @hey-api/client-fetch
  • Type‑safe API calls (auto‑generated types)
  • Configurable base URL and environment settings

Installation​

npm install @adspireai/adspire-node-sdk

Usage​

The SDK exports all generated methods from the OpenAPI spec.

import { createWebhookEvent } from "@adspireai/adspire-node-sdk";
import { client } from "@adspireai/adspire-node-sdk/dist/client.gen";

client.setConfig({
baseUrl: "https://api.adspire.ai",
headers: {
Accept: "application/json",
Authorization: `Bearer ${process.env.CONNECTOR_API_TOKEN}`,
},
});

await createWebhookEvent({
client,
body: {
event_type: "provider.topic",
payload: {
example: true,
},
},
});