Get StartedOfficial SDKs

Official SDKs

Official Node.js and PHP SDKs for the Nashra API, and how to call the API directly with curl for anything else.

Official SDKs

Nashra publishes two official SDKs, both open source and MIT-licensed. Both are early — small, young projects that cover the core subscriber-list endpoints rather than the full API. Treat each repository's README as the source of truth for exact method names and package contents.

Both cover subscribers, tags, and custom fields with full create/read/update/delete, plus segments for list and get only. Neither wraps the posts endpoints yet — use a direct request for those, as below.

Node.js

npm install @nashra/sdk

Requires Node.js 18+.

import { Nashra } from '@nashra/sdk';

const nashra = new Nashra('your_api_key_here');

const page = await nashra.subscribers.list({ search: 'jane' }).getPage();
console.log(page.data);

const subscriber = await nashra.subscribers.create({
  email: 'jane@example.com',
  first_name: 'Jane',
  tags: ['vip'],
});

The client defaults to https://app.nashra.ai/api/v1 as its base URL. See the repository README for the full resource list, pagination, and error handling.

PHP / Laravel

composer require nashra/sdk

Requires PHP 8.2+ and Laravel 11 or 12. The package auto-discovers itself — no manual provider registration.

Add your API key to .env:

NASHRA_API_KEY=your_api_key_here
use Nashra\Sdk\Facades\Nashra;

$subscribers = Nashra::subscribers()->list(['search' => 'jane']);

$subscriber = Nashra::subscribers()->create([
    'email' => 'jane@example.com',
    'first_name' => 'Jane',
]);

It also works outside Laravel via direct instantiation — new \Nashra\Sdk\Nashra('your_api_key_here'). See the repository README for dependency injection, pagination, and error handling.

Using the API directly

For any other language, call the REST API directly — every SDK above is a thin wrapper over the same requests:

curl https://app.nashra.ai/api/v1/subscribers \
  -H "Authorization: Bearer your_api_key_here"

Create a key in Settings → API keys (see Authentication). The API Overview lists what the API can and can't do yet.

Community libraries

If you've built or use a library for another language, let us know and we'll list it here.

What's next