Skip to main content
Version: 2.0

Getting Started

Calling the API​

There are several ways you can make calls to the Receptiviti API. How you choose to do so is dependent upon your experience and comfort level in the different tools available. Some of the most commonly used methods are found below.

You can access our developer documentation through our API Reference page, found here.

The Receptiviti CSV Upload Tool​

This is a basic user interface we provide where you can upload a CSV file of text to have it scored and returned as a separate CSV. This is an easy way for people with no programming experience to use the API. Note that you will need an account to use the CSV upload tool. You can initiate an account by going here.

Further details about using the CSV upload tool can be found here.

Python​

To make a single text sample call to the Receptiviti API with Python, run the following code, replacing <YOUR_API_KEY> and <YOUR_API_SECRET> with your actual credentials (keep the quotes around them), as well as adding your text sample to the "text" field. The request body is a list, so you can send several samples at once:

import json
import requests

url = 'https://api.receptiviti.com/v2/analyze/written'
api_key = '<YOUR_API_KEY>'
api_secret = '<YOUR_API_SECRET>'
data = [{
'request_id': 'req-1',
'text': 'my text sample....'
}]
resp = requests.post(url, auth=(api_key, api_secret), json=data)
print(json.dumps(resp.json(), indent=4, sort_keys=True))
note

The example above uses the default written norming context. The other default norming context is spoken. Alternatively, you can create your own norming contexts, which are available in your account once you create them. More information on norming and norming contexts is here.

Without writing code​

To try a request without writing code, open the API reference, choose an endpoint, and use its request panel. Requests to the sandbox endpoint don't use your word allotment.

If you use Postman, you can import our OpenAPI spec to set up every endpoint automatically.

cURL​

To use cURL to make a single text sample call to the Receptiviti API, you can use the following syntax in your Terminal, replacing <YOUR_API_KEY>:<YOUR_API_SECRET> with your actual credentials, as well as adding your text sample to the "text" field. The request body is a list, so you can send several samples at once:

curl --location --request \
POST 'https://api.receptiviti.com/v2/analyze/written' \
-u <YOUR_API_KEY>:<YOUR_API_SECRET> \
--header 'Content-Type: application/json' \
--data-raw '[{
"request_id": "req-1",
"text": "my text sample...."
}]'
note

The example above uses the default written norming context. The other default norming context is spoken. Alternatively, you can create your own norming contexts, which are available in your account once you create them. More information on norming and norming contexts is here.

For details on every endpoint, see the API reference. To learn how to interpret the scores in a response, see Frameworks.