Get your free beta license ↗
API operation · mail group
POST

/domains/{name}/mail/accounts/{local}/webmail

First published 18 Oct 20260.2.10Unchanged since publication

Issue a webmail sign-in ticket for a mailbox

Who may call it
AdministratorResellerCustomer
Token scope, any of
mailall
Answers201 Created

The 201 response contains the mailbox's email address in address, the webmail URL in url, the ticket in ticket and its expiration time in expires_at. UrbeStack returns the cleartext ticket only when issuing it. Have the browser POST to url with the email address in _urbestack_user and the ticket in _urbestack_ticket. Roundcube signs in as the mailbox, with its settings and address book, and uses the ticket for IMAP on each request and for sending mail.

The ticket works only from the server that issued it and expires after 12 hours. It is revoked earlier at webmail logout, when mailbox sign-in is disabled, when the mailbox is deleted or when end_sessions is set to true. Issuing a new ticket replaces the previous one and ends the previous webmail session on its next request.

Issuance requires an installed mail system, webmail enabled through mail.webmail, an active owner account and mailbox sign-in enabled. The API returns 404 if the mailbox does not exist on the domain. UrbeStack logs each issuance in the audit log as webmail-open.

Administrators, the domain's owner and the owner's reseller can call this operation with a token that has the mail scope.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired
localpath ·LocalPartRequired

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/domains/example.com/mail/accounts/info/webmail" \
  -H "Authorization: Bearer $TOKEN"
Response · 201 Created
{
  "address": "info@example.com",
  "expires_at": "2026-09-16T10:15:00Z",
  "ticket": "text",
  "url": "text"
}

Errors

21 errors, each a status and a sentence
400--address is required
400--ticket-stdin is required with --release
400<what> must be text without control characters, 1 to <max> characters
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
400Invalid mail address
400Invalid mail address: local part over 64 characters
400Invalid mail address: no local part
400Invalid mail address: the local part may hold letters, digits, dots, _ + and -
400Invalid port
400Invalid setting key
401Authentication required
403The account <user> is suspended
403The sign-in of <address> is off
404No such mail account: <address>
404Setting '<key>' not found
409The mail system is not installed
409Webmail is switched off on this server (mail.webmail)
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.10 on 18 Oct 2026.
urbestack.com/docs/api/post-domains-name-mail-accounts-local-webmail/