Blaze
Search
K
Comment on page

Introduction

The Blaze API gives you full access to many of the things used for generating the Blaze dashboard like sentiment, engagement, and segments.
Run in Postman
This documentation describes all of the available API calls and properties of the returned objects. If you have any questions, please reach out to [email protected].
At this time the Blaze API is under Alpha access.

Getting Started

What is GraphQL?

GraphQL is an open-source query language for APIs developed by Facebook in 2012 and has been adopted by companies such as Airbnb, GitHub, Yelp and PayPal. GraphQL gives clients the flexibility to request exactly what is needed and nothing more. You can construct a request by defining the resources you want via a POST request to a server and receive a response that matches the format of your request. Please check out the Introduction to GraphQL guide to learn more about the basic concepts of GraphQL.

Notation

  • String is one of the built-in scalar types - these are types that resolve to a single scalar object, and can't have sub-selections in the query.
  • String! means that the field is non-nullable, meaning that the GraphQL service promises to always give you a value when you query this field. In the type language, we'll represent those with an exclamation mark.
  • [String] represents an array of String objects.
More GraphQL notations: https://graphql.org/learn/schema/

Obtaining an API Key

You can get an API Key by emailing [email protected] with your account identifier. The email address you send from must match the email address registered on your Blaze account. Turnaround for API Keys is typically under 24 hours.
Anyone with this API Key can use the Blaze API as you. If it is compromised, please send an email and it can be deactivated or changed.

Sending your first API call

There are four properties that you must include in every API call.
  • api_key An alpha-numeric string that gives you access to use the API.
  • query Any one of the query objects listed below in the API Reference.
  • variables JSON-encoded values sent to the method, sometimes optional.
With that in mind, the next step is to send a POST request to api.withblaze.app with the appropriate values set.
A good first API call would be ping. Fill in your API key, then paste this string into a web browser.
curl \\
-H 'Content-Type: application/json' \\
-H 'x-api-key: API_KEY' \\
-X POST \\
-d '{ "query": " query Ping { ping { status } } " }'
You can send API calls directly in your web browser, using cURL from a command line, or with your programming language of choice.

Understanding API responses

All API calls will return JSON with a data property. Exceptions to this will be specified in the documentation.
You should always attempt to JSON decode the response, then use the success property to determine if the API call succeeded.