Welcome to the Mindstamp API documentation overview!

Overview

As the premium Interactive Video platform, we pride ourselves in proving the best-in-class solution to our customers needs. In addition to providing a sleak and intuitive interactive video experience, we also provide a comprehensive API that allows our users to retrieve and utilize their Mindstamp data. Mindstamp offers a JSON REST API that provides users the ability to retrieve data for views, viewers, videos, interactions, and users for use in their own applications.

Semantics

To access the API, it is important to understand how our endpoint is constructed. An endpoint is a URL that allows you to talk to the Mindstamp servers to extract your data. The root endpoint for the Mindstamp API is https://api.mindstamp.io. Since our API is constantly evolving and providing more functionality, we use a versioning system. The current version of the API is v1. Piecing these together, the resulting endpoint for the current version of the Mindstamp API is https://api.mindstamp.io/api/v1/.

Authentication

In order to authenticate requests made to the Minstamp API, customers with access to the API will be provided a Bearer token which must be included in all requests made to the API. A typical bearer token will look like this tuG4rqqTS_Df7Ma0W73SrzTATkSyH-D7s7NAU2JHPGQ. This token is a secret and must be kept confidential. Therefore, It should not be shared anywhere or checked into any public code repository. Additionally, the bearer tokens do not expire but they can be expired and refreshed by Mindstamp in the event of a leak or business disruption.

Requests

The API can be integrated in all major programming languages including Javascript, Python, Ruby, Java, and many more. To demonstrate how to make API requests, we will look at a basic cURL GET request to retrieve a single video. Assuming access to the video with the ID of KMxPjRVlrPnH, we can use the request to pull a single video (see the Endpoints table below).

curl https://api.mindstamp.io/api/v1/videos/KMxPjRVlrPnH -H "Authorization: Bearer tuG4rqqTS_Df7Ma0W73SrzTATkSyH-D7s7NAU2JHPGQ"

The JSON response will look like:

{
  {
        "id":"5e358f49-fb1f-400a-9abf-5bd5d71839e6",
        "token":"KMxPjRVlrPnH",
        "title":"Interactive Video #12",
        "message":"Created on Mindstamp! This message is customizable",
        "created_at":"2020-10-28T19:10:34.748Z",
        "duration":45,
        "link":"https://api.mindstamp.io/watch/KMxPjRVlrPnH",
        "thumbnail":"https://mindstamp-resources.s3-us-west-2.amazonaws.com/..."
    }
}

Response Codes

Your program should always check the response code to indicate a successful response. The most common response codes from the API will be those used across HTTP applications:

  • 200 - Success
  • 401 - Not Authorized
  • 404 - Not Found
  • 422 - Unprocessable Entity
  • 5xx - Error
  • 503 - Rate Limit Exceeded

Rate Limiting and Pagination

The Mindstamp API is rate limited and some endpoints are paginated to avoid sending large amounts of unnecessary data. The rate limits for enterprise customers are as follows:

  • 1,000 Calls Per Hour
  • 100 Calls Per Minute

Subsequent requests will be throttled. If you need to increase these limits, please contact your account representative to discuss options.

Pagination is controlled by the offset parameter and returns up to 100 results at a time. So, to retrieve the first 100 interactions for a viewer, you would call call:

curl https://api.mindstamp.io/api/v1/videos/KMxPjRVlrPnH/interactions -H "Authorization: Bearer tuG4rqqTS_Df7Ma0W73SrzTATkSyH-D7s7NAU2JHPGQ"

To retrieve interactions 101 - 200 (if exists), the next call would be:

curl https://api.mindstamp.io/api/v1/videos/KMxPjRVlrPnH/interactions?offset=100 -H "Authorization: Bearer tuG4rqqTS_Df7Ma0W73SrzTATkSyH-D7s7NAU2JHPGQ"

Response Objects

Successful requests return one or many JSON objects.

A JSON object field that does not have data will come back as null. Your application should not assume that any field is populated.

Endpoints

The following API endpoints are available. For full documentation and parameters, please contact your account representative.

Request Type Endpoint Version Explanation
GET /:version/views V1 Get a single view
GET /:version/views/summary V1 Get a summary of views
GET /:version/views/summary/month V1 Get the current month's views
GET /:version/views/summary/week V1 Get the past seven day's views
GET /:version/views/:id V1 Returns a single view.
GET /:version/views/:id/interactions V1 Get interactions for a single view
GET /:version/interactions V1 Get all interactions
GET /:version/interactions/:id V1 Get a single interaction
GET /:version/interactions/:id/responses V1 Get the responses to a single interaction
GET /:version/videos V1 Get a list of videos
GET /:version/videos/:id V1 Get a single video
GET /:version/videos/:id/views V1 Get the views for a single video
GET /:version/videos/:id/interactions V1 Get the interactions for a single video
GET /:version/viewers V1 Get a list of viewers
GET /:version/viewers/:id V1 Get a single viewer
GET /:version/viewers/:id/views V1 Get all views for a single viewer
GET /:version/viewers/:id/interactions V1 Get interactions for a single viewer
GET /:version/user/me V1 Get the current user
GET /:version/plink V1 Get a list of P-Links
GET /:version/plink/:id V1 Get a single P-Link
PATCH /:version/plink/:id V1 Update a P-Link status
POST /:version/plink/ V1 Create a new P-Link