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

# Convex

> Connect your Convex team so Sazabi can automatically configure a log stream on each deployment you select.

[All Convex integration capabilities](https://docs.sazabi.com/catalogs/integrations/convex)

## About

Convex log streams forward function logs — from queries, mutations, actions, and scheduled functions, including `console.log` output — to Sazabi with per-function attribution. Connecting your Convex account lets Sazabi configure the log stream for each deployment you pick; Sazabi uses your Convex team access token to provision a webhook log stream automatically.

Convex also has a **Send to an endpoint** path where you create each deployment's webhook log stream yourself. See [Convex endpoint page](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/convex.md) for that setup.

> [!WARNING]
>
> Convex log streaming requires the **Pro plan**. Free and Starter teams cannot configure log streams.

## Prerequisites

* A Convex account on the Pro plan.
* A team access token from your Convex dashboard team settings.

## Set up in the dashboard

**Step 1**

### Create a team access token

Open your [Convex dashboard](https://dashboard.convex.dev) and go to **Team Settings > Access Tokens**. Create a team access token and copy it.

**Step 2**

### Connect in Sazabi

Go to [**Settings > Log streams**](https://app.sazabi.com/settings/log-source-providers), click **Add source**, and select **Convex**. Enter your team access token, then select the Convex team from the list Sazabi fetches.

**Step 3**

### Choose a team and add log streams

After selecting your team, click **Connect**. Then click **Add log stream** to open the deployment picker. Sazabi lists all deployments in the connected team — select the ones you want to forward logs from.

For each selected deployment, Sazabi:

1. Creates a deploy key for that deployment using the Convex Management API.
2. Generates a Sazabi intake URL for the deployment (the public key it embeds handles intake attribution — you never handle it directly).
3. Creates a webhook log stream on the deployment using the deploy key, pointed at that Sazabi intake URL.

## Set up with the CLI

You can also connect the Convex log source with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) (installed and authenticated — see [CLI reference](https://docs.sazabi.com/reference/cli/log-sources.md)).

Create a native connection by passing your Convex team access token as metadata:

```bash theme={"system"}
sazabi log-sources create convex --mode native \
  --metadata '{"accessToken":"'"$CONVEX_TEAM_ACCESS_TOKEN"'"}'
```

Use a Convex **team access token**, not a deploy key. Sazabi validates it against the Convex Management API and creates the log source; note the log source ID it prints.

Add a log stream — one webhook log stream per deployment — with `sazabi log-streams create`, passing the Convex deployment name in `--config`:

```bash theme={"system"}
sazabi log-streams create --log-source-id <log-source-id> \
  --config '{"deploymentId":"<deployment name>","deploymentName":"<deployment name>"}'
```

Run `sazabi log-sources list` to confirm the source and its streams.

## Verify

Trigger activity on a connected deployment — run a Convex function, hit a deployed endpoint, or invoke a scheduled function.

Open the [Intake page](https://docs.sazabi.com/guides/instrument/intake.md) in the Sazabi dashboard and confirm that records attributed to the **Convex** source appear. Logs typically arrive within one to two minutes of the webhook delivering them.

## Troubleshooting

**"Log streaming requires a Convex Professional plan"** — Upgrade the Convex team to Pro, or switch to the [send-to-an-endpoint path](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/convex.md) (the Pro requirement still applies there).

**Token validation fails** — Confirm the token is a Convex **team access token**, not a deploy key. Team access tokens begin with `eyJ`.

**No deployments appear** — Verify the token is scoped to the correct Convex team. If the team has no deployments, create one first in the Convex dashboard.

**Logs stop arriving** — The webhook log stream on the Convex deployment may have been deleted, or the deploy key may have been revoked. Remove and re-add the log stream from [**Settings > Log streams**](https://app.sazabi.com/settings/log-source-providers) in Sazabi to reprovision it.

## Further reading

> [card] [Intake](https://docs.sazabi.com/guides/instrument/intake.md)
>
> See per-source ingestion volume and health in the Intake page.

> [card] [Convex (send to an endpoint)](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/convex.md)
>
> Create a Convex webhook log stream yourself and point it at Sazabi.

> [card] [Log sources](https://docs.sazabi.com/catalogs/log-sources.md)
>
> Browse the full log source catalog.


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