Developers

Changelog

Release: 2020/02/14

New attribute isClaimed at GET /v1/questions/{uuid}

New attribute on GET /v1/questions/{uuid} that it's intended to indicate that the question has already been claimed by an expert.

Release: 2019/11/25

New endpoint to provide feedback on Automatic Answers

New Automatic Answers feature: POST /v1/automaticAnswers allows you to retrieve an Automatic Answer for a given query. POST /v1/automaticAnswers/{uuid}/feedback allows you to provide feedback on an existing Automatic Answer

Note that this replaces the old /v1/content endpoint.

Release: 2019/11/14

New endpoint to retrieve predictive routing results for a question

POST /v1/predictiveRouting allows you to retrieve predictive routing results for a specified question text without actually opening the question to experts.

Release: 2019/08/05

New endpoint to retrieve content for a question

POST /content allows you to retrieve answer content for a specified question text without actually opening the question to experts.

Release: 2019/05/28

New endpoint to close a question

Questions submitted via an API integration can now be closed with a request to /questions/{uuid}/close. Check the reference docs for more details.

Release: 2019/01/04

New endpoint to send files for CX training

You can upload files with data to train your CX solutions. Check the reference docs for more details.

Release: 2018/01/03

New endpoint to expire questions

You can expire a question by making a request to /questions/{uuid}/expire. This will close the question for further interactions and it won't be rerouted. Check the reference docs for more details.

Release: 2018/09/17

Message body in html

When querying messages, an extra bodyHtml field is included. Messages are returned by endpoints such as GET /v1/messages and GET /v1/questions/{uuid}. The new field is a rendering of the body field in html using Directly's standard message rendering. But for certain company configurations, it uses Markdown.

Release: 2018/06/25

Support for automated responses on new questions

It's now possible to use a classification obtained from GET /v1/classifications as an input to create a new question at POST /v1/questions. This causes an automatic response to be selected and added to the conversation. Check the reference docs for more details.

Release: 2018/06/11

Support for classification of text

It's now possible to test if a given question text has any predicted class, according to our auto response system, and the confidence level. Check the reference docs for more details.

Release: 2018/03/18

Support for Automated Responses

If you have Automated Responses enabled for your company, you can use the Messaging API to automatically get them and interact with them.

Check for response type AutoResponse and call POST /responses/{uuid}/confirmAutoResponse to accept or reject an AutoResponse.

Check the reference docs for more details.

Support for Agent Endpoints

POST /agents/messages allows you to add a comment to an existing 1:1 question as an agent.

For any 1:1 question, the above endpoint will allow you to reclaim the question from an expert and continue the conversation as an agent.

Release: 2018/02/04

Added new api to support user "Forget Me" requests

You can now POST these requests to /users/forget

Release: 2017/11/28

Add messages to questions before experts respond

Now you can add messages to a question before it has any responses.

Make a request to the POST /messages endpoint passing the questionUuid. In the current implementation the message is appended to the question body. If there's already a response, the message is added to that response instead. In both cases the method returns a 201 on success.

Check the reference docs for more details.

Release: 2017/10/02

Bug fixes

  • Improved documentation and error message for POST /responses/{uuid}/rate to explain better which values are accepted for the rating parameter.

Release: 2017/9/5

Support for external IDs

You can link created messages with your own tracking system (i.e. Zendesk, Salesforce or other). Pass the id in your tracking system as an externalId param to POST /messages. Check the reference docs for more details.

Release: 2017/8/21

New endpoints

  • PUT /questions/{uuid}: Updates the text of an existing question.
  • PUT /messages/{uuid}: Updates the text of an existing message.

Check the reference docs for more details on each call.

Support for external IDs

You can link created questions with your own tracking system (i.e. Zendesk, Salesforce or other). Pass the id in your tracking system as an externalId param to POST /questions. Check the reference docs for more details.

Bug fixes

  • Improved performance of POST /questions.
  • Return descriptive error when trying to call POST /questions/{uuid}/reroute on a rerouted question.

Release: 2017/8/7

Bug fixes

  • Improved error handling. Added more descriptive messages for some scenarios.
  • Improved documentation.
  • https://api.directly.com/ includes link to current documentation.

Release: 2017/7/24

Bug fixes

  • GET /questions/{uuid} response now includes data.state.numResponses instead of data.state.isAnswered

Release: 2017/7/10

List questions

The GET /questions endpoint returns a list of questions with a more condensed format, without the conversation section, which includes the exchange of messages between users and experts.

Error responses

Consolidated the documentation to include the possible status codes returned in case of error responses. Return more descriptive messages under certain errors.

Bug fixes

  • POST /questions now save the metadata object passed as parameter.
  • avatarUrl has a valid URL for experts, pointing to their profile picture. It is null for the user who asked the question.
  • "Try it" feature in documentation now works.
  • companyTag is not a required parameter in any of the endpoints.

Release: 2017/6/26

HTTPS support

Added https support. We'll be supporting both http and https for a transition period, but http use will be eventually deprecated.

New endpoints

POST /question/{uuid}/reroute

A user reroutes a question to an agent.

POST /question/{uuid}/reviewMarkAsResolved

When experts mark a question as resolved from the dashboard, Directly adds a MARK_AS_RESOLVED_MESSAGE to the list of messages. Users can now approve or reject that. They do it by calling this endpoint.

POST /response/{uuid}/markAsRead

Users can mark all messages in a response as read by calling this endpoint. Messages that are read won't trigger notifications.

Check the reference docs for more details.

List of potential experts

When a question is created, Directly adds a NOTIFYING_EXPERTS_SYSTEM_MESSAGE. That message contains a list of experts who are notified and could potentially engage with this question and the time (in milliseconds) it took experts to answer the last question.

This information can be displayed to the user while they wait for experts to answer.

"potentialExperts": {
  "experts": [
    {
      "uuid": "string",
      "name": "string",
      "avatarUrl": "string",
      "isOriginalPoster": false,
      "isExpert": false,
      "reputation": {
        "numberOfAnswers": "string",
        "helpfulnessScore": "string"
      },
      "lastActiveDate": "2017-06-21T19:59:28.716Z",
      "isOfficial": false,
      "isCertified": false,
      "isElite": false
    }
  ],
  "lastResponseTimeInMillis": "string"
}

Websockets

API clients can subscribe to a websocket channel to receive notifications when there's an update in a question. Whenever there's an update, the client should make a request to GET /questions/{uuid} to retrieve the updated information.

Check the reference docs for more details.

Release: 2017/6/12

Added API version to the URL

We added the API major version to the URL. The base URL is now https://api.sandbox.directly.com/v1

OAuth Authentication

1) /oauth/auth, oauth/token, and oauth/logout endpoints added (note in the initial documentation, if first endpoint was called /oauth/authenticate) 2) Optional scope parameter added to oauth/token endpoint (this parameter was not listed in the initial documentation)

New endpoints

GET /questions

Retrieves the list of questions for a specific user. See the reference documentation for this endpoint.

This endpoint accepts a lastChecked param to retrieve questions modified only after a specific date.

POST /response/{uuid}/rate

Adds a user rating to a response. See the reference documentation for this endpoint.

The list of accepted values for the rating parameter will be included in the question object: question.ratingSystem.values If a different value is passed, the method will return a 400 response.

POST /response/{uuid}/accept

Accepts a response as the answer to the user question. See the reference documentation for this endpoint.

Bugfixes

  • question.isExpert contains accurate information now.
  • Fixed some error response codes.