# POST /mail/webmail/release

First published 18 Oct 2026 (release 0.2.10) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

Release a webmail sign-in ticket at logout

- Who may call it: anyone (no token needed)
- Answers: 200 OK

The UrbeStack plugin for Roundcube calls this operation at logout. It accepts requests only from 127.0.0.1 or ::1 and returns 404 for other origins. Supply the mailbox's email address in address and its sign-in ticket in ticket. The ticket serves as the credential, so no API token is required.

An invalid or missing email address returns 400. An omitted, null, empty, or non-scalar ticket, or one containing control characters, also returns 400. The response returns the normalized email address in address and sets released to true if a matching ticket was removed. If no ticket matches, the operation returns 200 with released set to false and leaves any other ticket intact.

## As a command

- [urbestack-webmail-open](https://urbestack.com/docs/commands/urbestack-webmail-open.md): Issues a webmail sign-in ticket for the mailbox specified by --address.

## Request body

JSON, the type [WebmailTicketRelease](https://urbestack.com/docs/api/types/WebmailTicketRelease.md).

- `address` (string, up to 320 characters, required): Mailbox email address in local@domain form.
- `ticket` (string, up to 200 characters, required): Ticket webmail used to sign in.

## 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/mail/webmail/release" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "info@example.com",
    "ticket": "text"
  }'
```

Response, 200 OK:

```
{
  "address": "info@example.com",
  "released": true
}
```

## Errors

- 400: --address is required
- 400: --ticket-stdin is required with --release
- 400: <what> must be text without control characters, 1 to <max> characters
- 400: A mailbox address is required
- 400: Domain name required
- 400: Domain name too long
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid domain name
- 400: Invalid mail address
- 400: Invalid mail address: local part over 64 characters
- 400: Invalid mail address: no local part
- 400: Invalid mail address: the local part may hold letters, digits, dots, _ + and -
- 400: Invalid port
- 400: Invalid setting key
- 400: The ticket is required
- 403: The account <user> is suspended
- 403: The sign-in of <address> is off
- 404: No such mail account: <address>
- 404: Not found
- 404: Setting '<key>' not found
- 409: The mail system is not installed
- 409: Webmail is switched off on this server (mail.webmail)
