⚙ī¸Set up API access

Obtaining an API Key

You can get an API Key by emailing chirag@withblaze.app 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.

How to integrate

  • GraphQL Endpoint (For Community Management, CRM and Wallet Intelligence): http://dashboard.withblaze.app/api/graphql-api

    • Note that there is a different URL for Data APIs

  • Authentication: Include x-api-key in the request headers

    • Steps to generate the Blaze API Key -

      • Go to Settings → API Key → Generate api key

Video demo on how to integrate:

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.

Last updated