Directly Help Desk API

Access

All help desk APIs require a valid Directly API token. After connecting Directly to your helpdesk, you can request an API token or invalidate and replace an existing token by clicking "Generate new token" in the Helpdesk Integration tab of your Directly admin panel.

Pass the API token as a parameter as described below or in a request header parameter as follows:

ApiToken:YOUR-API-TOKEN

Endpoints

Save Question

Create a new question on Directly, associated with a specific help desk case/ticket ID.

Request

POST https://[subdomain].directly.com/helpDesk/saveQuestion

Note: subdomain will be provided by Directly.

Parameters

Response

Status 200
{
  "question": {
    "id": 218312,
    "url": "https://[subdomain].directly.com/p/subdomain-sample-question-detailed-description-218312",
    "status": "0 answers",
    "isEscalated": false,
    "answers": []
  }
}

Error

Status 500

Sample

curl https://[subdomain].directly.com/helpDesk/saveQuestion \
--header ApiToken:YOUR-API-TOKEN \
--data "text=sample question detailed description" \
--data emailAddress=user@example.com \
--data "fullname=Joe User" \
--data helpDeskId=123456789 \
--data "metadata[Operating+System]=iOS+8.1" \
--data "metadata[Browser]=Safari" \
--data "metadata[Account][Creation Date]=2016-06-06 11:34:00" \
--data "metadata[Account][Worth]=1000000"
In this example, experts will see the operating system and browser information, but not the hidden account information.

Close Question

Immediately close the Question in Directly, associated with a specific help desk case/ticket ID.

Request

POST https://[subdomain].directly.com/helpDesk/closeQuestion

Note: subdomain will be provided by Directly.

Parameters

Response

Status 200
{
  "question": {
    "id": 218312,
    "url": "https://[subdomain].directly.com/p/subdomain-sample-question-detailed-description-218312",
    "status": "CLOSED"
  }
}

Error

Status 500

Sample

curl https://[subdomain].directly.com/helpDesk/closeQuestion \
--header ApiToken:YOUR-API-TOKEN \
--data helpDeskId=123456789