---
title: Using the API
slug: using-the-api
docTags: 
createdAt: 2025-02-08T15:10:32.168Z
---

### Getting an API Token

![](https://api.archbee.com/api/optimize/S2Da3xCwaNzg0SGdyXKWw/ZvJalzEkJ_FCWVtCa7Qn__image.png)

To start using the Weberlo API, you’ll need an **API token**. Follow these steps to generate one:

1. Click on your **profile icon** in the top right corner of the Weberlo dashboard.
2. Select **Developer** from the menu.
3. Generate and copy your API token.

This token will be required for authentication when making API requests.

📌 [View API Documentation Home](https://developers.weberlo.com)

### Sending Server-Side Conversions

If you want to send **server-side conversions**, use the **Transaction Endpoint**. This allows you to track sales and associate them with the correct marketing attribution.

📌 [View Transaction Endpoint Documentation](https://developers.weberlo.com/#tag/Event/paths/~1event~1transaction/post)

### Authentication and Workspace Identification

To authenticate API requests, you must include the following:

- **Authorization Header**: Send your API token in the request header as follows:
- **Workspace Identification**: Include your workspace\_id as a URL parameter in the request:

### Passing Session Data for Better Attribution

::Image[]{src="https://api.archbee.com/api/optimize/S2Da3xCwaNzg0SGdyXKWw/bNYpubA5tVAo_XmBGPByV_image.png" size="64" width="470" height="170" position="flex-start" showCaption="false"}

For Weberlo’s attribution to work optimally, you need to **capture the w\_session\_id** from the website’s dataLayer and pass it to your backend. Then, send this value back to Weberlo’s **Transaction Endpoint** as the session\_id field.

- w\_session\_id helps **stitch** front-end and back-end data together.
- It ensures **accurate attribution**, linking conversions back to the correct marketing source.
- Without it, conversions may not be properly attributed to the original traffic source.

