You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Home > HappyFox Service Desk > Developers > Incident APIs > API to create an Incident in Service Desk
API to create an Incident in Service Desk
print icon
API Endpoint {account_url}/api/v2/public/incidents/
Method POST
Response Data Incident Creation

 

Create Incident

  • This endpoint is used to create incident(s) in Service desk.

Parameters

Parameter Required Description
team Yes Team to which the incident should be assigned to
status No Status of the incident
priority No Priority of the incident
impact No Impact of the incident
urgency No Urgency of the incident
assignment_group No Assignment group to which the incident should be assigned to
asset_id No Asset ID of the asset which should be associated to the incident
requester_id No Requester ID of the requester who raised the incident (either requester id or email or phone is required)
requester_email No Email address of the requester who raised the incident (either requester id or email or phone is required)
requester_phone No Phone number of the requester who raised the incident (either requester id or email or phone is required)
requester_name No Name of the requester who raised the incident
requester_group No Requester group to which the requester is associated
assignee No Assignee of the incident
due_by No Due by date and time of the incident
subject Yes Subject of the incident
description Yes Description of the incident
resolution No Resolution of the incident
description_attachments No

Attachments of the description

resolution_attachments Yes Attachments of the resolution
relate_to     Yes Dict with related ticket type and respective ticket_id 
skip_mandatory_requester_custom_fields_check No Skip mandatory check for requester custom fields
skip_mandatory_ticket_custom_fields_check No

Skip mandatory check for incident custom fields

 

Sample Request

{
    "team": 2,
    "subject": "Internet is down",
    "description": "Internet is down.",
    "requester_id": 3,
    "requester_custom_fields": {
        "2": "New",
        "3": "Old"
    },
    "custom_fields": {
        "1": "Test"
    }
}

Sample Response

Success Response: Status code: 200

{
    "id": 116,
    "display_id": "#INC00000116",
    "subject": "Internet is down",
    "resolution": null,
    "description": {
        "html": "<html><head><meta charset=\"utf-8\"></head><body>Internet is down. please check ASAP</body></html>",
        "id": 173,
        "edited_agent": null,
        "last_edited": null,
        "text": "Internet is down. please check ASAP",
        "attachments": [],
        "kb_articles": []
    },
    "created_by": {
        "type": "requester",
        "id": 3,
        "name": "John"
    },
    "subscribers": [],
    "assignee": null,
    "assignment_group": null,
    "team": {
        "id": 2,
        "name": "IT Support"
    },
    "status": {
        "id": 7,
        "name": "New",
        "description": "",
        "team": 2
    },
    "impact": {
        "id": 2,
        "name": "Medium",
        "order": 2,
        "is_default": true
    },
    "urgency": {
        "id": 2,
        "name": "Medium",
        "order": 2,
        "is_default": true
    },
    "priority": {
        "id": 1,
        "name": "Medium",
        "description": "",
        "help_text": ""
    },
    "requester": {
        "id": 3,
        "name": "John",
        "email": "john.p@happyfox.com",
        "primary_phone": null,
        "created_at": "2023-05-08T08:12:05Z",
        "updated_at": "2023-05-08T10:05:24Z"
    },
    "custom_fields": [
        {
            "id": 5,
            "name": "Host",
            "type": "t",
            "value": "High"
        },
        {
            "id": 6,
            "name": "Severity",
            "type": "t",
            "value": null
        }
    ],
    "created_at": "2023-06-06T09:18:08Z",
    "last_updated_at": "2023-06-06T09:18:08Z",
    "last_modified_at": "2023-06-06T09:18:08Z"
}

 

Feedback
0 out of 0 found this helpful

scroll to top icon