---
title: "Quick Start"
description: "Make the first server-side and storefront requests with @requiply/api-sdk."
canonical_url: "https://requiply.com/docs/en/developers/typescript-sdk/quick-start"
---
# Quick Start

> Make the first server-side and storefront requests with @requiply/api-sdk.

## Server example

Use a secret key only in a trusted server runtime.

```ts
import { RequiplyClient } from '@requiply/api-sdk';

const requiply = new RequiplyClient({
  apiKey: process.env.REQUIPLY_SECRET_KEY!,
});

const { bookings, nextCursor } = await requiply.bookings.list({
  dateFrom: '2026-07-01',
  dateTo: '2026-07-31',
  limit: 25,
});

console.log(bookings, nextCursor);
```

## Storefront example

Use a restricted publishable key for public storefront calls.

```ts
import { RequiplyClient } from '@requiply/api-sdk';

const requiply = new RequiplyClient({
  apiKey: 'rq_pk_live_...',
});

const inventory = await requiply.inventory.list({
  startDate: '2026-07-01T10:00:00',
  endDate: '2026-07-03T18:00:00',
});

const firstItem = inventory.items[0];
if (!firstItem) throw new Error('No inventory is available');

const quote = await requiply.pricing.quote({
  startDate: '2026-07-01T10:00:00',
  endDate: '2026-07-03T18:00:00',
  items: [{ groupId: firstItem.id, quantity: 1 }],
});

const request = await requiply.bookings.create({
  startDate: '2026-07-01T10:00:00',
  endDate: '2026-07-03T18:00:00',
  items: [{ groupId: firstItem.id, quantity: 1 }],
  deliveryType: 'pickup',
  asRequest: true,
  client: { email: 'customer@example.com' },
});

if (request.success) {
  console.log(quote.total, request.reservationOrgId);
} else {
  console.log('Not accepted:', request.message);
}
```

Send a time with every booking date: a date alone is read as midnight and usually falls outside working hours. A booking the organization cannot accept resolves with `success: false` rather than throwing.

<warning>

With a publishable key, `bookings.create()` must use `asRequest: true`.

</warning>


## Sitemap

See the full [sitemap](https://requiply.com/docs/sitemap.md) for all pages.
