# API: Create ticket

# addTicket

Opens new support ticket

# Required parameters

Parameter Description
name Name of client to open ticket for
subject Ticket subject
body Ticket message
email Email address of person opening ticket

# Optional parameters

Parameter Description
dept_id Department ID
client_id Existing client ID, if used NAME and EMAIL can be omitted
isinternal Set to 1 to mark ticket as internal
status Set initial ticket status to this value, one of allowed ticket statused (configured in HostBill)
request_type Change ticket request type, one of 'General','Incident','Problem','Task','Question'
priority Set initial ticket priority, 0 lowest 3 highest
cc Comma separated list of emails to notify about ticket
notes Note to be auto-added to ticket upon creation
owner_id Staff member ID to be assigned to ticket
useclientname Set to 1 to use registered client name and not staff/api name
asclient Set to 1 to open ticket as client, not as staff
attachments An array with attachments. Array key is filename and value is base64 encoded file

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=addTicket&name=NAME&subject=SUBJECT&body=BODY&email=EMAIL

# PHP Samples

# Response

{
    "success": true,
    "ticket_id": 719510,
    "call": "addTicket",
    "server_time": 1323791096,
    "info": [
        "New ticket has been created"
    ]
}
Last Updated: 7/10/2023, 2:30:05 PM