# Node.js SDK

Official Node.js client for the Instasent A2P Messaging 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.

**Language:** en
**Audience:** developer
**Docs index (every page):** https://docs.instasent.com/llms.txt
**This zone's index:** https://docs.instasent.com/developers/transactional-api/llms-full.txt
**This page:** https://docs.instasent.com/developers/transactional-api/sdks/node/ (HTML) · https://docs.instasent.com/developers/transactional-api/sdks/node.md (Markdown)

The Node.js SDK wraps the A2P Messaging 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](/developers/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.

---

This is one page of the Instasent documentation. For the complete machine-readable index of every guide and API reference, fetch https://docs.instasent.com/llms.txt — start there for full context.
