LIST SUBSCRIBERS

Example URI: GET https://api.retently.com/api/retently/nps/customers

a) URI Parameters

  • currentPage: string (optional) Example: 1. The current page number. Default 1
  • limit: string (optional) Example: 20. The items limit. Default 20
  • sort: string (optional) Example: 'createdDate'. The sort option. Use ‘-’ for DESC. Default ‘-createdDate’

b) Request

Headers

Content-Type: application/json

Authorization: api_key={{api_key}}

c) Response:  200

Headers

Content-Type: application/json

Body

{

   "message": "success",

   "code": 200,

   "data": { … }

}

__________________________________________________________________

CREATE SUBSCRIBERS

Max number of subscribers by default is 100 per request.
Example URI: POST https://api.retently.com/api/retently/nps/customers

a) Parameters (with examples)

  • subscribers: (required, array) - An array of subscribers
  • email: john.smith@example.com (required, string) - Email address
  • first_name: john (required, string) - First name
  • last_name: smith (required, string) - Last name
  • company: ACME (required, string) - Company name
  • tags: ["tag1"] (optional, array) - An array of tags

b) Request

Headers

Content-Type: application/json

Authorization: api_key={{api_key}}

Body

{

   "subscribers": [

       {

           "email": "john.smith@example.com",

           "last_name": "smith",

           "first_name": "jon",                    

           "company": "ACME",

           "tags": ["tag1","tag2","tag3"]

       }

    ]

}

c) Response:  200

Headers

Content-Type: application/json

Body

{
    “message”: “Subscribers was successfully added”,
    “code”: 200,
    “data”: {
    "john.smith@example.com”: {
            “status”: “created”
        }
    }
}

__________________________________________________________________

CREATE SUBSCRIBERS & SEND SURVEY

Max number of subscribers by default is 100 per request.
Example URI: POST https://api.retently.com/api/retently/nps/customers?next=send

a) Parameters (with examples)

  • subscribers: (required, array) - An array of subscribers
  • email: john.smith@example.com (required, string) - Email address
  • first_name: john (required, string) - First name
  • last_name: smith (required, string) - Last name
  • company: ACME (required, string) - Company name
  • tags: ["tag1"] (optional, array) - An array of tags

b) Request

Headers

Content-Type: application/json

Authorization: api_key={{api_key}}

Body

{

   "subscribers": [

       {

           "email": "john.smith@example.com",

           "last_name": "smith",

           "first_name": "jon",                    

           "company": "ACME",           "tags": ["tag1","tag2","tag3"]

       }

    ]

}

c) Response:  200

Headers

Content-Type: application/json

Body

{
    “message”: “Subscribers was successfully added”,
    “code”: 200,
    “data”: {
    "john.smith@example.com”: {
            “status”: “created”,
            “send_status”: “sending”
        }
    }
}

__________________________________________________________________

GET LATEST SCORE

Example URI: GET https://api.retently.com/api/retently/nps/score

a) Request

Headers

Content-Type: application/json

Authorization: api_key={{api_key}}

b) Response:  200

Headers

Content-Type: application/json

Body

{

 "message": "success",

 "code": 200,

 "data": {

   "nps": 100,

   "promoters": 100,

   "passives": 0,

   "detractors": 0,

   "promotersCount": 1,

   "passivesCount": 0,

   "detractorsCount": 0,

   "totalResponses": 1

 }

}

__________________________________________________________________

GET LATEST RESPONSE  

Example URI: GET https://api.retently.com/api/retently/nps/customers/response

a) URI Parameters

  • currentPage: string (optional) Example: 1. The current page number. Default 1
  • limit: string (optional) Example: 20. The items limit. Default 20
  • sort: string (optional) Example: 'DESC'. The sort option. Use ‘ASC’ for ascending. Default ‘DESC’
  • email: array (optional) Example: 'email[0]=john.doe@example.com'. Array of emails.

b) Request

Headers

Content-Type: application/json

Authorization: api_key={{api_key}}

c) Response: 200

Headers

Content-Type: application/json

Body

{

   "message": "success",

   "code": 200,

   "data":

       "subscribers": [ … ],

       "currentPage": "1",

       "totalNumberOfPages": 10,

       "limit": "10",

       "sortBy": "DESC",

       "total": 20         

}

__________________________________________________________________

IMPORTANT!

Retently gives you the possibility to run unlimited API calls. However, we've set a limit of maximum 10 requests per second. This is a needed measure to avoid API calls abuse. If our system detects more than 10 requests per second, then your API calls will be blocked.

The API feature is available starting with the Premium subscription. For more details please check Retently's Pricing page. Thank you!

Did this answer your question?