# GET /botmail/keys/{id}/webhook

First published 22 Oct 2026 (release 0.2.15) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

Get a bot key's webhook and delivery history

- Who may call it: administrator, reseller, customer
- Token scope, any of: mail, read, all
- Answers: 200 OK

Returns the key's ID, name, and mailbox email address, along with a sample message.received request body for new mail in INBOX. The private_allowed field indicates whether the server allows private network and HTTP webhooks. It reflects mail.botmail_private_webhooks, which defaults to off.

The webhook details include its URL, whether a bearer token is stored, when and why delivery was paused, whether the key can log in and why it might be refused, and the creation and update times. The has_bearer field indicates whether a token is stored without exposing its value. Events are returned newest first and include the message details, event time and source, delivery state, attempt count, next attempt time, HTTP status code, status text, and completion time. If the key has no webhook, webhook is null and events is empty. The events list is also empty when BotMail has no recorded history for the key.

Administrators can access any key. Customers can access their own keys, and resellers can access their own keys and those of the customers they manage. A missing or inaccessible key returns 404.

## Parameters

- `id` (path, integer, 1 or more, required)
- `limit` (query, integer, 1 to 2000): Maximum number of events to return, newest first, expressed as one to four digits (0 to 9999). Defaults to 100 if omitted or supplied in another format.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/botmail/keys/1/webhook?limit=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "events": [
    {
      "at": "text",
      "attempts": 1,
      "code": 1,
      "done_at": "text",
      "folder": "text",
      "from": "text",
      "id": 1,
      "next_at": "text",
      "source": "push",
      "state": "queued",
      "subject": "text",
      "uid": 1,
      "words": "text"
    }
  ],
  "key": {
    "address": "info@example.com",
    "id": 1,
    "name": "alice"
  },
  "private_allowed": true,
  "sample": {},
  "webhook": {
    "created_at": "2026-09-09T10:15:00Z",
    "dead_why": "text",
    "has_bearer": true,
    "id": 1,
    "key_id": 1,
    "live": true,
    "paused": true,
    "paused_at": "text",
    "paused_reason": "text",
    "updated_at": "text",
    "url": "text"
  }
}
```

## Errors

- 400: Invalid id
- 401: Authentication required
- 404: No such bot connector: <c.params>{id}
- 404: No such bot connector: <id>
