# Node.js SDK

Official Node.js client for the Instasent Transactional API. Install via npm, instantiate the SMS client with your api_sms token, and call the high-level methods instead of wiring fetch by hand.

The Node.js SDK wraps the Transactional HTTP endpoints so you do not have to build requests manually. If the SDK does not cover a call you need, drop back to plain `fetch` — the [Reference](/transactional-api/http/reference) describes every endpoint.

> **Warning**: The canonical source for this SDK is under review. Until it is confirmed, treat the method names below as indicative and double-check against the [GitHub repository](https://github.com/instasent) before wiring it into production.

## Installation

```bash
npm install instasent
```

## Send an SMS

```js
const Instasent = require("instasent");

const client = new Instasent.SmsClient(process.env.INSTASENT_TOKEN);

const response = await client.sendSms("My company", "+34666666666", "test message");
console.log(response.response_code);
console.log(response.response_body);
```

## Available methods

```js
client.sendSms(sender, to, text);
client.getSms(page, perPage);
client.getSmsById(messageId);
```

## Getting help

For help installing or using the library, contact [support@instasent.com](mailto:support@instasent.com). Bugs and feature requests belong on the library's GitHub repository.
