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

# Sending Data to Cometly

> Learn the two ways to send event data to Cometly: webhooks and the API

## Overview

There are two ways to send event data to Cometly:

| Method | Best For | Complexity |
| - | - | - |
| **Webhooks** | Most integrations | Low - no code required |
| **API** | Custom implementations | Medium - requires development |

## Webhooks (Recommended)

Webhooks are the easiest way to send data to Cometly. They enable automated, real-time data transmission from external applications without writing any code.

### Benefits

* **No code required** - Configure entirely through the Cometly UI
* **Works with most apps** - Any platform that supports webhooks (HubSpot, Stripe, ClickFunnels, and many more)
* **Built-in field mapping** - Match your app's data fields to Cometly through a visual interface
* **Data filtering** - Process only relevant events based on criteria you define
* **Data transformation** - Format dates, convert currencies, and perform calculations automatically

### How It Works

1. Get a unique webhook URL from Cometly (Space Setup → Add Events)
2. Add the URL to your external application's webhook settings
3. Map your app's fields to Cometly fields
4. Activate the webhook

See [Cometly Webhooks Integration](https://help.cometly.com/en/articles/10204379-cometly-webhooks-integration) for setup instructions.

## API

The API is for custom implementations where you need full control over when and how events are sent.

### When to Use the API

* Building a custom integration not supported by webhooks
* Server-side event tracking
* Programmatic event creation from your own application
* Bulk data operations via exports

### Getting Started

1. [Generate an API key](https://docs.cometly.com/introduction/authentication.md)
2. Use the [Create Event](https://docs.cometly.com/api-reference/endpoint/create-event.md) endpoint to send events
3. Include identification parameters (`email`, `comet_token`, or `fingerprint` + `ip`)

## Which Should I Use?

> [!NOTE]
>
> **Use webhooks** if your platform supports them. They're faster to set up, require no code, and include built-in data transformation features.

Use the API when:

* Your platform doesn't support webhooks
* You need to send events from server-side code
* You're building a custom application that requires programmatic control


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