DESKIE API
Agents
Create an agent
POST  |  https://[domain].deskie.io/api/staff.json
Create a new agent.
Parameters
Request
{
  "staff" : {
    "staff_email" : "[email protected]",
    "staff_full_name" : "Staff full name",
    "staff_signature" : "Staff signature"
  }
}
Response
{
  "staff" : {
    "staff_id" : 200,
    "staff_email" : "[email protected]",
    "staff_full_name" : "Staff full name",
    "staff_signature" : "Staff signature",
    "thumbnail" : "",
    "active" : false,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "staff": { "staff_email":"[email protected]", "staff_full_name":"Staff full name", "staff_signature":"Staff signature" }}' https://[domain].deskie.io/api/staff.json
Get a list of agents
GET  |  https://[domain].deskie.io/api/staff.json
Get a list of agents
Parameters
Response
{
    "0" : {
      "staff" : {
        "staff_id" : 200,
        "staff_email" : "[email protected]",
        "staff_full_name": "John D",
        "staff_signature" : "Staff signature for email cases",
        "staff_signature_chat" : "Staff signature for chats",
        "staff_working_hours" : "working hours depend on the case group",
        "default_email": "",
        "thumbnail" : "",
        "active" : false,
        "created_at" : Mon, 05 May 2024 00:15:17 +0100,
        "updated_at" : Tue, 23 Dec 2024 10:55:23 +0100,
        "staff_access_level": {
          "type": "full",
            "full": {
              "all": 1
            }
        }, 
        "status" : "online", // deprecated parameter, which is currently used by Deskie mobile applications, but will be phased out in the future → please refer to status_id 
        "status_id": 1,
        "role_id": 1471
      }
    },
    "1" : {
      "staff" : {
        "staff_id" : 210,
        "staff_email" : "[email protected]",
        "staff_full_name": "Helen K",
        "staff_signature" : "Staff 2 signature for email cases",
        "staff_signature_chat" : "Staff 2 signature for chats",
        "staff_working_hours": {
          "monday": [
            {
              "start": "9:00", 
              "end": "18:00"
            }
          ],
          "wednesday": [
            {
              "start": "9:00", 
              "end": "18:00"
            }
          ],
          "friday": [
            {
              "start": "9:00", 
              "end": "18:00"
            }
          ], 
          "sunday": [
            {
              "start": "10:00", 
              "end": "15:00"
            }
          ]
        },
        "default_email": "",
        "thumbnail" : "",
        "active" : true,
        "created_at" : Mon, 05 May 2024 00:15:42 +0100,
        "updated_at" : Tue, 23 Dec 2024 10:55:41 +0100,
        "staff_access_level": {
          "type": "full",
            "full": {
              "all": 1
            }
        }, 
        "status" : "offline", // deprecated parameter, which is currently used by Deskie mobile applications, but will be phased out in the future → please refer to status_id 
        "status_id": 2,
        "role_id": 1478,
      }
    },
    "total_count":10
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/staff.json?limit=50&page=2
Get a list of agent roles
GET  |  https://[domain].deskie.io/api/staff_roles.json
Get a list of agent roles.
Response
{
    "0": {
        "staff_roles": {
            "role_id": 3,
            "role": "First-line support"
        }
    },
    "1": {
        "staff_roles": {
            "role_id": 9,
            "role": "Second-line support"
        }
    },
    "2": {
        "staff_roles": {
            "role_id": 53,
            "role": "Top management"
        }
    },
    "count": 3
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/staff_roles.json
Get a list of agent statuses
GET  |  https://[domain].deskie.io/api/staff_statuses.json
Get a list of agent statuses.
Response
{
    "0": {
        "staff_statuses": {
            "status_id": 1,
            "status": "Online",
            "active": true
        }
    },
    "1": {
        "staff_statuses": {
            "status_id": 3,
            "status": "Without chats",
            "active": true
        }
    },
    "2": {
        "staff_statuses": {
            "status_id": 113,
            "status": "Lunch",
            "active": false
        }
    },
    "3": {
        "staff_statuses": {
            "status_id": 120,
            "status": "Demo",
            "active": false
        }
    },
    "4": {
        "staff_statuses": {
            "status_id": 2,
            "status": "Offline",
            "active": true
        }
    },
    "count": 5
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/staff_statuses.json
View an agent
GET  |  https://[domain].deskie.io/api/staff/[id].json
View data of a specific agent.
Response
{
  "staff" : {
    "staff_id" : 210,
    "staff_email" : "[email protected]",
    "staff_full_name": "Helen K",
    "staff_signature" : "Staff 2 signature for email cases",
    "staff_signature_chat" : "Staff 2 signature for chats",
    "staff_working_hours": {
      "monday": [
        {
          "start": "9:00", 
          "end": "18:00"
        }
      ],
      "wednesday": [
        {
          "start": "9:00", 
          "end": "18:00"
        }
      ],
      "friday": [
        {
          "start": "9:00", 
          "end": "18:00"
        }
      ], 
      "sunday": [
        {
          "start": "10:00", 
          "end": "15:00"
        }
      ]
    },
    "default_email": "",
    "thumbnail" : "",
    "active" : true,
    "created_at" : Mon, 05 May 2024 00:15:42 +0100,
    "updated_at" : Tue, 23 Dec 2024 10:55:41 +0100,
    "staff_access_level": {
      "type": "full",
        "full": {
          "all": 1
        }
    }, 
    "status" : "offline", // deprecated parameter, which is currently used by Deskie mobile applications, but will be phased out in the future → please refer to status_id 
    "status_id": 2,
    "role_id": 1478,
    }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/staff/200.json
Edit an agent
PUT  |  https://[domain].deskie.io/api/staff/[id].json
Edit data of a specific agent.
Parameters
Request
{
  "staff" : {
    "staff_full_name" : "Staff full name changed"
  }
}
Response
{
  "staff" : {
    "staff_id" : 200,
    "staff_email" : "[email protected]",
    "staff_full_name" : "Staff full name changed",
    "staff_signature" : "Staff signature",
    "thumbnail" : "",
    "active" : false,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "staff": { "staff_full_name":"Staff full name changed" }}' https://[domain].deskie.io/api/staff/200.json
Deactivate an agent
PUT  |  https://[domain].deskie.io/api/staff/[id]/disable.json
Deactivate an agent.
Parameters
Request
{
  "staff" : {
    "replace_staff_id" : 300
  }
}
Response
{
  "staff" : {
    "staff_id" : 200,
    "staff_email" : "[email protected]",
    "staff_full_name" : "Staff full name changed",
    "staff_signature" : "Staff signature",
    "active" : false,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "staff": { "replace_staff_id":"300" }}' https://[domain].deskie.io/api/staff/200/disable.json
Activate an agent
PUT  |  https://[domain].deskie.io/api/staff/[id]/enable.json
Activate an agent.
Response
{
  "staff" : {
    "staff_id" : 200,
    "staff_email" : "[email protected]",
    "staff_full_name" : "Staff full name changed",
    "staff_signature" : "Staff signature",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/staff/200/enable.json
Delete an agent
DELETE  |  https://[domain].deskie.io/api/staff/[id].json
Delete an agent.
Parameters
Request
{
  "staff" : {
    "replace_staff_id" : 300
  }
}
Response
HTTP Status: 200 OK
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/staff/200.json