# API Reference

Complete API reference for the **Tode SDK** - the analytics solution for Figma plugins and widgets.

## Core Module (@tode-sdk/core)

The core module provides the main `tode` instance used in your plugin controller.

### Initialization

- [**tode.init()**](https://docs.usetode.dev/api/init) - Initialize Tode with your API key

### Tracking Methods

- [**tode.trackAction()**](https://docs.usetode.dev/api/track-action) - Track simple user actions
- [**tode.trackActionWithMetric()**](https://docs.usetode.dev/api/track-action-with-metric) - Track actions with numeric values

### Properties

- [**tode.isReady**](https://docs.usetode.dev/api/is-ready) - Check if Tode is ready to track

## Quick Example

```typescript title="code.ts"
import { tode } from '@tode-sdk/core';

// Initialize
await tode.init({ apiKey: 'your-api-key' });

// Track actions
tode.trackAction('plugin_opened');
tode.trackActionWithMetric('items_exported', 42);

// Check status
if (tode.isReady) {
  tode.trackAction('ready_to_track');
}
```

## Need Help?

- Read the [Best Practices](https://docs.usetode.dev/best-practices) guide for implementation tips
- Check the framework-specific guides for detailed examples
- Review the [Introduction](https://docs.usetode.dev/) for setup instructions

Source: https://docs.usetode.dev/api
