Changelog
HeskAPI release history
2026-11
Fixes for HTTP 500 errors on unusual input
- Fixed: these inputs ended in HTTP 500 or an empty response: a parameter sent as an array (
q[]=x,action[]=x), an emoji or invalid UTF-8 in a held submission (email verification on) or in a track ID, and an oversized page number. Array values are ignored, so a missing required field gets the normal 400;customN[]for checkbox custom fields is unchanged. Emoji are stored as "?", as HESK's own forms store them. - Fixed: an unreachable database returns 503 with a JSON body (it was an empty 500), and any other error that escapes the API's handlers is logged and answered with JSON.
Tested on HESK 3.8.0 and 3.7.12. No database changes.
2026-11
Security fix, Confirm button & optional CAPTCHA, custom fields
- Security: ticket text is now HTML-escaped. Earlier versions stored the name, subject, message and custom-field text sent through the API exactly as received. HESK prints stored ticket text without escaping it, so HTML in a contact-form submission ran in the admin ticket view. The API now stores text the way HESK's own form does. Install this release on every desk that takes API tickets from a public form. The README lists SQL to find and fix tickets created before it.
- Requester emails are stored escaped and attachment names are cleaned, the way HESK stores them. HESK prints both unescaped.
create_ticketrefuses an address with a quoted local part or a backtick. - Integrations that sent HTML in the name, subject or message now see the tags as text. Send plain text; line breaks are kept.
- Confirm button. The emailed confirmation link opens a page with a Confirm button, and the ticket is created when the submitter presses it. Opening the link changes nothing, so mail-security scanners that open every link in a message no longer confirm bot submissions.
- New: optional CAPTCHA on the confirmation page. Turn on CAPTCHA on confirmation page under Spam Protection and the page shows the CAPTCHA set in HESK: simple image, reCAPTCHA v2, invisible reCAPTCHA, or on HESK 3.8 Cloudflare Turnstile and hCaptcha. Off by default.
- Fixed: custom fields.
create_ticketlooked up inactive fields instead of active ones, socustomNvalues were dropped. Values for the category's active fields are now stored in HESK's format. Custom fields are always optional through the API; a value that does not fit its field type is skipped and listed incustom_fields_skipped. - Confirming a held submission checks banned emails and HESK 3.8's allowed email domains again, as well as banned IPs.
- Fixed: banned emails are matched the way HESK matches them, so "@domain" bans apply to the API. Attachments follow HESK's size limit and maximum number of files.
Tested on HESK 3.8.0 and 3.7.12, PHP 8.1+. The new setting is added automatically when you open the API Manager page.
2026-11
HESK 3.8 support, allowed email domains & an Auto-Close fix
- Tested on HESK 3.8.0 (released November 23, 2026) and HESK 3.7.12: ticket listing and search, ticket creation with email verification, updates, replies, closing, customer notifications, the Spam Queue, Tool Kit Auto-Close, and the API Manager page.
- The zip no longer includes HESK's
inc/show_admin_nav.inc.php. Earlier zips carried HESK 3.7.10's copy, and installing it on HESK 3.8 removes the Look & Feel (Admin), Bookmarks, and Audit Log menu entries. Add the API Manager menu link by pasting the README snippet into your existing file. - HESK upgrades replace
inc/show_admin_nav.inc.php. Paste the menu-link snippet again after each HESK upgrade. The API keeps working, and the page stays atadmin/api_manager.php. - New: allowed email domains.
create_tickethonors HESK 3.8's "Allowed customer email domains" setting with the rule HESK applies to email piping. A sender from a domain off the list gets a 403 unless customer accounts are on and the address owns a verified customer account. - Fixed: Auto-Close reminder timing. The Tool Kit "closing soon" reminder reset the ticket's inactivity timer, so a reminded ticket closed a full inactivity period after the reminder. Reminded tickets now close at the time the reminder states.
- Fixed: with HESK debug mode on, the README menu-link snippet logged an "Undefined array key" warning on every admin page.
Compatible with HESK 3.7.0+ and 3.8.0, PHP 8.1+.
2026-09
Tool Kit: Auto-Close stale tickets
- New: Tool Kit tab. Admin › API Manager › Tool Kit holds HESK admin automations included with your license. They need no API integration.
- New: Auto-Close stale tickets. Pick the categories and the open statuses that count as stale, set an inactivity window, and matching tickets close automatically. Options: a "closing soon" reminder email sent a set number of hours before the close, and HESK's "ticket closed" email to the customer, or a silent close. Runs from cron with
admin/api_autoclose_cron.php(CLI, or a web URL guarded by your HESK URL access key). Off by default.
New columns and the hesk_api_autoclose_log table are applied automatically on upgrade.
2026-09
Spam Queue, code verification & a safer confirmation email
- New — Spam Queue. A tab in Admin › API Manager to review every submission still awaiting email confirmation. An inline panel shows the full message, the submitter’s IP and the calling server’s IP, category/priority and any custom fields. Per row: Approve (create the ticket now), Ban (add the sender’s email + IP to HESK’s ban lists and clear their queued items), or Delete — plus one-click “Purge expired”.
- New — 6-digit code verification (optional). Alongside the confirmation-link method, you can now verify by code:
create_ticketreturns aconfirmation_idand emails a 6-digit code, which your integration submits back to the newconfirm_ticketendpoint to create the ticket. Single-use with capped attempts. The link method and the existingcreate_ticketcontract are unchanged. - Security — the confirmation email no longer echoes the submitter’s name or subject. Bots put spam payloads in those fields to relay them through the trusted confirmation email; the default template now omits them (and they’re stripped even from a customized template). Existing installs migrate automatically.
Tested on HESK 3.7.12. New columns are applied automatically on upgrade — just open Admin › API Manager once.
2026-07
Spam protection & real submitter IPs
- New — email verification (double opt-in). When enabled in Admin › API Manager, a ticket submitted through the API is held and a confirmation email is sent to the submitter; it only becomes a real ticket after they click the link. Modes: Off, All tickets, or Unknown emails only (returning customers skip it). Editable email template, configurable link expiry (default 72h) and success-redirect URL, with per-address rate limiting so it can’t be used to mail-bomb anyone. Kills automated contact-form spam.
- New — real submitter IP passthrough.
create_ticketaccepts aclient_ipfield so a caller behind a CDN/Cloudflare can pass the actual end-user IP. It’s stored on the ticket and checked against HESK’s banned-IP list, so bans block the real abuser instead of the calling server. - The heskapi.com contact form now passes each visitor’s true IP and shows a “check your email” confirmation step when verification is on.
Compatible with HESK 3.7.0+, PHP 8.1+. New tables/columns are applied automatically on upgrade.
2026-07
Correct ticket timestamps
- Fixed — API-created tickets showed the wrong time (shifted by your desk's timezone offset, e.g. ~4–5 hours). The API module runs on a lightweight bootstrap that skips HESK's
common.inc.php— where HESK sets PHP's timezone — so its timestamps were written in UTC while HESK writes local time. - The API now mirrors HESK's
hesk_setTimezone(), anchoring PHP's timezone to your$hesk_settings['timezone'](with the same UTC fallback) before any write. Every timestamp it records — created, last change, replies, ticket history, and the API log — now matches HESK's own local wall-clock. DST-aware, and correct regardless of your MySQL server's timezone. - Note: tickets created via the API before updating remain stored in UTC. New tickets are correct immediately; a one-time backfill can realign the older rows (see upgrade notes).
- Also fixed — closing a ticket via the API now sets
closedat/closedbylike HESK's own close (so "time to close" reporting is accurate), and API-written ticket history now uses your configured timestamp format.
Compatible with HESK 3.7.0+, PHP 8.1+.
2026-07
Customer email notifications
- Fixed — customers weren't emailed for tickets created via the API. The notifier read the wrong SMTP setting keys (
smtp_host/smtp_port/smtp_pass/smtp_ssl) instead of HESK's actualsmtp_host_name/smtp_host_port/smtp_password/smtp_enc, so on any SMTP desk the send failed silently and no email went out. - Notifications now go through HESK's own
hesk_notifyCustomer()— your configured email templates, the desk's SMTP transport, and the correct From / Reply-To and ticket tracking links — exactly the path the admin New Ticket page uses when you tick "Send email to customer." Applies to create, reply, and close events. - Controlled by the existing Admin › API Manager notify toggles (Notify on create / reply / close), which default to on.
Compatible with HESK 3.7.0+, PHP 8.1+. Requires the desk's email (SMTP or PHP mail) to be configured under Settings › Email.
2026-07
Customer profile linking
- Fixed — blank customer on API-created tickets. Tickets created via the API now link the submitter to a HESK customer record, so the requester's name and email appear in the admin ticket view and the "Create client" dialog. Previously, on HESK 3.7.x's normalized customer model, API-created tickets showed a blank/anonymous customer.
- The submitter is created or reused in
hesk_customersand linked via ahesk_ticket_to_customerREQUESTER row, mirroring HESK's own ticket-submission flow. - Best-effort and backward compatible — installs without the customer tables are unaffected and ticket creation never fails on the link step.
Compatible with HESK 3.7.0+, PHP 8.1+. Tickets created before updating can be backfilled — see the deploy notes.
2024-06
Initial Release
- 6 REST API endpoints — list_tickets, search_tickets, create_ticket, update_ticket, reply_ticket, close_ticket
- Admin panel — manage API keys, set rate limits, view request logs, toggle API on/off
- Atomic rate limiting — per-key configurable request-per-minute limit with proper 429 responses
- API key authentication — via header or query parameter, rotatable from admin panel
- Attachment support — multipart file uploads on create and reply endpoints
- Native HESK notifications — API actions trigger HESK's built-in email notification system for staff and customers
- IP & email ban enforcement — respects HESK's banned IP ranges and banned email/domain lists
- RSA domain-locked license — asymmetric key validation, no phone-home required
- CSRF-protected admin panel — all admin POST actions protected by CSRF tokens
- XSS-safe output — all user-supplied content sanitized before storage and output
- Sequential ticket IDs — race-safe HESK-format track ID generation
- X-Forwarded-For handling — rightmost IP used to prevent header spoofing
Compatible with HESK 3.7.0, PHP 8.1+, MariaDB 10.4+
2024-06
Discord Webhook — Initial Release
- Rich Discord embeds for new ticket alerts
- Priority color coding (Critical/High/Medium/Low)
- Category and priority filters
- Watermark-based deduplication (no repeat posts)
- First-run protection (no flood of old tickets)
- Configurable bot name & avatar URL
2024-06
Slack Webhook — Initial Release
- Slack attachment format with colored priority sidebar
- Priority emoji labels
- Category and priority filters
- Watermark-based deduplication
- First-run protection
- Configurable bot name, icon URL or emoji