# Developers Workbench

> The Developers bar at the bottom of each Broadcast page shows the API operations for the page, the API request log, the events, the webhook state, a record inspector and a console.

Source: https://sendbroadcast.net/docs/developers-workbench

The **Developers** bar is at the bottom of each page of the dashboard. It shows how to do the work of the page through the API. Click the bar to open the workbench. Click it again to close the workbench.

The bar shows three numbers at all times:

- **API operations for this page.** The number of API operations that do the work of the page.
- **API errors, 24 hours.** The API requests of this channel that were refused or that failed.
- **Delayed endpoints.** The webhook endpoints that do not answer.

The workbench stays open when you go to a different page.

## Who sees the bar

A user sees the bar when the user has the permission **Use the Developers workbench** in the channel. The permission is in the **API Tokens** group. The **Manager** role includes it. The workbench shows every API request and event of the channel, with the subscriber data in them, so give the permission only to people who may see that data. See [Users & Permissions](https://sendbroadcast.net/docs/users-and-permissions).

To hide the bar for yourself, open your profile and select **Hide the Developers bar**.

## This page

The tab shows each API operation for the page that you look at:

- the method and the path
- the permission that the API token must have
- the name of the tool in the [MCP Server](https://sendbroadcast.net/docs/agents-mcp)

Click an operation to see its `curl` command. On the page of one record, the path contains the ID of that record.

The command contains the placeholder `$BROADCAST_API_TOKEN`. To put a real token in the command, select a token of the channel in **Token in the command**. The select shows only when you have the permission to see the API tokens. Broadcast remembers your selection in the browser.

A command with a real token gives access to your channel. Do not share it.

**Not in the API** lists the actions of the page that have no API operation.

## Overview

The tab shows the API requests and the errors for each day, the errors by status and the webhook deliveries. Select 24 hours, 7 days or 30 days. The days are in UTC.

## Logs

The tab lists each request that an API token made to the channel. A request from the MCP server or from the Console is in the list too, with its source. A request that the rate limit refused (status 429) is not in the list.

Click the path of a request to see:

- the time, the duration, the token, the IP address and the request ID
- the request body and the response body
- a `curl` command that sends the request again

Use the filters to show only errors, one method, one source, one token or a longer period.

### What the log stores

- Only a JSON body is stored. A body larger than 16 KB is cut. A body larger than 1 MB is not stored.
- The value of a key such as `password`, `secret`, `token`, `api_key` or `aws_access_key_id` is replaced with `[FILTERED]`. The custom email headers of an email server are replaced too.
- The value of the `Authorization` header is never stored.
- The bodies are encrypted in the database. If the encryption keys are not set, the log has no bodies.
- A request stays 7 days.

Two environment variables change the log:

| Variable | Effect |
|---|---|
| `API_REQUEST_LOG=off` | Broadcast does not write the request log. |
| `API_REQUEST_LOG_RETENTION_DAYS` | The number of days that a request stays. The default is 7. |

## Events

The tab lists the events of the channel, such as `subscriber.created` and `broadcast.sent`. An event is in the list when no webhook endpoint subscribes to it too. Click an event to see its payload and its webhook deliveries.

An `email.*` event, such as `email.sent` or `email.opened`, is in the list only when a webhook endpoint subscribes to it. These events are too many to store for each send.

An event stays 30 days, or the value of `EVENT_LOG_RETENTION_DAYS`. Set `EVENT_LOG=off` to stop the event log. Webhooks do not change.

When you delete a subscriber, Broadcast deletes the events about that subscriber too. When you redact a subscriber, the events keep only the redacted address.

## Webhooks

The tab shows each webhook endpoint of the channel: its state, its deliveries of the last 7 days, its last response and the number of held deliveries. Below, it lists the deliveries of the last 7 days that failed or that are held. A user who does not have the permission to see the webhook endpoints sees only the scheme and the host of each URL, because the path of a webhook URL often contains a secret. To change an endpoint or to send a test, click the endpoint. See [Webhooks](https://sendbroadcast.net/docs/webhooks).

## Inspector

Open one record, for example a broadcast, a template or a topic. The tab then shows:

- the API requests that touched the record
- the events about the record

To see the record as the API returns it, select a token and click **Read from the API**.

## Console

The tab runs one API operation:

1. Select the operation.
2. Select a token of the channel.
3. Fill the path, the query and the body.
4. Click **Run**.

A request that changes data needs a confirmation: select the box, then click **Run**.

The request goes through the API with the permissions of the token that you selected. The API refuses what the token cannot do. Each request is in **Logs** with the source **Console**. If the API does not answer in 30 seconds, the Console stops the wait and shows a message. The request can still finish: look for it in **Logs**.

To select a token, you must have the permission to view API tokens.
