User

A User is a person opening a ticket on the Helpdesk.

Read All users

URL <base_uri> / <response_format> /users/?size=<size>&page=<page>
HTTP Method GET
Response Data Paginated List of User
Additional Params

size: number of items per page (minimum 10, maximum 50, default 10)

page: the number of the page required

Data Structure

JSON

                    
    [
        {
            "page_info": {
                "count": 2, 
                "last_index": 2, 
                "page_count": 1, 
                "start_index": 1, 
                "end_index": 2
            }, 
            "data": [
                {
                    "name": "Scott", 
                    "pending_tickets_count": 0, 
                    "email": "scott@example.com", 
                    "tickets_count": 0, 
                    "id": 4, 
                    "custom_fields": [
                        {
                            "id": 1, 
                            "type": "text", 
                            "name": "CompanyName", 
                            "value": "Example Business", 
                            "visible_to_staff_only": true
                        }
                    ]
                }, 
                {
                    "name": "Martin", 
                    "pending_tickets_count": 0, 
                    "email": "martin@example.com", 
                    "tickets_count": 0, 
                    "id": 5, 
                    "custom_fields": [
                        {
                            "id": 1, 
                            "type": "text", 
                            "name": "CompanyName", 
                            "value": "Example Business", 
                            "visible_to_staff_only": true
                        }
                    ]
                }
            ]
        }
    ]
                    
                

Read One User By ID

Retrieve details of a user using their ID.

URL <base_uri> / <response_format> /user/<id>/
HTTP Method GET
Response Data user

Data Structure

JSON

                    
    [
        {
            "name": "Scott", 
            "pending_tickets_count": 0, 
            "email": "scott@example.com", 
            "tickets_count": 0, 
            "id": 4, 
            "custom_fields": [
                {
                    "id": 1, 
                    "type": "text", 
                    "name": "CompanyName", 
                    "value": "Example Business", 
                    "visible_to_staff_only": true
                }
            ]
        }    
    ]
                    
                

Read One User By Email

Retrieve details of a user using their email address.

URL <base_uri> / <response_format> /user/<email>/
HTTP Method GET
Response Data user

Data Structure

JSON

                    
    [
        {
            "name": "Scott", 
            "pending_tickets_count": 0, 
            "email": "scott@example.com", 
            "tickets_count": 0, 
            "id": 4, 
            "custom_fields": [
                {
                    "id": 1, 
                    "type": "text", 
                    "name": "CompanyName", 
                    "value": "Example Business", 
                    "visible_to_staff_only": true
                }
            ]
        }
    ]
                    
                

Bulk Create or Update Users

Retrieve details of a user using their email address.

URL <base_uri> / <response_format> /users/
HTTP Method POST
Request Data

One or more users along with their contact fields (if any required).

Note: Custom Fields needs to be translated to their respective IDs before posting to this end point. If the email id that you are passing already exists, the contact will be updated with the new details else will be created new.

Response Data List of email ids whose updates have been succeeded and failed.

Data Structure

Request JSON

                    
    [{
        "name": "John Smith",
        "email": "John.Smith@example.com"
    }, {
        "name": "Scott",
        "email": "scott@example.com"
    },{
        "name": "James",
        "email": "james@exampl"
    }]
                    
                

Response JSON

                    
    [
        {
        "email": "John.Smith@example.com",
        "success": true,
        "id": 4
        },
        {
        "email": "scott@example.com",
        "success": true,
        "id": 5
        },
        {
        "email": "james@exampl",
        "success": false,
        "error": [
            {
            "field": "email",
            "errors": [
                "Enter a valid e-mail address."
            ]
            }
        ]
        }
    ]
                    
                

Read All Contact Groups

Retrieve details of a user using their email address.

URL <base_uri> / <response_format> /contact_groups/
HTTP Method GET
Response Data List of contact groups

Data Structure

JSON

                    
    [
        {
            "tagged_domains": "example.com,sample.com", 
            "id": 1, 
            "name": "Example Group", 
            "description": "This is an example group created for the purpose API Example."
        }, 
        {
            "tagged_domains": "happyfox.com", 
            "id": 2, 
            "name": "HappyFox Group", 
            "description": "A group which automatically enlists all newly created contacts to HappyFox."
        }
    ]
                    
                

Read One Contact Group by ID

URL <base_uri> / <response_format> /contact_group/ <id>
HTTP Method GET
Response Data Contact group

Data Structure

JSON

                    
    {
        "tagged_domains": null,
        "id": 2,
        "name": "example.com",
        "description": "",
        "contacts": [
            {
                "access_tickets": false,
                "id": 4,
                "email": "abc@company1.com"
            },
            {
                "access_tickets": false,
                "id": 5,
                "email": "abc@company2.com"
            }
        ]
    }
                    
                

New Contact Group

Create a contact group

URL <base_uri> / <response_format> /contact_groups/
HTTP Method POST
Request Data Create contact group
Response Data Contact group

Data Structure

Request JSON

                    
    {
        "name": "Tenmiles",
        "description": "Tenmiles Contact Group",
        "tagged_domains": "tenmiles.com"
    }
                    
                

Response JSON

                    
    [
        {
            "tagged_domains": "tenmiles.com",
            "id": 5,
            "name": "Tenmiles",
            "description": "Tenmiles Contact Group"
        }
    ]
                    
                

Edit Contact Group

URL <base_uri> / <response_format> /contact_group/ <id>
HTTP Method POST
Request Data Edit contact group
Response Data Modified contact group

Data Structure

Request JSON

                    
    {
        "name": "TenmilesTM",
        "description": "Tenmiles Contact Group - Editing",
        "tagged_domains": "tenmiles.com"
    }
                    
                

Response JSON

                    
    [
        {
            "tagged_domains": "tenmiles.com",
            "id": 5,
            "name": "TenmilesTM",
            "description": "Tenmiles Contact Group - Editing"
        }
    ]