How to Create Tickets via Incoming Webhooks

Allow external systems to create support tickets in Support Genix by sending HTTP POST requests. Use incoming webhooks to integrate with CRMs, form builders, monitoring tools, e-commerce platforms, and custom applications. This is a Pro feature.

Overview

Incoming webhooks provide a URL endpoint that accepts POST requests and automatically creates tickets (or adds replies to existing tickets) in Support Genix. Each webhook has a unique authentication token — no API keys or OAuth needed.

Creating a Webhook

  1. Go to Support Genix > Settings > Webhooks > Incoming.
  2. Click Add New.
  3. Enter a Title for the webhook (e.g., “Contact Form”, “Monitoring Alerts”, “CRM Integration”).
  4. Click Save.

The system automatically generates:

  • A unique hash token for authentication.
  • A webhook URL in this format:
https://yoursite.com/?sgwebhook=1&hash=XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX

Copy this URL — you’ll configure it in your external system.

Managing Webhooks

  • Activate/Deactivate — Toggle the status to enable or disable the webhook without deleting it.
  • Delete — Permanently remove the webhook. Any external systems using it will stop working.
  • Multiple webhooks — Create separate webhooks for different external systems. Each gets its own token and URL.

Sending Data to the Webhook

Send a POST request to the webhook URL with ticket data.

Supported Content Types

The webhook accepts multiple payload formats:

Content-TypeFormat
application/jsonJSON body
application/xmlXML body (auto-converted to JSON)
multipart/form-dataForm data with file uploads
application/x-www-form-urlencodedStandard form encoding

Required Fields

FieldTypeDescription
user_emailstringCustomer’s email address (must be valid)
ticket_subjectstringTicket subject line
ticket_descriptionstringTicket body content (HTML supported)

Optional Fields

FieldTypeDescription
user_first_namestringCustomer’s first name
user_last_namestringCustomer’s last name
ticket_category_idintegerCategory ID to assign
ticket_prioritystringN (Normal), M (Medium), H (High) — also accepts normal, medium, high
ticket_mailbox_idintegerMailbox ID to associate
ticket_mailbox_typestringM (Mail) or T (Transactional)
ticket_attachmentstring (URL)Single file attachment URL
ticket_attachmentsarray of URLsMultiple file attachment URLs
ticket_custom_fieldsobjectCustom field values (see below)

Example Requests

JSON

curl -X POST "https://yoursite.com/?sgwebhook=1&hash=YOUR_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "user_email": "[email protected]",
    "user_first_name": "John",
    "user_last_name": "Doe",
    "ticket_subject": "Cannot access my account",
    "ticket_description": "<p>I am unable to log in to my account since this morning. I get an error message saying "Invalid credentials" even though my password is correct.</p>",
    "ticket_category_id": 1,
    "ticket_priority": "H"
  }'

Form Data

curl -X POST "https://yoursite.com/?sgwebhook=1&hash=YOUR_TOKEN" 
  -F "[email protected]" 
  -F "user_first_name=Jane" 
  -F "user_last_name=Smith" 
  -F "ticket_subject=Billing question" 
  -F "ticket_description=I was charged twice for my subscription." 
  -F "ticket_priority=M"

With Attachments (URLs)

{
  "user_email": "[email protected]",
  "ticket_subject": "Screenshot of the bug",
  "ticket_description": "Please see the attached screenshots.",
  "ticket_attachments": [
    "https://example.com/uploads/screenshot1.png",
    "https://example.com/uploads/screenshot2.png"
  ]
}

With Custom Fields

{
  "user_email": "[email protected]",
  "ticket_subject": "Product issue",
  "ticket_description": "Details of the issue...",
  "ticket_custom_fields": {
    "order_number": "ORD-12345",
    "product_name": "Widget Pro",
    "browser": "Chrome 120"
  }
}

Custom fields can be referenced by:

  • Field slug: {"order_number": "ORD-12345"}
  • Field ID: {"D5": "ORD-12345"} (where 5 is the custom field ID)
  • Flat format: ticket_custom_fields__order_number=ORD-12345

How the Webhook Handles Users

Existing User (Email Matches)

If the email matches an existing user:

  • Open ticket exists — The webhook creates a reply on the most recent open ticket.
  • No open ticket — A new ticket is created for the user.
  • Closed ticket — The ticket is reopened and a reply is added (if the “disable closed ticket reply” setting allows it).

New User (Email Not Found)

If the email doesn’t match any existing user:

  • A new guest user is created with the provided name and email.
  • A new ticket is created for the guest user.
  • If guest registration is disabled in settings, the webhook returns an error.

Response Format

Success

{
  "success": true,
  "message": "Ticket creation success."
}

Validation Errors

{
  "success": false,
  "message": "User Email is required."
}
Error MessageCause
“User Email is required.”user_email field missing
“User email is invalid.”user_email is not a valid email format
“Ticket Subject is required.”ticket_subject field missing
“Ticket Description is required.”ticket_description field missing
“User not found.”Email doesn’t exist and guest creation is disabled

WooCommerce Webhook Compatibility

The incoming webhook automatically detects WooCommerce order webhook payloads and extracts:

  • Customer name and email from billing details.
  • Order ID.
  • Store metadata.

This allows you to create support tickets from WooCommerce order events without custom field mapping.

Security

  • Token authentication — The hash token in the URL serves as the authentication mechanism. Keep it secret.
  • Input sanitization — All fields are sanitized before processing.
  • File validation — Attachment URLs are validated and dangerous file types (.php, .js, .sh, .bash, .cgi) are blocked.
  • Secure filenames — Downloaded files are stored with randomized names.
  • No nonce required — Unlike AJAX endpoints, webhooks don’t require WordPress nonces (the hash token replaces this).

Integration Examples

Contact Form (Generic)

Point your form’s webhook/notification URL to the Support Genix webhook. Map form fields to:

  • Email field → user_email
  • Name field → user_first_name
  • Subject field → ticket_subject
  • Message field → ticket_description

Monitoring/Alerting Tools

Configure your monitoring system (Uptime Robot, Pingdom, etc.) to send alerts to the webhook URL. Set a fixed subject like “Server Alert” and include the alert details in the description.

Zapier / Make (Integromat)

Use an HTTP POST action to send data to the webhook URL. Map your trigger data to the required fields.

Custom Application

From any backend application:

import requests

response = requests.post(
    "https://yoursite.com/?sgwebhook=1&hash=YOUR_TOKEN",
    json={
        "user_email": "[email protected]",
        "ticket_subject": "Automated ticket",
        "ticket_description": "Created from our internal system."
    }
)
print(response.json())

Troubleshooting

  • Webhook not creating tickets? Check the debug log for processing errors.
  • Getting 404? Verify the webhook URL is correct and the webhook is Active.
  • “User not found” error? Enable guest ticket creation in Settings or ensure the user exists.
  • Attachments not downloading? Check that the file URLs are publicly accessible and not behind authentication.
  • Custom fields not saving? Verify the field slugs or IDs match your configured custom fields exactly.

Related Docs

Last updated on March 15, 2026

Was this article helpful?

PREVIOUS

WPForms Integration

NEXT

FluentCRM Integration with Support Genix

Powered by Support Genix