SDK Quickstart

JavaScript / TypeScript SDK Quickstart

Install @khaleejiapi/sdk, configure your API key, and make your first authenticated API call.

1) Install

bash
npm install @khaleejiapi/sdk

2) Environment variable setup

bash
# .env.local (Next.js) or .env
KHALEEJI_API_KEY=your_api_key_here

3) Minimal working example

typescript
import { KhaleejiAPI } from '@khaleejiapi/sdk';
const apiKey = process.env.KHALEEJI_API_KEY;
if (!apiKey) throw new Error('Missing KHALEEJI_API_KEY');
const client = new KhaleejiAPI({ apiKey });
const result = await client.validation.validateEmail({ email: '[email protected]' });
console.log(result.valid);

Next steps

Test your key with a real endpoint from the API reference.

Use retries/rate-limit handling for production workloads.

Review authentication and rate limits before going live.