Speaky API

What can I do with API?

You can generate custom links for Voice Pages or import feedback data for a chosen period to third-party systems.

Getting the access token

Generate the token HERE

Once generated, copy the token and use it in your future projects.

Please contact your representative to get access to API first.

Preparation

  • Create a set of parameters to send via your link HERE. The parameters are sent as key/vlaue pairs and you are creating a key.

  • Create a new Voice Page or open an existing one.

  • Assign a set of tags to a page via the Tags screen.

API Request

Method: POST

Endpoint: https://speaky.instreamatic.com/api/v1/product/$PRODUCT_ID/link

Headers:

Authorization: $ACCOUNT_TOKEN 
Content-Type: application/json

Body:

{"tag1":"value1","tag2":"value2"}

Where,

  • $ACCOUNT_TOKEN is your access token

  • $PRODUCT_ID is an ID of a Voice Page. For example, in https://feedback.instreamatic.com/main/manage/product/343/main, 343 is the ID.

  • tag - one of the tags assigned to the page. You can send up to 10 different tags within one request.

  • value - value for a tag.

API Response

{
  "code": 200,
  "message": null,
  "response": {
    "id": 21,
    "link": "https://feedback.instreamatic.com/storage/product/ZRSSUSQM?tag1=value1&tag2=value2",
    "qr_code": {
      "id": 376,
      "meta": {},
      "url": "https://feedback.instreamatic.com/storage/resource/qr/daff2b42c2e6e4259c2838a9b2a22567.png" 
    },
    "tags": [
      {
        "tag_value": "value1",
        "tag": {
          "id": 1,
          "name": "tag1" 
        }
      },
      {
        "tag_value": "value2",
        "tag": {
          "id": 2,
          "name": "tag2" 
        }
      }
    ]
  }
}

Where,

  • "link" is the customized Voice Page link

  • "url" inside the qr_code is a link to QR-Code with the same link.

Import feedback via API

API Request

Method: GET

Endpoint: https://speaky.instreamatic.com/api/v1/review?product_id=$PRODUCTID&from=$STARTDATE&to=$END_DATE

Headers:

Authorization: $ACCOUNT_TOKEN 

Body:

Where,

  • $ACCOUNT_TOKEN is your access token

  • $PRODUCT_ID is an ID of a Voice Page. For example, in https://feedback.instreamatic.com/main/manage/product/343/main, 343 is the ID.

  • $STARTDATE - is the period's start date in YYYY-MM-DD format.

  • $END_DATE - is the period's end date in YYYY-MM-DD format.

%Y-%m-%d %H:%M:%S format can be used if you need to retrieve speakys for a narrower period. The deafult timezone is EDT -0400. UNIX Timestamp can be used to avoid the timezone difference.

API Response

{
    "anchor": 835,
        "data": [
        {
            "id": 723,
            "date": "2022-02-18 04:07:40",
            "date_utc": "2022-02-18 01:07:40+00:00",
            "transcript": "How do you speak??",
            "urgent": null,
            "age": "25-34",
            "gender": "M",
            "timezone": "Asia/Calcutta",
            "email": null,
            "country": "IN",
            "geoid": 7279737,
            "tag": []
        }
        ...
    ]
}

In case of multiple responses, the system will return the list of responses for the chosen period.

The "anchor" defines the last retrieved speaky. If you want to get only new speakys in your next request, call the following:

Endpoint: https://speaky.instreamatic.com/api/v1/review?product_id=$PRODUCTID&anchor=$ANCHOR

where $ANCHOR is an anchor value you got from the previous response. The rest of the headers remains the same.

How to test the API?

If you are a client, you can create a page and use its parameters and your API-Key to perform tests.

If you are not a client yet, please use the following data for the test:

Test page: https://thespeaky.com/voice/BIXYVKEA/ (use this page to record feedback).

API-Key: 9c0030ae31004cdbea1af75a4fbd1bba

Test tags: test_tag1 and test_tag2

Product ID: 169

Last updated