# POST /botmail/keys/{id}/webhook/test

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

UrbeStack release 0.2.35 API operation in the mail group.

Send an immediate test ping to a bot key's webhook

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

The key must have a webhook. BotMail sends the ping through its webhook delivery service, and the ping appears in the key's event history. The operation allows up to 90 seconds for the test.

A 200 response reports whether delivery succeeded in delivered, the receiver's HTTP status code in code, the elapsed time in milliseconds in ms, the delivery status text shown in the web interface in words, and the webhook URL in url. If BotMail produces no delivery result, check the UrbeStack log.

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.

## As a command

- [urbestack-botmail-webhook-test](https://urbestack.com/docs/commands/urbestack-botmail-webhook-test.md): Sends an immediate test ping through BotMail to the webhook for the bot key identified by --key.

## Parameters

- `id` (path, integer, 1 or more, required)

## 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 POST "$API/botmail/keys/1/webhook/test" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "code": 1,
  "delivered": true,
  "ms": 1,
  "url": "text",
  "words": "text"
}
```

## Errors

- 400: --key is required
- 400: Invalid id
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 404: No such bot connector: <c.params>{id}
- 404: No such bot connector: <id>
- 404: No such domain: <domain>
- 404: The bot connector <k.name> has no webhook
