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

# Quickstart

> Get started with the Widgetic API in minutes

This guide will help you make your first API call to Widgetic in just a few minutes.

## Prerequisites

Before you begin, make sure you have:

1. A Widgetic account ([sign up here](https://app.widgetic.com/signup))
2. An API key from your dashboard
3. A basic understanding of REST APIs

## Step 1: Get Your API Key

1. Log in to your [Widgetic dashboard](https://app.widgetic.com)
2. Navigate to **Settings** > **API Keys**
3. Click **Generate New Key**
4. Copy your API key (it starts with `wgt_usr_` for user keys)

> [!WARNING]
>
> Keep your API key secure! Never expose it in client-side code or public repositories.

## Step 2: Make Your First Request

Let's verify your API key by fetching your user profile:

```bash cURL theme={null}
curl -X GET "https://api.widgetic.com/v1/users/me" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.widgetic.com/v1/users/me', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const user = await response.json();
console.log(user);
```

```typescript TypeScript SDK theme={null}
import { TokensApi } from '@widgetic/api-sdk-ts';

// The SDK package has no call for your profile, so check the key instead:
// the answer tells you the key is valid and which account it belongs to.
const tokens = new TokensApi('YOUR_API_KEY');
const check = await tokens.validateToken();
console.log(check);
```

## Step 3: Explore the API

Now that you're authenticated, here are some common next steps:

> [card] [List Your Widgets](https://widgetic.com/docs/api/widgets.md)
>
> Fetch all widgets in your account

> [card] [Create a Canvas](https://widgetic.com/docs/api/canvases.md)
>
> Start designing a new widget

> [card] [Get Compositions](https://widgetic.com/docs/api/compositions.md)
>
> View your widget compositions

> [card] [Check Entitlements](https://widgetic.com/api-reference/introduction.md)
>
> See access levels and entitlement endpoints

## Using the TypeScript SDK

We recommend using our TypeScript SDK for the best developer experience:

```bash theme={null}
npm install @widgetic/api-sdk-ts
```

The SDK provides type-safe access to all API endpoints:

```typescript theme={null}
import { WidgetsApi, CompositionsApi, CanvasesApi } from '@widgetic/api-sdk-ts';

// Initialize with your API key
const widgets = new WidgetsApi('YOUR_API_KEY');
const compositions = new CompositionsApi('YOUR_API_KEY');
const canvases = new CanvasesApi('YOUR_API_KEY');

// Fetch widgets with pagination
const { data, meta } = await widgets.getWidgets({ page: 1, size: 20 });
console.log(`Found ${meta.total} widgets`);
```

## Next Steps

**1. Learn Authentication**

Understand the different [authentication methods](https://widgetic.com/docs/authentication.md) available.

**2. Choose Your Path**

* **Partners**: Start with [Partner Overview](https://widgetic.com/docs/partners/overview.md)
* **Self-Serve**: Start with [API Overview](https://widgetic.com/docs/api/overview.md)

**3. Explore Examples**

Check out our [code examples](https://widgetic.com/resources/examples.md) for common use cases.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.