> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usenotra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Get started with the Notra API.

We provide two ways to interact with Notra:

<CardGroup cols={2}>
  <Card title="REST API" icon="globe">
    Use raw `fetch` or `cURL` to call endpoints directly. Full control, no dependencies.
  </Card>

  <Card title="TypeScript SDK" icon="code">
    Use the official `@usenotra/sdk` package for a type-safe, ergonomic integration.
  </Card>
</CardGroup>

## Quick Start

Base URL:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
https://api.usenotra.com/v1/:resource
```

`:resource` is the endpoint path (e.g., `posts`, `posts/{postId}`). The
organization is inferred from your API key, so there is no need to pass it in the URL.

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.usenotra.com/v1/posts"
  ```

  ```typescript SDK theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Notra } from "@usenotra/sdk";

  const notra = new Notra({
    bearerAuth: process.env.NOTRA_API_KEY ?? "",
  });

  const result = await notra.content.listPosts();

  console.log(result.posts);
  ```
</CodeGroup>

<Tip>
  Replace `YOUR_API_KEY` with your API key. Keys are scoped to an organization
  (set via `externalId` when created).
</Tip>

Create and manage API keys in [Authentication](/api/authentication).

<img src="https://mintcdn.com/notra/61y0WT4n5c9L1YWx/images/api/api-keys-light.webp?fit=max&auto=format&n=61y0WT4n5c9L1YWx&q=85&s=1fa24983d8adeb0523097591b1e698a5" alt="API Keys in the Notra dashboard" className="block dark:hidden" width="2284" height="1518" data-path="images/api/api-keys-light.webp" />

<img src="https://mintcdn.com/notra/61y0WT4n5c9L1YWx/images/api/api-keys-dark.webp?fit=max&auto=format&n=61y0WT4n5c9L1YWx&q=85&s=3be3c3f0863ee159b243b13264fefb39" alt="API Keys in the Notra dashboard" className="hidden dark:block" width="2284" height="1518" data-path="images/api/api-keys-dark.webp" />

<Warning>
  Keep API keys private. Even read-only keys can be abused and burn through your
  [rate limits](/api/rate-limits) if exposed in client-side code. Use server-side
  requests whenever possible.
</Warning>

## SDK Installation

Install the Notra SDK:

<CodeGroup>
  ```bash npm theme={"theme":{"light":"github-light","dark":"github-dark"}}
  npm install @usenotra/sdk
  ```

  ```bash yarn theme={"theme":{"light":"github-light","dark":"github-dark"}}
  yarn add @usenotra/sdk
  ```

  ```bash pnpm theme={"theme":{"light":"github-light","dark":"github-dark"}}
  pnpm add @usenotra/sdk
  ```

  ```bash bun theme={"theme":{"light":"github-light","dark":"github-dark"}}
  bun add @usenotra/sdk
  ```
</CodeGroup>

Initialize the client with your API key:

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Notra } from "@usenotra/sdk";

const notra = new Notra({
  bearerAuth: process.env.NOTRA_API_KEY ?? "",
});
```

<Tip>
  Store your API key in an environment variable. Create and manage keys in your
  [dashboard](https://app.usenotra.com) under **Developer → API Keys**.
</Tip>

For single-post lookups:

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
const post = await notra.content.getPost({
  postId: "post_abc",
});
```

## Common Tasks

See [Common Tasks](/api/common-tasks) for copy-paste examples such as updating an existing post and guidance on unsupported create-post patterns.

## Available Endpoints

<CardGroup cols={2}>
  <Card title="Posts" icon="file-text" href="/api-reference/content/list-posts">
    Browse the post listing, single-post, update, and delete routes.
  </Card>

  <Card title="Generation" icon="sparkles" href="/api-reference/content/queue-async-post-generation">
    Queue generation jobs and poll their status updates.
  </Card>

  <Card title="Brand Identities" icon="palette" href="/api-reference/content/list-available-brand-identities">
    Browse the brand identity list and single-identity routes.
  </Card>

  <Card title="Integrations" icon="plug" href="/api-reference/content/list-available-integrations">
    Discover available integrations to use in generation requests.
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Pagination" icon="book-open" href="/api/pagination">
    Learn how to paginate through large result sets.
  </Card>

  <Card title="TypeScript Types" icon="code" href="/api/types">
    Use our TypeScript definitions for type-safe development.
  </Card>

  <Card title="Caching" icon="database" href="/api/caching">
    Learn how to cache paginated post data and invalidate it safely.
  </Card>

  <Card title="Common Tasks" icon="sparkles" href="/api/common-tasks">
    Find practical examples for updates and other common implementation questions.
  </Card>
</CardGroup>
