API documentation

Introduction

This guide will walk you through the process of setting up Delighted using the REST API.

Authentication

To use the Delighted API, you’ll need a private API key that is linked to your account. Please contact your account admin to obtain your Delighted API key.

Be sure to keep this API key private. All API requests must be made over HTTPS and are authenticated via HTTP Basic Auth. Use your API key as the username and leave the password blank.

HTTP status codes

All endpoints use conventional HTTP status codes. The specific codes returned are listed below with a brief explanation.

Code Description
200 Indicates that the request was successful.
201 Indicates that the request was successful and a new resource was created.
401 Indicates the API key was invalid.
406 Indicates that the format of the request was not correct. Endpoints only support JSON. You can either pass the Accept: application/json header or suffix the request URL with .json.
422 Indicates the request was invalid. This usually means some of the required parameters were missing. Information about the specific errors will be returned in the response.
500 Indicates that we are having trouble on our end.
503 Indicates that we are currently down for maintenance.

Below is an example 422 response. This illustrates how errors are provided for specific attributes of the resource (in this case, a Person):

{
  "status": 422,
  "message": "Unprocessable Entity",
  "errors": {
    "email": ["can't be blank", "is invalid"],
    "name": ["must be less than 255 characters"]
  }
}